Home Technical Talk
The BRAWL² Tournament Challenge has been announced!

It starts May 12, and ends Oct 17. Let's see what you got!

https://polycount.com/discussion/237047/the-brawl²-tournament

Can you vertex paint nanite meshes?

hallowseve
triangle
Offline / Send Message
hallowseve triangle
I'm curious to find out if it's possible to vertex paint nanite meshes. I've come across a few YouTube tutorials, but I haven't seen any official guidance. Can you do it, or is it not recommended?

Replies

  • Fabi_G
    Offline / Send Message
    Fabi_G veteran polycounter
    Hi! For official information, look for the documentation: Paint Vertex Colors Tool  According to that article, it's possible to store vertex color on nanite-enabled assets, however it's not possible to have unique vertex color per nanite-enabled instance. So you could store some information/ masks in vertex color and do instance variation in the shader. As so often, what approach to take depends on what you're trying to make.
  • hallowseve
    Offline / Send Message
    hallowseve triangle
    Thanks for finding it, ill have a read and play around with it :)
  • Ghogiel
    Offline / Send Message
    Ghogiel interpolator
    As mentioned you can vert paint nanite meshes, but you have to "apply" the vert paint which will make every instance of the mesh in the scene take that exact vert paint (any different vertex data breaks nanite instancing between meshes, ie be careful with spline meshes as each segment is not instanced and so on), so if it's important to use the vert colors are a way to add variation between meshes, it might not be the way to go. 

    And you may not want to use vertex color on nanite meshes (Epic says the less per vert data on nanite meshes the better as well). Unreal has a newish solution  that might be able to replace a vertex color in your use case>  you can use the "mesh paint texture object" and "mesh paint texture replace" nodes in the shader instead of vertex color and split RGB channels off the texture instead just like you'd use vertex color. Basically you can store a small res virtual texture per instance of a nanite mesh, which is basically epics current workflow paradigm. 

    I'll mention that because it's texture based UVs, mips, padding make or break it. So in practice you have to look at UV seams and see if things are bleeding or what not. Obviously you can just up the res on the mesh paint texture as its pixel based and sometimes you need more res than a 64x64 or 128x128 is offering.
     

    The other solution might be smashing meshes together, which may or may not work in your use case. So instead of blending in the materials, artists are smushing brick, motar or plaster as 2 separate meshes together. Because nanite has as much geometry as it does, you don't see the usual geometry intersecting in a polygonal way. 



  • hallowseve
    Offline / Send Message
    hallowseve triangle
    ok thanks for the advice, its very useful 
Sign In or Register to comment.