Sign in to follow this  
canonind

Setting up the normals for my Spaceship

Recommended Posts

canonind    100
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
Hiwas    5807
[quote name='canonind' timestamp='1311196839' post='4838144']
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
[/quote]

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
Tom KQT    1704
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, [url="http://en.wikipedia.org/wiki/Gouraud_shading"]http://en.wikipedia....Gouraud_shading[/url]). But what if there are some parts of the model rounded and other square?

Share this post


Link to post
Share on other sites
canonind    100
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this