Jump to content
  • Advertisement
Sign in to follow this  
Thaligar

OpenGL newbee again )

This topic is 4882 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey, yesterday i went crazy, i'm working now for several months with opengl, but, yesterday i realized that maybe i'm still a opengl newbee, damn! so now my question, i've got a positional light, my terrain is lightened very well, but, every new object i insert into the scene is wrong lightend, i define the position of my light then for each object i load the IM and do the rot/trans, finally i do it for my terrain, so why is the terrain lightend ok and the rest wrong lightend?? thx in advance tgar

Share this post


Link to post
Share on other sites
Advertisement
yep, they are computed,

for the terrain i computed it myself,
and the model got it's own normals,
in other programs they seem to be correct...

greets
tgar

Share this post


Link to post
Share on other sites
Are you sure the model has its own normals? What format are you using? (just trying to help you get this sorted).

Share this post


Link to post
Share on other sites
3ds...

...checked, got their own normals...

it seems that the light is turn 90 degree counter-clock-wise,
probably that's important,

i thought it could be that the light direction is rotated when i load the IM or so...

greets
tgar

Share this post


Link to post
Share on other sites
Quote:
Original post by Thaligar
3ds...

...checked, got their own normals...

it seems that the light is turn 90 degree counter-clock-wise,
probably that's important,

i thought it could be that the light direction is rotated when i load the IM or so...

greets
tgar
From what I remember, the 3ds format doesn't include normals so you must be calculating them yourself or using some other 3ds loader which is calculating them (possibly inccorectly). I would render the normals on each model to make sure they look correct.

Maybe post your rendering code so we can see if you're doing anything out of the ordinary. Also, what do you mean by IM?

Share this post


Link to post
Share on other sites
thx i'm going to look for it,

(IM == Identity Matrix)

EDIT: i use the milkshape 3D format (converted from 3ds) sorry...

greets
tgar

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!