Objects - using the texture
4 posters
Page 1 of 1
Objects - using the texture
Could someone explain to me how to deal with texture and its coordinates? I'm trying to make an object (.csv file). I want to fill a rectangular surface (say 3m X 3m, coord.: (0,0,0), (-3,0,0), (-3,0,3), (0,0,3)) with a texture 32b X 32b in size in file texture.bmp. How to use SetTextureCoordinates in this case?
liquid_- Posts : 26
Join date : 2012-05-15
Re: Objects - using the texture
SetTextureCoordinates 0,31,31
SetTextureCoordinates 1,0,31
SetTextureCoordinates 2,0,0
SetTextureCoordinates 3,0,31
SetTextureCoordinates 1,0,31
SetTextureCoordinates 2,0,0
SetTextureCoordinates 3,0,31
Quork- Posts : 1434
Join date : 2012-05-05
Age : 32
Location : Hofheim a.T., Hessen (Hesse), European Union
Re: Objects - using the texture
You are totally wrong, Quork!
Liquid, if you are starting the AddFace with TOP LEFT corner, it goes like this:
SetTextureCoordinates 0,0,0
SetTextureCoordinates 1,1,0
SetTextureCoordinates 2,1,1
SetTextureCoordinates 3,0,1
Let me explain
1st parameter refers to the actual vertex (their indexes start at 0) -> SetTextureCoordinates 0
2nd parameter refers to height of the texture, which is taken from top to bottom of the picture. In the upper left corner of the object you need upper left of the texture. Hence SetTextureCoordinates 0,0
3rd parameter refers to width of the texture, which is taken from left to right. So, in the upper left corner of the object you need upper left of the texture. Hence SetTextureCoordinates 0,0,0
Should you need more detailed explanation, do no hesitate to ask.
Liquid, if you are starting the AddFace with TOP LEFT corner, it goes like this:
SetTextureCoordinates 0,0,0
SetTextureCoordinates 1,1,0
SetTextureCoordinates 2,1,1
SetTextureCoordinates 3,0,1
Let me explain
1st parameter refers to the actual vertex (their indexes start at 0) -> SetTextureCoordinates 0
2nd parameter refers to height of the texture, which is taken from top to bottom of the picture. In the upper left corner of the object you need upper left of the texture. Hence SetTextureCoordinates 0,0
3rd parameter refers to width of the texture, which is taken from left to right. So, in the upper left corner of the object you need upper left of the texture. Hence SetTextureCoordinates 0,0,0
Should you need more detailed explanation, do no hesitate to ask.
Last edited by Derryck on Fri Sep 14, 2012 6:02 pm; edited 3 times in total
Re: Objects - using the texture
Uh yes, sorry. Mixed it up with another format (not BVE). That's what happens when you answer a seemingly simple question while thinking about elsething...
Quork- Posts : 1434
Join date : 2012-05-05
Age : 32
Location : Hofheim a.T., Hessen (Hesse), European Union
Re: Objects - using the texture
Thanks, that worked. As I suppose, if I give numbers greater than 1 ( say 4) as coordinates X and Y this will mean texture will be stretched so that it'll fit 4 times in each of the dimentions of the polygon. Am I right?
liquid_- Posts : 26
Join date : 2012-05-15
Re: Objects - using the texture
Quork wrote:Uh yes, sorry. Mixed it up with another format (not BVE). That's what happens when you answer a seemingly simple question while thinking about elsething...


Re: Objects - using the texture
This guide looks pretty useful. Thanks.
liquid_- Posts : 26
Join date : 2012-05-15

» Brickwork texture required?
» Texture question
» Texture Store?
» Interesting textures website
» The texture photo thread
» Texture question
» Texture Store?
» Interesting textures website
» The texture photo thread
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|