What is the Rock texture?

Questions and answers about the how and why of making maps.
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

What is the Rock texture?

Post by BIYA »

I'm trying to find the rock texture so I can make my map look better... Does anyine know what it is??
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

"wall" was the texture that I used on my "lousy rock" model.
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

I know that you can make it any texture you want but im haviong trouble finding the txt line for the rock textures..... I keep adding the rock textures but then it changes my escalator texture to no texture at all.....
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

what are you puting in on what object?
ImageJeffM
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

Im trying to put the wall texture on the rocks. But when ever I get the texture on there my escalator texture changes. Even on occasion my escalator "Belt" stops working.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

well..

it would help if you showed us what you had in the map for that. Then we could see what you were doing.

Or we can just guess......
ImageJeffM
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

I erased this so it will be easyer to read the posts.....
Last edited by BIYA on Fri Feb 04, 2005 12:48 pm, edited 1 time in total.
User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe »

:shock: :shock: :shock: :shock: :o :o :o :o :o BIG POST :D
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

actualy all I wanted was the object that had the problem.

what material, and object are you trying to do this to?

on a quick glance.....

1) why are you not using material names, it' helps a lot, matref numbers are hard to deal with, and are VERY order dependent. Use names.

2) why are you using addtexture? Your not doing multipass so just a texture callout is fine.
ImageJeffM
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

Well that is why I need your help.. I dont quite know all the stuff yet. If you would show me an example of the stuff I did wrong please. Im actually the farthest on the mappers forum on all of this stuff.
User avatar
Valoche
Private First Class
Private First Class
Posts: 69
Joined: Fri Dec 20, 2002 5:39 pm
Location: France/Grenoble

Post by Valoche »

JeffM2501, according the the bzw man pages, "addtexture" adds a texture, "texture" sets the active texture.

So according to those, we should write:
material
...
addtexture boxwall
texture boxwall
...
end

Obviously there is no point in doing this, either line alone does the job. Maybe there are some optimizations in the map file parser? Or am I misunderstanding something?
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

yeah addtexture is used for doing more then one texture the "multi" part of multitexture". It' pointless to use if there is a single texture, or if the texture or material dosn't have alpha, since it's going to replace the thing anyway. This is why I sugest just texture for most things, it produces the same results consitstently.



(.)BIYA(.)
Tell me what your trying to do, are you just trying to make an object with the rock texture and a physics driver? if so what kind of bobject?
ImageJeffM
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

Okay... I want to add the wall texture to the rocks on my map so they dont look like icebergs anymore. I have got the texture on it before but then my escalator texture ( Which actually works ) changes to white ( or no texture ). I want to add texture to both of my objects escalators, and rocks.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

ok so show me just the objects and materials your having a problem with.

Break it down into a map with just the problem things, 1 escalator and it's associated material and driver.
ImageJeffM
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

I erased this to make it easyer to read posts..
Attachments
warzonerelaoded.bzw
Full map file.
(37.23 KiB) Downloaded 207 times
Last edited by BIYA on Sat Feb 05, 2005 9:05 pm, edited 1 time in total.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

your first material ( aka matref 0 ) is just this

Code: Select all

material
end 
so it dosn't have a texture ( or anything for that matter ).

in your rock define your calling

Code: Select all

matref 0
so it's using the first material

this is why names are better.

I think what you want to do is change.

Code: Select all

material
addtexture wall
end 
to

Code: Select all

material
name rock_texture
texture wall
end 
then in your rock define instead of

Code: Select all

matref 0 
put

Code: Select all

matref rock_texture 
also you only need one call per object to matref, not on a per face bassis, if they are all the same texture

By using names you explicitly call out a material, and it's not dependent on where that material is in the file. Also if the material is missing or has a problem, bzfs will tell you in a message and it helps a lot in debuging the map.
ImageJeffM
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

THANKS a bunch
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

thanks for your help... but im in need for some more help on these texture NAMES.. Like for spheres is it
material
name sphere_texture
texture boxwall
end


I need some help on the names as you can see. And is the pyramid texture called pyr? or just pyramid?
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

you can make the names what ever you want,

you can call it your_momma if you want too :). and you can have as many as want. It's one per object type.

when you define the object, you put a matref call in it, that tells the game, for that instaance of that object, make it use that material.

you can make one sphere use one material, and another use another material. You define a material per sphere that you have in the map, or per arc or whatever.


an exampleish thing

Code: Select all

material
name sample_1
texture wall
end

material 
name sample_2
texture boxwall
end

sphere
name sample1Sphere
matref sample_1
...
...
..
end

sphere
name sample2Sphere
matref sample_2
....
....
....
end
That would make 2 spheres, well once you filled in the other data for them, one with the wall texture, one with the boxwall texture.

the names can be anything you want.

There are some names to overide the default materials in game, like the link materal and ground material. But these are special cases, for things that arn't in the map as objects ( there is no object for the ground, so it has to be handled special ).

For objects you use the matref commands to say what you want each object to use for a material, if you want it something other then the default.
ImageJeffM
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

I can call it anything I want? but I have to put texture wall.. I SEE. thanks again.. But I still need to know if its called pyr or pyramid.

Example
Texture pyr
or
Texture pyramid

O and does it have to have the _ in between it?

Example
your_momma
or
your momma
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

I have been testing alot after you told me this.. What I dont understand at this moment is how do I add texture to pyramids and stuff

is it
pyramid
name ocean <--- I just named it that.

textureMatrix
name spinTop
shift -1.5 0
end

material
name water
diffuse 0.3 0.4 0.6 0.6
addtexture mesh
texmat spinTop
end

matref water
position -175 365 1
rotation 0
size 50 35 0
end
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

Ok a couple things.

The materails and texture matrixes go OUTSIDE of the object. They can be used on any number of objects. That is why you name them.

Scale 0 for an object = BAD.

Old Pyramids can't have materials, you need to use a new meshpyr

Here is your example redone and simplified

Code: Select all

textureMatrix
name spinTop
shift -1.5 0
end

material
name water
diffuse 0.3 0.4 0.6 0.6
addtexture mesh
texmat spinTop
end

meshpyr
name ocean
matref water
position 0 0 0
rotation 0
size 10 10 10
end
Now it looks like your trying to use this for water.
Using a pyramid for this is BAD hack. don't think in 1.10 terms anymore.
If you want a retangle that is water, then define a rectangle, or use the waterlevel command that is made just for making water.

A simple mesh that does a plane with your water texture would look like this

Code: Select all

mesh
name ocean

vertex -100 -100 1
vertex 100 -100 1
vertex 100 100 1
vertex -100 100 1

normal 0 0 1

texcoord -10 -10
texcoord 10 -10
texcoord 10 10
texcoord -10 10

matref water

face
vertices 0 1 2 3
normals 0 0 0 0
texcoords 0 1 2 3
endface

end
You don't even have to make it a plane, make it any convex polygon, or group of polygons in any shape you want. Make a swiming pool, or a pond :). It dosn't even have to be flat, give it some waves, what ever you want. Put it in a group then use it as an object just like a box or a pyramid.

Any object with a scale of 0 in any axis will be considered bad. You have the tools to make the objects you realy want, so you don't have to fake them out with old 1.10.x tricks.

I prefer to use _ instead of spaces, it just makes seleciton and string parsing easyer. The system uses spaces for a deleminator on many things, so using a space may give you undesired results. They are valid on some things, not valid in others. Using a _ will allways give you the results you want as it's never used as a delimator.
ImageJeffM
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

The second code I dont understand. Why cant I just change a texture of a box or somthing? I have seen people do it on the other maps put there. Like they changed it to red or a blue color.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

they used a meshbox.

you can change the material of a meshbox, it has some matrefs. Regular boxes don't.

There may be a default material you can overide to change ALL the regular old "box" objects to a difrent material. But for that you don't use matrefs. Trepan would know more about overiding the default materials.

But with meshboxes you don't realy need to do that since they can take a matref on a per object basis. This would be much more desirable, since you can customise each box to your desired need.

The second section of code is showing you a better way to do water. You are trying to use an infinatly thin pyramid to make a plane. That is NOT what pyramids are intended to be used for. You have the ability to just define a plane, so use it. Don't hack up things by forcing other primitives into doing jobs they wern't meant to do. THe mesh will be better in a number of ways.

1) the mesh will be faster, it won't have 4 extra faces that are squished into the plane of the bottom.
2) you have more controll over the mesh, you can set how the texture is applied, and even the shape, it dosn't have to be a square.
3) You can define the physics of the mesh.You could make the tank float, sink, bob, explode, whatever.
4) The mesh will allways draw correct since it's an explicit mesh.
5) A flat pyramid has a number of physics problems, and may actualy be desuported in futture releases ( it it even works now), a scale of 0 is invalid for any 3d object.

I don't know why you all fear the mesh. it's just an object, it will do what you want, I'd think you all would embrace it.
ImageJeffM
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

So okay a mesh box will be called

meshbox
name ocean
matref water
position 0 0 0
rotation 0
size 10 10 10
end

I dont fear the mesh. I think it is a very useful and hard to understand object. Thats all.

mesh
name ocean

vertex -100 -100 1 ]
vertex 100 -100 1 ]
vertex 100 100 1 ] <--- this I think is the height???
vertex -100 100 1 ]

normal 0 0 1 <- this I dont know what it is

texcoord -10 -10
texcoord 10 -10
texcoord 10 10 <-- I dont know all of this
texcoord -10 10

matref water

face
vertices 0 1 2 3
normals 0 0 0 0
texcoords 0 1 2 3
endface

end


I dont understand how to move it to where I want it. I dont know how to shape it and I dont know what the F it is :)..
Post Reply