texcords and normals please explain these
- big_daddy2
- Private First Class
- Posts: 131
- Joined: Sat May 06, 2006 1:06 am
- Location: the middle of nowhere, USA
texcords and normals please explain these
hi i just found out how to make a mesh box with vertices and vertexes with 6 faces now i want to know what texcords and normals do, please do not explain what they do in the face i know that when u put a number it is the texcord,normal,or vertex you are putting to it
- big_daddy2
- Private First Class
- Posts: 131
- Joined: Sat May 06, 2006 1:06 am
- Location: the middle of nowhere, USA
also if one of these fills the hollow box up please tell me
this is what i got to make a box:
this is what i got to make a box:
Code: Select all
mesh
name mesh1
vertex -10 25 0 #0
vertex -10 -25 0 #1
vertex 10 25 0 #2
vertex 10 -25 0 #3
vertex -10 25 30 #4
vertex -10 -25 30 #5
vertex 10 25 30 #6
vertex 10 -25 30 #7
face # bottom
vertices 0 1 2 3 3 2 1 0
endface
face # top
vertices 4 5 6 7 7 6 5 4
endface
face #side 1
vertices 0 1 4 5 5 4 1 0
endface
face #side 2
vertices 2 3 6 7 7 6 3 2
endface
face # side 3
vertices 0 2 4 6 6 4 2 0
endface
face #side 4
vertices 1 3 5 7 7 5 3 1
endface
end
- Spazzy McGee
- Sergeant Major
- Posts: 1405
- Joined: Mon Mar 21, 2005 4:59 pm
- Location: Planet MoFo, Sheffield Division; United Kingdom
Please don't reply to your own posts; use the 'edit' button to edit your previous posts to contain the revised information.
texcoords map a texture onto a face of a mesh, in a custom fashion. It allows you, for example, to use only one image to texture all the sides of a cylinder with a 'barrel' texture.
normals don't worry about them.
I think what you are trying to do is to make the box solid - to do this use inside points. An inside point defines the inside of an object as far as it can "see", until it hits the back of a face - so for your cube you only need one, whereas for a more complex object, for example one with a bend in it, you would need too.
Your mesh code is weird - you only need 4 vertexes per face - you don't want to draw faces facing into the box, since nobody sees them.
I've also added your inside point.
P.S, i recommend not diving straight in at the deep end.
texcoords map a texture onto a face of a mesh, in a custom fashion. It allows you, for example, to use only one image to texture all the sides of a cylinder with a 'barrel' texture.
normals don't worry about them.
I think what you are trying to do is to make the box solid - to do this use inside points. An inside point defines the inside of an object as far as it can "see", until it hits the back of a face - so for your cube you only need one, whereas for a more complex object, for example one with a bend in it, you would need too.
Your mesh code is weird - you only need 4 vertexes per face - you don't want to draw faces facing into the box, since nobody sees them.
I've also added your inside point.
Code: Select all
mesh
vertex -10 -25 0
vertex -10 -25 30
vertex 10 -25 30
vertex 10 -25 0
vertex -10 25 0
vertex -10 25 30
vertex 10 25 30
vertex 10 25 0
inside 0 0 10
face
vertices 0 3 2 1
endface
face
vertices 0 4 7 3
endface
face
vertices 1 5 4 0
endface
face
vertices 2 6 5 1
endface
face
vertices 3 7 6 2
endface
face
vertices 5 6 7 4
endface
end
"Life is what happens to you while you're busy making other plans." - John Lennon
- big_daddy2
- Private First Class
- Posts: 131
- Joined: Sat May 06, 2006 1:06 am
- Location: the middle of nowhere, USA
Normals are not specific to bzflag, as they are a concept in 3d graphics and math, not JUST bzflag ( hence the use of the word "specific" ). Since BZ uses 3d graphical and mathematical concepts such as faces and vertices, then it also uses normals.
It is always best to define your normals, unless you want your object to look like crap when lit.
It is always best to define your normals, unless you want your object to look like crap when lit.
JeffM
- optic delusion
- Special Forces
- Posts: 1054
- Joined: Sat Sep 25, 2004 2:29 pm
- Location: Planet MoFo
- Contact:
If you want to start using this type of mapping, your going to have a very hard time doing it in text. I highly suggest that you get Wings3d, and it's bzw exporter. That will make it easy, and it's free.
Take a look at my Defender game mode concept.
Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
- Spazzy McGee
- Sergeant Major
- Posts: 1405
- Joined: Mon Mar 21, 2005 4:59 pm
- Location: Planet MoFo, Sheffield Division; United Kingdom
You say that; the Wings exporter always mucks them all up, and lighting looks appalling - I always end up just deleting all normals. It's an impossible job re-defining them all.JeffM wrote:It is always best to define your normals, unless you want your object to look like crap when lit.
I have little experience of BZWtools for blender, I expect it exports them properly.
"Life is what happens to you while you're busy making other plans." - John Lennon
- big_daddy2
- Private First Class
- Posts: 131
- Joined: Sat May 06, 2006 1:06 am
- Location: the middle of nowhere, USA