Hi, I have tiled texture. 8 rows and 4 Columns texture. Each column and row have different texture. I made in photoshop. But I don’t know how to map the texture correctly. For example if I have house building mesh, the outer wall texture has been in place 8th row and 2nd column and inner house texture is in 6th row and 4th column. I have different vertex color
in mesh for each texture. My problem is now I have single texture, how do I map texture correctly to outer walls and inner walls using vertex color. Sorry for bad English. Please let me know if you don’t understand question. Thanks.
Unfortunately, it’s not the usual way to do things. Two solutions are:
- Use
to extract the part you need. But you’ll need to make a material instance, and change the parameters for each part of the building.
- Setup UVs on the mesh in an external package ( like Blender / Maya ), then you can use a normal material.
Hi clockworkocean, thanks for your amazing reply. The first method is what I was searching for. I did like to know the first method. But unfortunately I don’t know how to use it. Kindly please can you provide me with some examples. Thanks.
So I took what is actually a flipbook material ( usually for animating particles ) and made this material
You can see, it’s 6x6.
You have to supply the node with the size in rows and columns, and the UV and which frame you want to display. The I made a material instance from that ( right click in the content browser ), and I can choose which frame to show:
Hi clockworkocean, thanks for your reply. But it doesn’t work me. My problem is I have only 1 texture for all buildings. In this texture I have 8 row 4 column. In this building I need only 8 tiled texture from this texture. First of all it was given to me by my friend. He asks me to map those texture correctly. In this mesh I have 8 vertex colors and he gave 8 parameter values which says at which position the image was. Each vertex color is unique. For example outer wall is coloured blue and inner wall is colored green and the stairs coloured red. My aim is to map this texture to mesh. Is it possible to map using vertex color. Please help me. Thanks.
For example, if I have a plane subdivided to 1x3 which means 1 row and 3 columns. I have a 256x256 texture. In this texture I have 2x2 tiled numbers. Numbered from 1-4. I have different vertex color for 1x3 plane which means I have 3 different color for each subdivided plane. Now in need to map number 2 from texture to first plane and number 1 to second plane and number 4 to 3rd plane. I don’t know how to do this. Please help me. Can this be mapped using vertex color. Thanks in advance
Ok, so you have to split then texture up using vertex color. The mesh is already vertex colored, apparently. Lemme think about it.
This is a really long way round of doing things…
What I don’t understand, is you can only have 3 vertex colors, so how are you going to split up any more than 3 parts of a texture?
From the above image you can see i was able to apply texture to red,green,blue vertex color but i wasn’t able to apply texture to yellow vertex color. please tell me how to apply texture to yellow(1,1,0).
I was able to split each texture from that single texture in material editor. But now I don’t know how to apply those split texture to each vertex color in mesh. For example I was able to split outer wall texture and inner wall texture in material editor. But I don’t know how to apply outer wall texture to blue vertex color and inner wall texture to green vertex color and stairs to white vertex color. This is new to me and I was able to learn different things. Thanks.
If I drag RGB from vertex color and multiply with constant 3 vector with values R=1,G=1,B=0 i get yellow color, but when I connect the output to alpha in lerp node I get output with saturated yellow colou layerd top. I don’t know how to texture yellow vertex color. All the vertex color have Red(1,0,0), Green(0,1,0), Blue(0,0,1), Yellow(1,1,0), Pink(1,0,1), Black(0,0,0), White(1,1,1).
That looks like a very good attempt. Do you at least get some of the textures showing on the model correctly?
Trouble with yellow, is it’s a perfect mix of red and green. It’s exactly halfway. Right now, I can’t think of a way of getting that to work with the current setup.
EDIT: I think you might need to do it with IF nodes. I must say, your friend could have given you the material, or just mapped some UVs… :-/
EDIT2: Will come back later…
Yes I was almost done. If I was able to lerp yellow color I will finish. But i don’t know how. Almost I was able to map 3 uv’s.
I’m just checking this out
back soon...EDIT: I saw this on my travels, maybe it helps. But I give up. Just put the mesh in blender and give it UVs would be much easier…
Ok clockworkocean, thanks for your effort to find it. I will follow uv unwrap in blender. And if I was able to figure it out I must post here. Again thanks a lot.
Sorry to not be much help… :-/ I’m sure it is very possible, but ‘why’?..
You really don’t want to turn it into a workflow.
Hello clockworkocean. I am happy to say that I found a solution. That is when we need to apply texture to yellow color it is so simple. For instance I said it is pure yellow so pure yellow is a mix of red and green so if we multiply red and green channel of vertex color we can mask out yellow color. Happy that I found it. Thanks.