Page 1 of 1

Texture question

Posted: Sun Jan 15, 2006 6:41 am
by Mostly Harmless!
Is it possible to make a texture stretch over an object rather than tile? If so, how?

third time today I got this question

Posted: Sun Jan 15, 2006 8:13 am
by optic delusion
with a texture matrix, or texsize


you can use texsize in your object... I have used it but I'm not entirely sure how to explain it, so I won't. there's three numbers.. texsize and fixedscale can be used at the same time. texsize is easier.


Or in a matrix...scale or fixedscale
use fixedscale followed by two numbers (in my experiance, fixedscale is easier than scale)
the first number will multiply the texture's width, the second it's height.
so--- fixedscale 2 2 --- in the matrix will make the texture twice the size. you need to experiment to make it look right. (I have used numbers as high as 400)
the problem with this is you need to make a new matrix to match every size of object.

also.. you can re-center your texture using center...
make it move with shift or spin...

an example.
#first define the matrix
textureMatrix
name bigringtrix
fixedshift 45 44.9 #this is a slight move to the left, to match 2 objects next to each other
center 0 0
fixedscale 2 4 #twice as wide, four times the height
end

# next define the material and texture, using texmat
material
name matbigring
addtexture title.png
color 1 1 1 1
texmat bigringtrix
end

# now use the material inside the object, using matref
arc
name bigringr1
divisions 8
angle 45
ratio .1 # (outrad - inrad) / outrad
position 0 0 0
specular 0.5 0.5 0.5
shininess 64
size 450 450 20
rotation 0
smoothbounce
#drivethrough
#shootthrough
matref matbigring #here
groupalpha
# phydrv ringspin
texsize 10 1.4 1.4 1
end

Posted: Sun Jan 15, 2006 4:49 pm
by Mostly Harmless!
How do the two numbers beside fixedshit work?

Posted: Sun Jan 15, 2006 5:12 pm
by optic delusion
ShiFt (or spin) gives you a texture that moves all the time.
fixedshiFt gives you a texture that moved exactly once.

Posted: Sun Jan 15, 2006 9:42 pm
by ClayOgre
You can also use texture mapping, but that is a whole 'nother ball of wax. If you do your own mesh's check out http://www.davidbrinnen.com/tut_wings_3.html.