Several textures for boxes

hey everyone,

it is possible to map several textures (for example,
a texture for each side) on a box (box-node in combination with phongdirectional-node).

thanks for your support

hello,

I’m still a bit of a noobie, but from what I can tell vvvv only sees 1 mesh at a time.

While it is certainly possible to transform sub-sections of the mesh independently using either the collada or xfile formats I’ve only been able to map 1 texture.

Is this correct, anyone?

If you build a good UV layout in the 3D application of your choice then you can build up a textures/animations in photoshop or afterEffects that work on specific faces of the model.

best,
Sohan

This is possible. You need your xFile to have a subset for each surface, so six for a box. Read here and here for a little more info on getting subsets out.

All you need to do then is input a texture with a spread of 6 into the texture pin in your shader and all will come out on each subset. To get a spread of textures simply spread a string of 6 file names into the fileTexture node.

You can color all your subsets too, just spread a colour IObox into your shader.

ask for more help if needed.

hey xd_nitro

thanks for your feedback

i tryed it with a simple xfile patch, but my textures (see screenshot and patch attached zip) are in some way deformed.

XFile.zip (52.6 kB)

I’m not even seeing the screen grab you’ve done inside vvvv. I can’t see the numbers on your textures.

I’ve tried doing some texture transforms to see if it is an issue with the UV mapping contained in your xFile, but still seeing nothing. This could still be a UV mapping issue. What 3d software are you using and can you look into adjusting the UV mapping so the texture appears correct?

Do you know about texture transforms? Just put a normal transform node into the texture transform pin and play around.

hey xd_nitro

the x-file is out of the xfile-tutorial.
for that reason i don`t understand why the complete textures (with numerbs) not visible and deformed respectivly.

do you now where i can find other suitable examples (box witch 6 subsets)

hmmm. I can’t seem to get any other textures working in this example either.

I’ve knocked up a very quick box in GoogleSketch up for you. Just painted each face a different colour, it’s come out as a 7 subset though so not sure what happening there. Best you download sketchup and the DirectX exporter and have a play really.

testBox.x (5.4 kB)

a helpful node here is VertexDeclaration (EX9.Geometry Mesh) .
it tells that the box.x doesn’t include Texture Coordinates.
for this reason you only see “some average color” of the textures.

solutions:

  • create a new xFile containing also TextureUVData
  • recreate those UVdata using something like Repair (EX9.Geometry Texture UV Data).v4p (to be found at kalle.Modules.EX9.Geometry )

very useful tools thanks kalle.