Advanced Maps: 3D Rotating, Colouring Elevation Grids

Learn to make aircraft, maps and more with all of the tools. All the tutorials you will ever need are located here!
NOTE THAT HACKING THE MAIN YSFLIGHT .EXE IS FORBIDDEN
Post Reply
User avatar
waspe414
Veteran
Veteran
Posts: 1101
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa
Location: Canada
Has thanked: 88 times
Been thanked: 96 times

Advanced Maps: 3D Rotating, Colouring Elevation Grids

Post by waspe414 » Fri May 06, 2011 11:59 pm

This tutorial has been moved to the YS Flight Sim Wiki found here:
http://ysflightsim.wikia.com/wiki/Advan ... ation_Grid

SpoilerShow
If you are unfamiliar with Scenery Editor and the map making process, read this first: http://forum.ysfhq.com/viewtopic.php?f=40&t=1578

If the map has few enough elements it is possible to do all of this without exporting things as separate files, but once a scenery has more than three or four of anything, it is very difficult to tell the difference.

Always make a backup copy of the map before doing this. You don't want to lose anything.

Terms:
  • Scenery, Field, or .fld: The map file.
  • Child Scenery, or .pc2: The segments of the scenery. Note: When importing, the program calls this a map.
  • New scenery: The file to be edited in Notepad, the .fld with the exported .pc2 in it.
  • Original scenery: The whole scenery that the final edit will be put back into.
  • Scenedit: Scenery Editor
  • RGB: Red Green Blue colour code, using numbers between 255 and 0 (Looks like 255 255 255 or 10 54 187 in code). What Scenedit uses to designate colour for items.

(Split into different posts for comprehensibility.)
I stole your turnip. Now you must come and defend your honour. ~ Hank Green
Image
"Talon is a giant flower. That is all."

User avatar
waspe414
Veteran
Veteran
Posts: 1101
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa
Location: Canada
Has thanked: 88 times
Been thanked: 96 times

Re: Advanced Maps: 3D Rotating, Colouring Elevation Grids

Post by waspe414 » Fri May 06, 2011 11:59 pm

3D Rotation:

Rotation in the vertical direction is something the Scenery Editor simply can not do. It is,
however, accomplishable by using Notepad.

Before you begin the process you must make sure that everything you want rotated is in its own child scenery (pink box).

1. Select the child scenery you want rotated vertically.
2. Export it as a .pc2 file. (File > Export > Current Item)
3. Delete the item from the original scenery and save.
4. Close and reopen Scenedit. This clears the default save name. (Not doing it can cause you to accidentally overwrite your original scenery file.)
5. Create a new map and import your .pc2. (File > Import > Map)
6. Place it, then rotate it horizontally by the amount you want it rotated vertically. If you want it to be straight up and down, rotate it 90°.
Watch out for positive or negative angles. Generally you want to rotate it positively, and it can get inverted if you mess it up...
7. Save the current scenery as a different file than your original scenery.
8. Open the new .fld in Notepad. You will see something like this:

Image
PC2
FIL "00000001.pc2"
POS -300.00 -0.00 100.00 0.00 16384.00 -0.00
ID 0
END

Indicates it's a child scenery.
Tells the program which of the sections above it in the file to look at.
Position in meters. Horizontal, vertical, horizontal. Yaw angle (standard rotate). Pitch (The one you want to change it to). Roll (Used if pitch is rotating it about the wrong axis).
Not a clue.
Ends the .pc2 segment.
You want to move the value from yaw to either pitch (normally what works for me) or roll.

9. Save the Notepad file, and open it in Scenedit to make sure you did it right.
10. Open the original scenery, and import the new scenery. (File > Import > Scenery)
11. Move and rotate the new scenery, now inside the original scenery, around normally if necessary. (Edit > Move > Current Scenery)
I stole your turnip. Now you must come and defend your honour. ~ Hank Green
Image
"Talon is a giant flower. That is all."

User avatar
waspe414
Veteran
Veteran
Posts: 1101
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa
Location: Canada
Has thanked: 88 times
Been thanked: 96 times

Re: Advanced Maps: 3D Rotating, Colouring Elevation Grids

Post by waspe414 » Fri May 06, 2011 11:59 pm

Colouring Elevation Grids (.ter):

This allows each face of an elevation grid to be its own colour rather than all being the same.

1. Insert your elevation grid normally and with whatever base colour you wish.
2. If you're doing this to an older map, unhide all faces to be sure. (Elevation Grid > Unhide > All Faces)
3. Select the faces that you want to colour a single colour (so if you want two colours and the base, you need to do this twice).
4. Hide these faces. (Elevation Grid > Hide > Selected Faces)
5. Export the elevation grid. (File > Export > Current Item)
6. Open the .ter file in Notepad. You will see many lines similar to this:
BLO 0.00 R 1 0 127 0 0 0 127 0
Meaning:
Part of the grid
Height(m)
Visible
Colour
Invisible
7. There are two ways to do the following: Either manually in Notepad, or with the Find/Replace feature in something like Microsoft Word.
8. Copy and Paste the entire file into your word processor. Find "0 (Colour RGB text here)" and replace it with "1 (New colour RGB text here)"
For example: "0 0 127 0" to "1 255 127 110"
9. Copy and paste the entire file back out of your word processor and into Notepad. Save.
10. Open with Scenedit to make sure it's correct. Repeat if necessary.
I stole your turnip. Now you must come and defend your honour. ~ Hank Green
Image
"Talon is a giant flower. That is all."

Shutter

Re: Advanced Maps: 3D Rotating, Colouring Elevation Grids

Post by Shutter » Sat May 07, 2011 12:34 am

stickied.

Iceman
Core Staff
Core Staff
Posts: 1399
Joined: Wed Feb 02, 2011 5:47 am
Favorite Aircraft: F-16C Viper
Has thanked: 84 times
Been thanked: 136 times

Re: Advanced Maps: 3D Rotating, Colouring Elevation Grids

Post by Iceman » Wed May 11, 2011 2:45 am

This is good stuff.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Homie I'll SQL YOUR syntax

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest