Page 1 of 1
Making Textures on just one surface
Posted: Thu Jun 01, 2006 12:09 am
by BradW
I'm wondering how one applies a texture to just one face of a meshbox.
Ideally I'd like to put a different texture on each face.
Posted: Thu Jun 01, 2006 1:08 am
by ClayOgre
I haven't messed with it much, but you do it in the matref statement of your meshbox call.
meshbox
name box
position x x x
rotation x x x
size x x x
top matref <material>
end
I think that's the syntax...either that or it is "matref top"
The best way to do it is to make a mesh object and uv-map it, better control of how the texture looks.
below is a direct quote from the bzw man page:
meshbox :=
"divisions" <integer>
| "angle" angle
| "ratio" <float>
| "texsize" <float> <float> <float> <float>
| "phydrv" <physics_driver_name>
| "smoothbounce"
| "flatshading"
| material
| ("top" | "bottom" | "inside" | "outside" | "startside" |
"endside") material
| obstacle
Posted: Thu Jun 01, 2006 5:13 pm
by BradW
Couldn't get startside and endside to work I think instead I'm just going to make a long texture and stretch it out over the whole cube.
Posted: Thu Jun 01, 2006 10:32 pm
by ClayOgre
Yup, I had the same problem trying to use startside and endside...but I also didn't try all that hard. Hoever, your texture probably won't "stretch" over all the faces, without uv-mapping, which is a whole 'nother can of worms.
Posted: Fri Jun 02, 2006 6:44 pm
by BradW
Actually it does, wraps right around a cube.
Sometimes.
It depends.
Posted: Fri Jun 02, 2006 9:20 pm
by ClayOgre
Exactly.
Posted: Fri Jun 02, 2006 9:32 pm
by TD-Linux
If you use size, the texture tiles. If you use scale, the texture stretches.