We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Light problem: changes when camera is moved
Page Index Toggle Pages: 1
Light problem: changes when camera is moved (Read 796 times)
Light problem: changes when camera is moved
Sep 22nd, 2009, 4:11pm
 
Hi,

I'm trying out objloader to get a little ship to fly around a landscape.

Seems to be working out so far except that when I use the camera() function to move the camera around, the lighting changes as if the world is rotating and the light is staying still.

Can anyone take a look at the applet/source (it's still small) and give me some ideas? It's blowing my mind.

http://starkes.dyndns.org/starkfox/applet/index.html

Same problem with all types of lighting, OPENGL and P3D btw.

Thanks.
Re: Light problem: changes when camera is moved
Reply #1 - Sep 22nd, 2009, 5:29pm
 
Looks like a good start!  You might be using directional lighting where a combination of ambient and point-source lights would be more appropriate, or you might need to make sure your light code is nested inside your rotations.
--Ben
Re: Light problem: changes when camera is moved
Reply #2 - Sep 22nd, 2009, 10:37pm
 
fixed it.

watch what options you use when you export obj's, i guess.

in maya, i had to export without normals. processing does the normals for you, right? so it works anyways.
Page Index Toggle Pages: 1