Jump to content
  • Advertisement
Sign in to follow this  
canonind

Setting up the normals for my Spaceship

This topic is 2557 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 Guys,

I have designed a spaceship without lighting. My problem is that the surfaces are not flat like the ones of a cube. So I can't set the normals like (0,1,0) for example. I can get into cross product to determine the normals. But that'll get messy, since there will be too many calculations. Is there an easier way to do it?

Thanks

Share this post


Link to post
Share on other sites
Advertisement

Hey Guys,

I have designed a spaceship without lighting. My problem is that the surfaces are not flat like the ones of a cube. So I can't set the normals like (0,1,0) for example. I can get into cross product to determine the normals. But that'll get messy, since there will be too many calculations. Is there an easier way to do it?

Thanks


if you do the calculations once, preferably offline in a tool, then who really cares about the time involved? Perhaps I'm misunderstanding something but this seems very trivial.

Share this post


Link to post
Share on other sites
You designed a spaceship, but how are you going to (or how did you) model it? I guess you are not directly writing the vertices positions in your application code, you most probably used some 3D modelling tool (Blender, Maya, 3ds max etc.) - and that's where should your normals come from, too.
In case of more complicated models, you have to make normals in a modelling tool, because generating them in a code using cross products etc. forces you to do all normals the same way in the whole model, which in fact means the whole model will have all faces shaded flat or smooth (Gouraud, http://en.wikipedia....Gouraud_shading). But what if there are some parts of the model rounded and other square?

Share this post


Link to post
Share on other sites
It's a very basic spaceship consisting of 20 triangle primitives. Hence I put the vertices inside one by one. So I had to use the cross product. But I didn't know that these programs like 3dsmax generate normals, so in more complex models, it seems like our burden with normals is eased a little bit. Thank you.

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!