Texture Mapping
- Mopar Madness
- Private First Class
- Posts: 169
- Joined: Mon Jul 03, 2006 3:31 am
Texture Mapping
Is there a way to make textures on narrow meshbox walls not squish themselves without converting the meshbox to a mesh? There's a link below to a pic of what I'm talking about, with 2 long thin meshboxes coming together. Is converting the meshbox to a mesh the only way to fix it? Can a texture matrix fix it? If so, do I need a different texture matrix for each box like that, or will 1 do?
http://img91.imageshack.us/img91/2461/bzfi0163x.png
http://img91.imageshack.us/img91/2461/bzfi0163x.png
Re: Texture Mapping
so basically you dont want the grey part to appear like that? you can try a texture matrix to make the picture look bigger. http://my.bzflag.org/w/TextureMatrix and i think you can use a box instead of a meshbox. take a look at this link. http://my.bzflag.org/w/Box and see the the choices of having sides matref. figure out which side is which and use texture matrix to rescale the image using fixedscale. now i can assume you will only use this method to edit that picture so i suggest making to materials with the same image but one with the texture matrix. i hope this makes sense.
allejo
allejo
- Mopar Madness
- Private First Class
- Posts: 169
- Joined: Mon Jul 03, 2006 3:31 am
Re: Texture Mapping
Man, I wish someone woulda told me new versions of BZFlag could do that xD cool, thanks, now lets hope that fixes it .
- Mopar Madness
- Private First Class
- Posts: 169
- Joined: Mon Jul 03, 2006 3:31 am
Re: Texture Mapping
it worked! Thanks a ton! Now does the server just have to be 2.0.9 or newer for everyone to see it, or will people with 2.0.8 or older version only see regular boxes?
Re: Texture Mapping
wow im surprised you were able to understand what i meant
correct me if im wrong. not completely sure whether the map design has to do with the client or the version of the server. if its the client then no 2.0.8 people wont be able to see it. if its the server the yea they probably will be able to see it.
correct me if im wrong. not completely sure whether the map design has to do with the client or the version of the server. if its the client then no 2.0.8 people wont be able to see it. if its the server the yea they probably will be able to see it.
- Mopar Madness
- Private First Class
- Posts: 169
- Joined: Mon Jul 03, 2006 3:31 am
Re: Texture Mapping
I've made a few maps over the years, so I know the basics about how map coding works . I learned to make maps on 2.0.8 so I never got the message that they changed boxes to work like meshboxes if needed.
Re: Texture Mapping
bzflag 3.0 has a new texturing mode that automatically lines up the
texture coordinates for faces along the same plane. It can be controlled
using the material texautoscale property. You can still use the texsize
property in box and pyramid objects for "fixed" generated texture
coordinates (texsize generated coordinates get stretched when using
scaled groups, texautoscale coordinates do not).
texture coordinates for faces along the same plane. It can be controlled
using the material texautoscale property. You can still use the texsize
property in box and pyramid objects for "fixed" generated texture
coordinates (texsize generated coordinates get stretched when using
scaled groups, texautoscale coordinates do not).
- Mopar Madness
- Private First Class
- Posts: 169
- Joined: Mon Jul 03, 2006 3:31 am
Re: Texture Mapping
When making meshes, I know you have to put inside points in the mesh to keep tanks and bullets from being sucked in, but I don't know where to put them or how many to put in. Could someone help me on this? Also what are normals, where do you put them, and what are they for? If you need the coding for the mesh, here it is, it's a little long. It's gonna be used in a map that's just about finished. All it needs is small texture fixes and debugging this mesh.
Code: Select all
Mesh
name mesh1
vertex 495 205 0
vertex 500 200 4
vertex 500 230 4
vertex 495 225 0
vertex 285 230 4
vertex 290 225 0
vertex 290 -225 0
vertex 285 -230 4
vertex 500 -230 4
vertex 495 -225 0
vertex 495 -205 0
vertex 500 -200 4
vertex 480 -200 4
vertex 480 -205 0
vertex 475 -200 0
vertex 450 -200 0
vertex 445 -205 0
vertex 445 -200 4
vertex 315 -200 4
vertex 310 -205 0
vertex 310 205 0
vertex 315 200 4
vertex 445 200 4
vertex 445 205 0
vertex 450 200 0
vertex 475 200 0
vertex 480 205 0
vertex 480 200 4
face
vertices 0 1 2 3
matref Rock_Bed
phydrv Water
endface
face
vertices 3 2 1 0
matref Rock_Bed
phydrv Water
endface
face
vertices 2 3 5 4
matref Rock_Bed
phydrv Water
endface
face
vertices 4 5 3 2
matref Rock_Bed
phydrv Water
endface
face
vertices 4 5 6 7
matref Rock_Bed
phydrv Water
endface
face
vertices 7 6 5 4
matref Rock_Bed
phydrv Water
endface
face
vertices 6 7 8 9
matref Rock_Bed
phydrv Water
endface
face
vertices 9 8 7 6
matref Rock_Bed
phydrv Water
endface
face
vertices 8 9 10 11
matref Rock_Bed
phydrv Water
endface
face
vertices 11 10 9 8
matref Rock_Bed
phydrv Water
endface
face
vertices 10 11 12 13
matref Rock_Bed
phydrv Water
endface
face
vertices 13 12 11 10
matref Rock_Bed
phydrv Water
endface
face
vertices 12 13 14
matref Rock_Bed
phydrv Water
endface
face
vertices 14 13 12
matref Rock_Bed
phydrv Water
endface
face
vertices 15 16 17
matref Rock_Bed
phydrv Water
endface
face
vertices 17 16 15
matref Rock_Bed
phydrv Water
endface
face
vertices 16 17 18 19
matref Rock_Bed
phydrv Water
endface
face
vertices 19 18 17 16
matref Rock_Bed
phydrv Water
endface
face
vertices 18 19 20 21
matref Rock_Bed
phydrv Water
endface
face
vertices 21 20 19 18
matref Rock_Bed
phydrv Water
endface
face
vertices 20 21 22 23
matref Rock_Bed
phydrv Water
endface
face
vertices 23 22 21 20
matref Rock_Bed
phydrv Water
endface
face
vertices 22 23 24
matref Rock_Bed
phydrv Water
endface
face
vertices 24 23 22
matref Rock_Bed
phydrv Water
endface
face
vertices 25 26 27
matref Rock_Bed
phydrv Water
endface
face
vertices 27 26 25
matref Rock_Bed
phydrv Water
endface
face
vertices 26 27 1 0
matref Rock_Bed
phydrv Water
endface
face
vertices 0 1 27 26
matref Rock_Bed
phydrv Water
endface
end
Re: Texture Mapping
if you want to put normals (which im not sure what they are for) but just create ur mesh with a 3d editor such as wings 3d or blender. as for inside points put them inside the mesh if its a 3d shape where any vertex goes into the shape (concave for 2d shapes, not sure if thats what its called for 3d) just use one. if not put the inside points just inside the each vertex.
- Mopar Madness
- Private First Class
- Posts: 169
- Joined: Mon Jul 03, 2006 3:31 am
Re: Texture Mapping
do I include the inside vertex in the vertices list for each face?
- Mopar Madness
- Private First Class
- Posts: 169
- Joined: Mon Jul 03, 2006 3:31 am
Re: Texture Mapping
I tried adding the inside points and it didn't fix the problem, bullets and tanks still went in. Besides that problem, the maps just about ready. There's a few other small problems like spawns and flag spawn zones also not cooperating, and small glitches, but that mesh is the only big issue.
- Spazzy McGee
- Sergeant Major
- Posts: 1405
- Joined: Mon Mar 21, 2005 4:59 pm
- Location: Planet MoFo, Sheffield Division; United Kingdom
Re: Texture Mapping
A better way to explain inside points:
You need to have inside points placed so that all of the volume inside your mesh is in 'line-of-sight' of at least one inside point.
So if you had a cube or sphere object, you would only need one inside point in the middle of the mesh, because all of the inside of the mesh can 'see' the inside point.
However, if you had a dumb-bell, or bone-shaped object, you would need two inside points - one at each end of the mesh. This is because, no matter where you place one inside point, part of the inside of your mesh will not be able to 'see' your inside point.
Another way to think about it, is that an inside point defines all the inside around it, until it hits the back of a face.
Hope that makes sense.
You need to have inside points placed so that all of the volume inside your mesh is in 'line-of-sight' of at least one inside point.
So if you had a cube or sphere object, you would only need one inside point in the middle of the mesh, because all of the inside of the mesh can 'see' the inside point.
However, if you had a dumb-bell, or bone-shaped object, you would need two inside points - one at each end of the mesh. This is because, no matter where you place one inside point, part of the inside of your mesh will not be able to 'see' your inside point.
Another way to think about it, is that an inside point defines all the inside around it, until it hits the back of a face.
Hope that makes sense.
"Life is what happens to you while you're busy making other plans." - John Lennon
Re: Texture Mapping
Wow, great explanation.. could you throw it up on the wiki
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
- Mopar Madness
- Private First Class
- Posts: 169
- Joined: Mon Jul 03, 2006 3:31 am
Re: Texture Mapping
yes, that was a great explination
- Mopar Madness
- Private First Class
- Posts: 169
- Joined: Mon Jul 03, 2006 3:31 am
Re: Texture Mapping
It's still giving problems, although its much better than it was, only tanks get sucked in now. Can the mesh see the inside point through other boxes and stuff?
Add spawning completely sealed inside a box to the list of map problems. There's only 1 box causing it. This map's driving me nuts, I'm thinking about dumping it and it's at least 96% done.
Add spawning completely sealed inside a box to the list of map problems. There's only 1 box causing it. This map's driving me nuts, I'm thinking about dumping it and it's at least 96% done.
- Spazzy McGee
- Sergeant Major
- Posts: 1405
- Joined: Mon Mar 21, 2005 4:59 pm
- Location: Planet MoFo, Sheffield Division; United Kingdom
Re: Texture Mapping
Other boxes don't affect it. We couldn't really diagnose your problems without seeing the actual code/map file.
"Life is what happens to you while you're busy making other plans." - John Lennon