Quation about RAW files for Terrain
|
|
Partington Gould
Registered User
Join date: 15 Sep 2005
Posts: 94
|
12-07-2007 23:00
OK, been reading a bit of stuff and playing in Photoshop. I can figure out how to paint terrain and the multipliers (sort off) and water levels, but have one question. The KB and a few other sites talk about naming the file with size info when saving? The KB uses the example 'HF1_1024x512.raw'. Maybe I'm missing something, but surely the file is 256x256, so why are we giving other size data in the name? OK, another question since I have the window open now. Do most people work at 256x256, or work bigger and shrink it after? Thanks 
_____________________
PG - Permanently Confused and prone to Wandering
|
|
Infiniview Merit
The 100 Trillionth Cell
Join date: 27 Apr 2006
Posts: 845
|
12-08-2007 07:53
The height map is x256 in order to represent height values from 0-255 which correspond to color 0=black and 255 being white with all values in between of varying levels of grey. Each degree is supposed to approximate 1 meter, Standard water level is 20. Generally there will be very little contrast in your final map unless your terraforming something very extreme. As far as I could tell for the naming reccomendation is to be able to tell one map from another, I never quite got the reason for that either so that was my guess. 
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
12-08-2007 13:35
For clarity, the number 256 has several functions here.
First, a sim is 256x256 meters, and in a 256x256 RAW terrain file, each pixel represents one square meter of land.
Second, there are 256 grayscale values in each channel (per pixel). These represent mathematical values from 0-255.
As for why the Knowledge Base suggests that particular naming convention for terrain files, I have no idea. It doesn't seem to be relevant, since all terrain files should be the same size, 256x256. In theory, you could probably create the file at any size divisible by 256, and it will probably work in SL, but I can't imagine any benefit from doing that. My advice, work at 256x256 for all terrain files, and just ignore that sentence.
It's also pretty interesting that the article talks about the importance of keeping everything divisible by 256, yet the first two example images are each 400x400. Whoever wrote the article must have a strange sense of consistency.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
|
Krimson Gray
Registered User
Join date: 5 Dec 2006
Posts: 40
|
12-08-2007 15:51
Naming convention doesn't matter. My .raw file in our sim was names TripleZeroNomNomNom.raw because I was hungry when I was uploading it. So long as its saved as the right format, the name can be what you want.
|
|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
12-09-2007 07:31
I usually work at either 1x or 2x the final size of my heightmap, depending on the complexity of the design. Using an actual 256 x 256 pixel map is preferable as it means you won't get any artifacts when downsizing, and flat places will remain flat.
Another factor is that if you resize at all, even by one pixel, Photoshop has an annoying tendancy to add a one-pixel inaccuracy at the edges, that can cause an odd uprising right along the sim edge. You can eliminate that by either never resizing, or by marking the desired edges of the heightmap with guides, and then adding some extra space around the edges that is colored the same as the outer row of pixels.Resize that and cut, and you get a clean edge.
I usually design with a height multiplier of 0.500, because that gives me twice the vertical resolution, and smoother terrain. And very few sims need land higher than 128 Meters! Just remember that you must double the greyscale values for the desired resulting heights. So a plateau at 32 M elevation needs a greyscale value of 64, if you have a multiplier of 0.500.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
|
|
Partington Gould
Registered User
Join date: 15 Sep 2005
Posts: 94
|
12-10-2007 18:11
Hi, thanks for all the replies. Ok, the name is meaningless, but I did find one annoyance, the Knowledge Base says save as Non-Interleaved, this gave a pretty wild island, lots of spires  I tried Interleaved and 'hey-presto'... I worked at 256x256, even with a 2x multiplier (or 0.5) the contrast at low elevations is very hard to see. I'm sure there's probably a way in PS to work with higher contrast then flatten it all down later. Most of my island is between 10m (-10 below water) and 2m (so colors of 20 and 44, not a lot of contrast), I have a 110m mountain hence the need to work with a 2x multiplier. Anyway, I'm happy with the result, thanks for the tips. PG 
_____________________
PG - Permanently Confused and prone to Wandering
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
12-10-2007 18:19
Glad to hear it worked out for you, Partington. Regarding the contrast issue, yeah, it's always gonna be a little tough to differentiate between gray shades that are very close to each other. Investing in a good monitor will make a big difference though. A lot of inexpensive flat panels have pretty lousy contrast. Midrange and high end ones are remarkably better.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
12-10-2007 19:51
One good trick to dealing with contrast issues is to use layers and countour mapping.
Ever see a topographocal map? The kind with lines that follow the sides of the hills at various elevations?
Let's say you want to make a hill with two peaks, a valley beside it, and a path leading down the side of the hill.
Draw the topographical curves, just like on a topo map. Fill the areas with high-contrast colors initially, so you can see them well, and have higher-level elevations above the lower level ones. Be really crazy, and use alternating orange and black, or whatever! Looks horrid, but makes it really easy to see where everything is. How much elevation between contour curves will depend on your terrain, and how much you need to smooth it. I did a dome shaped hill once, that needed a very specific shape, and used 1 M elevation differences! Overkill for most uses, but man, was that hill perfect!
Now... start selecting and filling those contour areas with the actual precise grey shades for those levels, working up from the bottom.
Make those layers a layer set, duplicate the layer set (to keep the seperated contour planes), and flatten the copied layer set. Apply a Gaussian blur to the flattened set, hand paint and adjust as needed, and boom! One very detailed heightmap!
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
|