Setting up the normals for my Spaceship

Started by
2 comments, last by canonind 12 years, 9 months ago
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
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.
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?
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.

This topic is closed to new replies.

Advertisement