Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help with Maya terrain displacement map

Monique Binstok
Registered User
Join date: 5 May 2008
Posts: 87
09-01-2008 11:20
I have a mainland sim (Enfield) that I cleared of all my objects and reverted the terrain to its original Linden state. I did this because I was having terra forming issues and wanted to know what the original elevations were. Being as how this is mainland I was unable to get .raw files for the terrain. I was however able to get a terrain grayscale elevation map and .bmp sculpt image of the sim using a bot program called “Terrain Sculptor”.

The images seem to be fairly accurate for when I created a scale planner sculpty it resembled the terrain of Enfield. I read an online post about using the “Attribute Maps” feature of the “Sculpt Geometry Tool” (I’m using Maya 2008) and imported my grayscale elevation image to use as a displacement map. The resulting NURBS plane looks accurate but what I need help with is to set both the NURBS plane and “Sculpt Geometry Tool” to get the most accurate reproduction of the sim.

I made the nurbplane with 256 width and length. I set the UV patches for 256 also. I know these sounds excessive but since this is the sim grid size in meters as well the resolution of my grayscale image it seemed like a good place to start. The part I’m most unsure of is what to set for the “Max displacement” value in the “Sculpt Geometry Tool” prior to importing the grayscale image. I used 66.2 as this is the maximum height elevation of Enfield but should this be the difference between max height and the actual min height which is about 5?

Any pointers or simpler process of doing for a non estate sim well be most appreciated. My intention is to have an accurate terrain map of Enfield in it’s original state so that I can better plan my terra forming and building.
Reed Steamroller
Registered User
Join date: 19 Mar 2008
Posts: 13
09-01-2008 17:59
hola,

as a matter of fact, i've actually tried doing the same thing just recently. there were some differences in what i was doing though. i also had access to the raw file, from which i generated my own image file to use in the attribute maps option under the sculpt geometry tool.

k, what i was trying to do was get an accurate representation of some terrain i was working on into maya. i was going for the ability to manipulate it there (in maya) and export an image file that could be used in generating a new .raw file. the land wasn't cleared, so i was a bit worried about screwing up and having everything returned to owners, which would have been bad.

so i did about the same thing you did, but i wasn't messing around with a nurbs plane. i was using a poly plane, with 256x256 divisions. i was trying to keep everything on the same scale. i didn't bother changing the units in maya to meters (i kept them at centimeters), but i did bring the plane up to the scale of 256x256 units. i was trying to recreate the environment found on a sim as close as i could, without changing units to meters (i just don't like doing that, screws up the camera, etc...)

anyway, what i did was i defined the lowest and highest points on the sim. i brought one corner down to 0 meters, and i put a prim on the highest point. therefore, i knew i could rely on the lowest point of the resulting mesh in maya being right on at 0 units up on the Z axis (i have Z set to up), because i knew for a fact that the lowest point of the terrain on the sim was a 0 units up on z axis. I also knew the value for the highest point (because of the prim i had set there on the sim) and i was able to scale the mesh to fit within those parameters.

thats how i got my faithful representation of the sim's terrain to the correct scale in maya, by defining known points on the terrain in SL. it may have been off a few fractions of a meter, but that wasn't enough of a difference to really cause a problem.

later, once i was done bending the terrain to my will, i just used the transfer maps utility to generate a new greyscale image to use for my new .raw. i set the terrain mesh as the "source" and i set a new, flat mesh of the same size and proportions (and poly count) as the "target". took a bit of playing around with to get the proper results. i recommend reading the maya help entry on generating a displacement map with transfer maps to get a better idea of what you'll have to do to set it up correctly.

i was also using a freeware program called bailiwick to generate the .raw from the image file.

the only problem that i ran into and couldn't get around was some stair stepping in the terrain that showed in the resulting .raw files. something to do with the displacement maps i'm sure. wasn't too big of a deal.
Reed Steamroller
Registered User
Join date: 19 Mar 2008
Posts: 13
09-01-2008 18:00
p.s. you should definitely switch to a poly plane. not only will it be a more accurate representation of the sim terrain, but that transfer maps utility won't work with nurbs surfaces
Monique Binstok
Registered User
Join date: 5 May 2008
Posts: 87
09-02-2008 10:00
Reed, thanks for the reply and info. The big difference between what you were doing and what I'm trying to do is it sounds like you were working with an estate. As a mainland sim owner as far as I know I don't have access to all the estate management tools that you do and therefore no .raw file imports.

I like the method you used for assuring scale and will go ahead and see if poly plane is any easier to work with. I don't have to worry about the .raw file importer consideration as I don't even have that option :(.

My objective is to have an accurate representation of the original terrain that I can use as a model for planning how best to terra form. Once I have carved my trenches, canals, and flat areas, I will than make another maya terrain plane. This one I can use a reference for shaping sculpt planes for things like mountain ranges and cave liners.

Before I made the decision to clear my land and do the revert back, I was playing around with making a mountain range out of a mega prim cylinder that I hollowed and cut. I found that if I created a similar cylinder in maya, I could use it as a reference to shape a sculpt nurbs plane for the top of the mountains. When the sculpt plane was imported in SL and fitted to the cylinder the mountain range looked good and only required 2 prims. The hallowed cylinder provides a surface to walk on and also allows the interior of the mountain range to be used for a cave-tunnel complex.

With the interior of the hallowed cylinder textured as a cave and a few sculpy rocks poked through the roof here and there it all looked fairly natural. Also the cylinder cave liner has the advantage of not being able to walk through something I never liked about some of the cave complexes s I visited.

I’m just a sl noob so everything is still a learning experience. I’m sure there probably better and easier methods to achieve what I hope to accomplish so any other suggestion or advice is much appreciated.
Monique Binstok
Registered User
Join date: 5 May 2008
Posts: 87
09-09-2008 09:07
From: Reed Steamroller
hola,
later, once i was done bending the terrain to my will, i just used the transfer maps utility to generate a new greyscale image to use for my new .raw. i set the terrain mesh as the "source" and i set a new, flat mesh of the same size and proportions (and poly count) as the "target". took a bit of playing around with to get the proper results. i recommend reading the maya help entry on generating a displacement map with transfer maps to get a better idea of what you'll have to do to set it up correctly.



Reed, (or anyone) can you elaborate on the steps to you take in making your grayscale image in Maya? I purchased an Island and am really enjoying the benefit of the added Estate tools. I have not figured out how to render the grayscale image in Maya after making my terrain changes.

The “Sculpt Geometry Tool” makes it easy to import and use grayscale images form your .raw files. I just need to find a way to get my terrain changes back into SL. Help or advice from anyone is much appreciated.