Nanite and vertex painting

Hi. I have a high-poly, but mostly flat model, let’s say of a wooden wall (one day it will grow to entire house). I want to use vertex colors to paint some details like moss, dirt, etc, but at the same time - I need nanite to handle complicated geometry of non-flat parts: plank edges, damaged places and so on. The problem is that when I enable nanite on the mesh - it eats all my vertices so I can’t paint anything. Painting on a regular mesh works well. How can i solve this and paint my moss on something, that needs nanite? The wall is just an example, it can be anything with complicated and detailed geometry. Painting on original texture is not an option as I’m going to use many similar objects, but with different details on them.

I’m using 5.3.1 if it matters.

2 Likes

It doesn’t make much sense.

Vertex paint uses vertex.

If you remove the vertex in a mesh (using nanite) then why would you use vertex paint?

I seriously doubt they’ll ever patch or adjust the engine to allow this - though I’d love being proved wrong in this case…
Realistically its impossible. They’d habe to generate some sort of runtime render target texture to persist on the item. Not impossible, but it ain’t cheap.

Meanwile…
Assuming you actually want details and such to work, you have to paint textures rather than rely on vertex paint.

You can do so in engine.

First look up render targets.

Second, look up the old tutorial on render targets and water displacement, which as outdated as they are they still teach you some decent basics.

Third, apply what you learned to create a system to paint onto the render-target in editor.

Once happy you probably want to save out the render target image you produce to use it within a non editor material that’s applied to the final object.

So … its a 300 step process between creating the editor only material, the system to paint on the object and the final material to use on the object in the actual release…

Not hard to do, costly to paint, but not necessarily to render out…

Better than but similar to how landscape layer paint works, in theory.

Also, you do have 4 channels to use on the render target, so you can paint up to 4 layers per item if you use utilize the channels as layer masks.

You can do the whole thing the same way outside the engine, which is likely your best bet.

The real problem with that is setting up your DCC to show you what the final product will look like as you paint the texture.
Its probably easier to build it all in engine to be honest.
Particularly when the engine tends to visually render whatever it wants rather than rendering out whatever your PBR materials tell it it should render :stuck_out_tongue:

@SElisei In fact I think you can do this - if you turn nanite off, then mesh paint in unreal, then hit apply and hit save in the mesh paint interface, that seems to be working for me to preserve the painted vertex color on the mesh with nanite on.

1 Like

@MostHost_LA if UV information can be transferred why is vertex color so hard? Not sure that logic holds up.

Vertex painting is still useful for environment art and definitely a feature many experienced environment artists are familiar with using. No need to throw the baby out with the bathwater

Are you a videogame maker? Wtf kind of question is this?

A UV goes from 0 to 1 how its mapped. And it always will no matter what vertex you remove.

Vertex paint is defined Per Vertex. What do you think happens when you remove a vertex?

How/if nanite can handle it is a different story alltogether. By then, its probbaly not vertex paint anymore.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.