Re: 3d graphics [message #34163 is a reply to message #2845] |
Mon, 24 February 2003 10:12   |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
"Dan Madeira" <d.madeira@ucl.ac.uk> wrote in message
news:b3blob$j42$1@uns-a.ucl.ac.uk...
> Hi all,
>
> I'm doing a undergrad group project where we have to use IDL to code a
> sterographic representation of the solar system. However we have no prior
> knowledge of this language, and so we are a little bit stuck....
>
> We have drawn four globes representing the Earth, moon, mars and the sun
> using the `orb` procedure, and then used a for loop to translate the
globes
> according to a specified orbit, redrawing the view in both the right view
> and left view widgets each time. However this results in a large lag
between
> each update, which ruins the steroscopic effect. Has anyone got any ideas
of
> a faster technique?
The orb object creates an orb that has a fairly large number of facets or
polygons. You can use the DENSITY keyword on the orb object to reduce the
number of polygons in an orb, which will increase rendering speed at the
expense of orb quality. You'll have to play with this value to get to a
setting that gives you the best compromise between speed and quality.
A faster graphics card will also help. Make sure that you are using
hardware rendering if you have a good card.
David's suggestion of capturing frames and playing them back is good if you
still can't get it to run fast enough.
How large are your views? Sometimes large windows take a long time to draw
because of the clearing operation between draws. Again, a better graphics
card helps here.
> Also, we would like to have a globe, which is internally lit, representing
> the sun. However when we placed a light source inside the orb, its surface
> remained unlit though the other objects were properly lit. Is there any
> simple way of solving this?
I'd try using a spot light. Place it inside of the orbit of the innermost
planet, on a line between the viewer and the sun. Aim it at the sun. Keep
the spot cone as close as you can to the extent of the sun orb. This won't
light the back of the sun, but you can't see that anyway. If some of the
light gets past the sun and hits a planet on the other side of the sun, the
effect of that light will not be that noticable, since the planet will be
getting lit anyway by the light inside the sun.
Hope this helps,
Karl
|
|
|