B3D File: tex_coord_sets & tex_coords_set_size, why the sets?

Blitz3D Forums/Blitz3D Programming/B3D File: tex_coord_sets & tex_coords_set_size, why the sets?

Knotz(Posted 2004) [#1]
Hi,
[EDIT: not why the sets, but why the components, sorry]

From the B3D specs i understand that every vertex can have up to 8 uvsets and each uv set can have up to 2 components.

I presume the uvsets map to the texture_ids in the brush chunk. However i'm puzzled why there are components, they seem a bit redundant or am i wrong?


Ross C(Posted 2004) [#2]
Well, each brush can have UV-co-ords 0 of UV-co-ords 1 for each set.

http://www.blitzbasic.com/b3ddocs/command.php?name=TextureCoords&ref=3d_a-z

8 textures, each with 2 sets.


Klaas(Posted 2004) [#3]
Hi,
the specs say ... up to 8 uvsets and up to 4 components per uvset.

That has nothing to do with the texture_ids ... each vertex can hold up to 8 texture coordinates wich can have up to 4 informations (simple u/v is 2 ... the x and y position of the vertex on the texture)
The textures are difined through the brush_id in the TRIS chunk


Knotz(Posted 2004) [#4]
I've read the specs a couple of times.

The lightmapped b3d files from gile[s] have, in most basic form, two uvsets with two components. The lightmap uses the second uv component of the vertices. Why not the first component, convention? What is reason to use the second one if you can have unique uv coords only with uvsets?


Klaas(Posted 2004) [#5]
no, gile[s] uses the secound SET for its lightmap ... both sets got 2 components per set ... u = first component and v = second component


Ross C(Posted 2004) [#6]
Knotz, because if you have textures all ready uv-mapped on a model, they will get screwed, as ghile[s] makes up it's own uv-co-ords. So it must use the second set, to not interfere.


Knotz(Posted 2004) [#7]
@Klaas, thanks, I get it. I thought the uvcoords of the lightmap where stored in the 3th & 4th position of the components.

So correct me if i'm wrong, although the B3D spec says that you can have up to 8 different uvsets, only two are "allowed"?


fredborg(Posted 2004) [#8]
The file format allows for 8 different uv sets each containing up to 4 coordinates.

Blitz however is currently only capable of using 2 different uv sets, with 2 coordinates each. (The 3rd coordinate isn't used for standard texture mapping).


Knotz(Posted 2004) [#9]
Thanks all, it's all very clear now.


AbbaRue(Posted 2004) [#10]
Is it possible to set up a texture brush and texture individual areas of a mesh using the uvcoords.
If so does anyone have an example of how this is done.
Thanks!


Klaas(Posted 2004) [#11]
no, the uv's only defins the position on a texture but not texture itself.

To texture individual parts of a mesh they must be divided into surfaces and those surfaces can have different textures.

A surface can only have one brush but a mesh can have multiply surfaces.