Meshes
- Mark_IV
- Private First Class
- Posts: 157
- Joined: Wed Aug 25, 2010 12:24 am
- Location: Actually joined 2004 or 2005 as tyjr ;)
Meshes
Please correct me if I'm wrong, I think meshes are what I'm talking about. I made a object in Anim8tor, and exported it as .obj and converted to .bzw yada yada ya. I want to add it to a map, I know how to make groups, but when I do define group, the code for the object is thousands of lines long. In the define group could I put a different .bzw file with ONLY the object code, this way my map .bzw wont be overflowing with thousands of lines of this object.
Re: Meshes
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
- Mark_IV
- Private First Class
- Posts: 157
- Joined: Wed Aug 25, 2010 12:24 am
- Location: Actually joined 2004 or 2005 as tyjr ;)
Re: Meshes
Thanks you joey, also, I am having trouble with groups. With my test map, which is just the object, I have this
world
size 400
end
group object
shift 300 300 0
end
define object
*Miles of Code*
enddef
yet, the object wont move at all, even though I shifted it.
world
size 400
end
group object
shift 300 300 0
end
define object
*Miles of Code*
enddef
yet, the object wont move at all, even though I shifted it.
Re: Meshes
Off the top of my head, I think you would want to use "position" to move the group, as in this:
Code: Select all
group myGroup
position 300 300 0
end
- optic delusion
- Special Forces
- Posts: 1054
- Joined: Sat Sep 25, 2004 2:29 pm
- Location: Planet MoFo
- Contact:
Re: Meshes
Mark_IV, that looks like it should work. Are you sure you have properly defined the group in the include file? Sounds like the enddef may be missing. use -dddd
I prefer to use "shift" instead of " position" in group placement, as it behaves better with rotation, and groups are very often rotated.
Another thing i'd like to mention... when you build your mesh for a group, it is preferable to leave it centered around point 0 0 0, making it easier to shift around the world.
I prefer to use "shift" instead of " position" in group placement, as it behaves better with rotation, and groups are very often rotated.
Another thing i'd like to mention... when you build your mesh for a group, it is preferable to leave it centered around point 0 0 0, making it easier to shift around the world.
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.
- Mark_IV
- Private First Class
- Posts: 157
- Joined: Wed Aug 25, 2010 12:24 am
- Location: Actually joined 2004 or 2005 as tyjr ;)
Re: Meshes
I did do that, I figured it would be easier.Optic Delusion wrote:
Another thing i'd like to mention... when you build your mesh for a group, it is preferable to leave it centered around point 0 0 0, making it easier to shift around the world.
Do I put -dddd in the config, what does that do?
- Cobra_Fast
- Dev Monkey
- Posts: 322
- Joined: Sat Oct 07, 2006 11:51 am
- Location: Germany
- Contact:
Re: Meshes
-dddd writes tons of information to the console on what's happening on the server and what the server is doing. It's useful for tracking problems which helps on finding a solution. (see http://my.bzflag.org/w/BZFS_Command_Line_Options)Mark_IV wrote:Do I put -dddd in the config, what does that do?
- Mark_IV
- Private First Class
- Posts: 157
- Joined: Wed Aug 25, 2010 12:24 am
- Location: Actually joined 2004 or 2005 as tyjr ;)
Re: Meshes
Also, how do I texture a mesh. I looked at r3lax's wooden tower, and he uses matref, but do I really have to add that too all of those lines? Is there an easier way. I can texture it in my 3d editor, but what I use it in BZ, it is untextured.
BTW I got it to move where I wanted it too.
BTW I got it to move where I wanted it too.
- optic delusion
- Special Forces
- Posts: 1054
- Joined: Sat Sep 25, 2004 2:29 pm
- Location: Planet MoFo
- Contact:
Re: Meshes
would have been better to apply the material in your 3d editor. I suggest you do that and re-export.
The wings3d exporter has a setting {one group per material} that produces face code looking like this... It's possible to add them via text editor, but how do you know which face is which? You don't! So the only realistic way to add materials to a mesh is to is via the 3d editor.
The wings3d exporter has a setting {one group per material} that produces face code looking like this... It's possible to add them via text editor, but how do you know which face is which? You don't! So the only realistic way to add materials to a mesh is to is via the 3d editor.
Code: Select all
matref invisible ## each face after this will use the material, until another material is specified
face
vertices 0 282 70 134
normals 0 282 70 134
endface
face
vertices 1 199 17 135
normals 1 199 17 135
endface
matref cross #this is the new material
face
vertices 0 2 1
normals 0 2 1
endface
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.
- Mark_IV
- Private First Class
- Posts: 157
- Joined: Wed Aug 25, 2010 12:24 am
- Location: Actually joined 2004 or 2005 as tyjr ;)
Re: Meshes
So when you say the matref invisible thing, I use that once and ALL the faces use that texture? For what I'm doing that's fine. And is it actually 'matref invisible' as a code, or is that an example, and I put 'matref *Material Name*'
- Cobra_Fast
- Dev Monkey
- Posts: 322
- Joined: Sat Oct 07, 2006 11:51 am
- Location: Germany
- Contact:
Re: Meshes
All faces below the matref line use that material. So you can assign different materials to groups of faces without attaching the matref to each single face.
- Mark_IV
- Private First Class
- Posts: 157
- Joined: Wed Aug 25, 2010 12:24 am
- Location: Actually joined 2004 or 2005 as tyjr ;)
Re: Meshes
Okay, thanks. This makes it much easier to materialize my object.Cobra_Fast wrote:All faces below the matref line use that material. So you can assign different materials to groups of faces without attaching the matref to each single face.
- optic delusion
- Special Forces
- Posts: 1054
- Joined: Sat Sep 25, 2004 2:29 pm
- Location: Planet MoFo
- Contact:
Re: Meshes
Yeah, but there's no way to know which face is supposed to have which material... You can only do this if your object has only one material.
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.
- Mark_IV
- Private First Class
- Posts: 157
- Joined: Wed Aug 25, 2010 12:24 am
- Location: Actually joined 2004 or 2005 as tyjr ;)
Re: Meshes
Perfect, my object is only 1 material XDOptic Delusion wrote:Yeah, but there's no way to know which face is supposed to have which material... You can only do this if your object has only one material.