Re: 3D Surface Problem [message #30105 is a reply to message #30104] |
Mon, 08 April 2002 12:22   |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
Hi Ken.
"Ken Mankoff" <mankoff@I.HATE.SPAM.cs.colorado.edu> wrote :
>
> I think the problem is a few things
>
> 1) Walls are appearing at the edge of the DEM. Mars has a lot of its
> surface at below sea-level (negative altitude). But even if I say
> "dem = dem - min( dem )", so everything should be positive, I still
> get the "walls"
It looks like you have a 2d array of elevational data (dem). Is the data
you have placed in it square or do you have some null values (data not
square but array is)?
> 2) The images always come out square. I am pretty sure this is just a
> keyword I am missing, but I do not know which one and which object it
> belongs with (surface? window?).
What images? The texture maps? The final image?
The surface will always be square since you are providing x and y verticies
that define it as such. I am not a cartographer but I think you will want
to specify your surface verts explicitly, and not by indgen. I would assume
each datum has a martian lat,lon and an elevation. Do you have routines to
convert the lat/lon to x,y on a localized grid?
> 3) The vertical scaleing is always "0 to 1" in the IDLgrModel (I
> think). This looks good with maps that cover a large vertical area
> (say, Olympus Mons or Valles Marineris). But if the map is of a
> relatively flat area (somewhere in the northern low-lands), and the
> DEM covers a few hundred meters, then those few hundred meters get
> streched vertically, and it appears warped.
I hate the *coord_conv keywords. They don't make sense to me outside the
context of simple plots. I just settle on a coordinate system for my
virtual world, say 1 unit = 1 km, and make sure my vertex data agrees. If
you set up your view properly you don't have to worry about scaling
Setting up the view is the trick. You may want to give my camera object a
try. It will simplify setting up scene composition and you will be able to
place the viewer anywhere in the scene.
http://www.acoustics.washington.edu/~towler/
If you don't want to do that, you need to normalize on the min and max of
the entire martian surface (or at least the parts you want to plot) not the
min and max of the localized data.
> 4) White pixels are appearing in the images.
I would deal with the other issues and this might go away.
In general, I would try to simplify. Fix the verticies first. Create the
surface and view it in xobjview. Forget texturing and don't go any further
until you have the verticies sorted out. Then add the texture. Once you
get the texture added, deal with the view.
-Rick
|
|
|