Blitz3D Docs -> 3D - Category -> Surface -> VertexTexCoords
Parameters:surface - surface handle
index - index of vertex
u# - u# coordinate of vertex
v# - v# coordinate of vertex
w# (optional) - w# coordinate of vertex (unused)
coord_set (optional) - co_oord set. Should be set to 0 or 1.
Description:Sets the texture coordinates of an existing vertex.
See also: VertexU, VertexV.
| This Documentation ist absolute rubbish.|
This "Description" is a laugh.
After more than 3 years Blitz3D there is still not explained, how this Command is actually used!!!
Well - so I can set the texture coordinates for a second texture. And? Where does the Texture come from? From the Mesh? From a Brush? How is a Texture assigned to that second Coordset? How to explain to the Program, which Texture belongs to which Coordset?
A nuisance this all...
Why has every single user to find out how things work on his own?
| Look up the command TextureCoords !|
Had to find it out on my own ;)
| 5 years,nobody explained it,I'll try explain it myself.|
This command will move the vertex coordinates of the texture.
A pointer to the surface where the vertex is.
The index of the vertex to be manipulated.
The U (horizontal) vertex coordinate at the texture.
Itīs a percentual number
(Ex: In a texture of size : 32 x 32, the U=0.5 will be 50%
of the texture width ->16)
The V (vertical) vertex coordinate at the texture.
Itīs a percentual number
(Ex: In a texture of size : 32 x 32, the V=1.0 will be 100%
of the texture height ->32)
The W(3D) vertex coordinate at the texture.
Itīs a percentual number
Almost people doesnīt know what is this coordinate.
What I know about, it is a coordinate that points to a
certain direction.Example : If we have a Quad at our texture that we want to face backwards, we must adjust
the W coordinate.
In my opinion the strangest of all ^^"
Think that we have a terrain with a lot of quads.
If we simple move a vertex UV from this terrain,we
will pass throu other vertexes, "streching" the UV to
that point.This command give us the choice of 2 UV coordinates sets.This way,we can move the UV of the
quad like if it was another object.
| You cannot adjust the W co-ord because it doesn't do anything in blitz. |
| I just read this coincedently. Nothing personal but I have to say: How lazy are you at all? The use of VertexTexCoords is rather trivial.|
If you ever feel like there is a lack of documentation then go to this online manual and search for a term that specifies the family of the command in question, for example "vertex". The site will present a list of links:
I am certain you'll find a lot of examples here, and you should read this all anyway, or at least if you are stuck or don't know exactly what a vertex is.
If you for some reason still cannot find enough information about it, then there is the code archive, offering an excellent base for all kinds of samples. For example, when you watch a code to save or load a mesh, you'll know most about vertices and brushes.
BTW, "Where does the Texture come from? From the Mesh? From a Brush? How is a Texture assigned to that second Coordset?"
This is basic DX7/Blitz3D knowledge and it was explained many times in the forum and most likely also somewhere in the docs. Once you know what a brush is (see brush commands) then you'll know the answers to all these questions.
Just as a quick explanation:
A mesh is the basic entity. It may contain multiple surfaces. Each surface can have up to 64000 Vertices and 32000 Triangles applied to. A brush is used to paint a surface. A Texture can be applied to a brush. Some settings can be made (such as BrushShininess etc.). There may even be additional textures. Two UV-Sets can be used by up to 4 textures by a brush.
Usually the diffuse texture (eg. wall bricks) with index 0 is using the UV-Set 0. If there is a lightmap in texture layer index 1, it will/should use the UV-Set 1. The lightmap is blended to the original texture usually in additional or multiplying blendmode.
If you still don't understand anything of this, you should note that none ever said that 3D Games design is very easy. Learn the basics of 3D game design, that's generic, not part of the blitz3d docs.
| Well said jfk EO-11110 but perhaps 5 years to late... |
| The last argument, 'coord_set', is an indication that your mesh can have 2 UV sets for each vertex - read UV set as in "mapping".|
You can map your mesh twice, if you place one mapping at channel 0 and 1 (or 1 and 2, if your software starts counting channels at 1 instead of 0). If you map twice on the same channel, well, the last mapping will overwrite the first.
2 sets is a limitation imposed by the current B3D loader in Blitz3D. Nothing stops you from having 4 or even 8 UV sets in a B3D file, if your exporter supports such feature.
| However in stock-standard blitz3d - a surface on a mesh while it can have a texture/brush with up to 8 textures assigned, the number of uv sets is still only 2. |
| and that's why these functions have a layerindex :|
Blitz3D Manual Forum
BlitzPlus Equivalent Command