# Setting up the normals for my Spaceship

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

## 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 on other sites
[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 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, [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 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 on other sites

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