Would like to do something fairly simple; still didn’t find the rigth clue
Basiclly I want to externalise vertex colours and write them into a bitmap.
I’m generating a bitmap in another progamm. This bitmap has as many pixeles as my mesh has vertices. I want to apply every colour value one after the other to the mesh vertices (like in the picture)
How does the material need to look like in the ue mat editor?
1 Like
You would need a UV channel that corresponds each vertex to it’s assigned pixel. In Unreal, you can simply use the the “Texture Coordinates” node to select your UV channel and input it to the texture sample node where your image is located. This will map the pixels to the verts.
I would also suggest using the “Vertex Interpolator” node, as you will only need to sample the texture on the vertex, and not the face - so there’s no point executing the instructions on the pixel shader.
1 Like
Thanks for the clarification! I was aware of that path with the uv channel; I did that in the past and it works well.
So there is no way of skipping that part of generating a corresponding UV channel? I think that would be a nice feature is you could just say: Here is a texture; just take the first n pixels and assign them to the n vertices of the mesh…
Not that I’m aware of. I worked on something similar as well. We used a script to loop through the verts and assign them a UV coordinate and write the desired RGB value to our image directly.
1 Like