Need some help on texturing

Questions and answers about the how and why of making maps.
Post Reply
User avatar
macsforme
General
General
Posts: 2036
Joined: Wed Mar 01, 2006 5:43 am

Need some help on texturing

Post by macsforme »

I'm building a map with tunnels, and I created a "fake" ground with the std_ground texture. This new ground is effectively a flat plane that has holes in it. I used a mesh with the following code:

Code: Select all

# Fake ground level
mesh
	matref grass
	color 1.0 1.0 1.0 1.0

	# Four corners
	vertex 300 300 25
	vertex -300 300 25
	vertex -300 -300 25
	vertex 300 -300 25

	# Reference
	vertex 300 -125 25

	# Entrance 1
	vertex -155 -125 25
	vertex -165 -125 25
	vertex -165 -115 25
	vertex -155 -115 25

	# Reference
	vertex 300 -25 25

	# Entrance 2
	vertex 205 -25 25
	vertex 195 -25 25
	vertex 195 -15 25
	vertex 205 -15 25

	# Reference
	vertex 300 115 25

	# Entrances 3 & 4
	vertex -165 115 25

	vertex -165 165 25
	vertex -155 165 25
	vertex -155 155 25 
	vertex -165 155 25

	vertex -165 125 25
	vertex -155 125 25
	vertex -155 115 25

	# Entrance 5
	vertex 5 115 25
	vertex -5 115 25
	vertex -5 125 25
	vertex 5 125 25

	# Entrance 6
	vertex 300 275 25
	vertex 285 275 25
	vertex 275 275 25
	vertex 275 285 25
	vertex 285 285 25

	# Faces
	face
	vertices 0 1 30 31
	endface
	face
	vertices 30 1 17 21 25 26 29
	endface
	face
	vertices 25 21 22 24
	endface
	face
	vertices 1 16 17
	endface
	face
	vertices 2 6 16 1
	endface
	face
	vertices 18 19 20 21
	endface
	face
	vertices 22 15 7 8 11 12 23 24
	endface
	face
	vertices 3 5 6 2
	endface
	face
	vertices 3 10 11 8 5
	endface
	face
	vertices 28 29 13 10 3
	endface
	face
	vertices 0 31 28 3
	endface
	face
	vertices 12 13 29 26 23
	endface
end
Please forgive my very messy mesh. ;) I'm really very new to meshes. See the attachment for the result. As you can see, the texture isn't uniform all the way across. It looks like it's stretched, overlapped in all different directions, and has seams in it, whereas I really want it to look like the ground usually does (without the seams, basically). I see a lot of options for meshes in the help file, but I really don't know how to use them. Is there some way that I can make the texture uniform all the way across?

Also, I tried to use the "noradar" option, but apparently it doesn't work for the "normal" radar mode. Is there a way that you can turn of radar rendering for a particular object regardless of the client's radar setting?

Any help would be greatly appreciated!
Attachments
texturing problem.jpg
(167.37 KiB) Downloaded 259 times
User avatar
person1
Private First Class
Private First Class
Posts: 159
Joined: Wed Sep 14, 2005 3:44 am
Location: Omaha, Nebraska

Post by person1 »

hmmm....i tried to do the same thing...with the same result...i tried many different vertex configurations...and added extra points....but never really got it very good looking...

I would recomend using multiple meshes....and/or using thin boxes...that worked best for me.....also I believe that is what tadd does on his map.

Hope this helps :wink:
Image
Image
I not just any person, I am person1
User avatar
khazhyk
Private First Class
Private First Class
Posts: 1400
Joined: Sun Feb 06, 2005 5:40 pm
Location: Somewhere over there.

Post by khazhyk »

try uv'ing it.
Image
User avatar
macsforme
General
General
Posts: 2036
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme »

me1 wrote:try uv'ing it.
Could you be a little more specific? I have only a vague idea of what UV means.
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

Don't bother trying to do meshes by hand, it isn't
worth the effort. Your time would be better spent
learning to use a modeller that will do most of the
work for you.

P.S. UV mapping = texture mapping.

http://en.wikipedia.org/wiki/Texture_mapping

Here is a Wings3D tutorial, the pictures might help
explain the concept:
http://www.geocities.com/peterchov/BarrelUV.html
User avatar
macsforme
General
General
Posts: 2036
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme »

Okay, thanks for the tips. I downloaded Wings3D, and will have a look at it shortly. However, I'm still interested in leaning a little more about the texturing options for bzflag meshes, just for the sake of understanding them so I can tweak them if I need to. Do texcoords and normals have anything to do with it?

Also... any help on the radar question? I can't seem to get my objects to disappear off of the radar when it's in "normal" mode.

Thanks to everyone for their help.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5195
Joined: Fri Dec 13, 2002 4:11 am
Location: https://github.com/OmniTanks
Contact:

Post by JeffM »

yes, texcoords have everything to do with it. they say how the texture is applied to the mesh. there is no "default" mapping.
ImageJeffM
User avatar
macsforme
General
General
Posts: 2036
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme »

JeffM2501 wrote:yes, texcoords have everything to do with it. they say how the texture is applied to the mesh. there is no "default" mapping.
Okay, thanks for the info. I guess I'll just need to experiment. ;)

Can anyone give me just a simple example of a mesh that uses texcoords? I really have no idea even where to begin. I'm not an expert on OpenGL or anything.
Post Reply