comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » 3d graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: 3d graphics [message #34416 is a reply to message #34320] Thu, 06 March 2003 13:09 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Dan Madeira" wrote in message


Welcome to the world of OpenGL lighting...

> We tried positioning a spotlight in front of the sun, however it
> lights the sun unevenly and lights everything behind the sun as well.

Constructing a realistic 3d scene can be very difficult. As you are coming
to realize, lighting only goes so far. If you have played any 3d games
lately you can appreciate the work of the texture artists.

Yes, the spotlight will cast right thru the sun and onto anything beyond it.
That should be O.K. though since the sun does cast light in all directions,
right?

If the lighting is uneven, then place more lights around it. You can either
place a number of fixed lights around the sun or place 2 lights maybe +-15
deg off your view axis.

You will only get so far with lights alone. I would probably brightly light
the scene with an ambient light and use textures for your planets and sun.
The trick will be to create your planet textures so that they have a "dark
side". You'll have much more flexibility with this approach.

Either way has its limits.


> Also, when we placed a light inside the sun, each planet is lit but
> they don't cast shadows. Does anyone have any ideas on how to sort
> this out?

Lighting in OpenGL will not cast shadows. If you want shadows you need to
calculate them yourself and apply them as textures. This is not a trivial
exercise. For a constrained set of conditions you could probably work
something up though.


-Rick
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: PV WAve on a Gentoo Linux box
Next Topic: running an idl expression stored in a text string

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 04:55:45 PDT 2025

Total time taken to generate the page: 1.92245 seconds