Home Technical Talk

[UNREAL ENGINE 5] Nanite + Procedural Curveture maps and Dirt maps.

interpolator
Offline / Send Message
OccultMonk interpolator
Is there a way to create procedural curvature maps and dirt maps in UE5? I would imagine UVW's would not be strictly necessary anymore for non-game/concept environments if you can use procedural texturing with tri-planar mapping + procedural curvature and dirt maps.

Renderers like Arnold or Corona can create dirt maps and cavity maps on the fly during rendering based on topology. Since Nanite stores so much detail compared to previous methods it would make sense to skip creating UVW's altogether (for concept work).

Would this be technically possible at some point? I found this screenspace Cavity map (but maybe there are better (non-screenspace) solutions):

https://www.youtube.com/watch?v=Qmi9LgH5N2E&ab_channel=MarkSerena



Replies

  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    I know we're a step closer, but Nanite isn't the death of UVs. Textures still compress better and Nanite works best with virtual textures, which obviously require UVs ergo you shouldn't think of Nanite as the death of UVs.

    AFAIK Unreal doesn't offer an out of the box way to generate procedural maps. My personal opinion is that I always found Arnold's procedural maps to be a bit annoying to control and gimmicky, so I suppose I don't see the point in replicating that. They might do for some background objects.

    That said. Nanite may have given us something that once seemed impossible but please be careful if you're thinking of doing large scale projects with ideas like this. Restrictions of real-time still do apply.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    You can generate quite a lot of things from the mesh itself - curvature included. 
    in most cases though, if it was a good idea to do it in a shader then we'd already be doing it instead of paying for a texture. 
    A texture will go faster and look better in all the situations you list
  • OccultMonk
    Options
    Offline / Send Message
    OccultMonk interpolator
    I understand, but I do not want to use it for a real-time game, just for concept and personal stuff. I have used Corona renderer procedural maps frequently and I do not see a good reason why this would also not be possible with Unreal engine. I totally understand Nanite will not replace UVW's. I am just not as interested in doing UVW + baking of curvature on very complex assets when I can just import them and use general procedural texturing (for instance for metal objects). 
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    "Is there a way to create procedural curvature maps and dirt maps in UE5?"

    "I understand, but I do not want to use it for a real-time game, just for concept and personal stuff."

    What are you actually trying to do ? Your first post is asking for a way to generate these things inside UE, while your last post seems to suggest that you only need UE to read the data, not generate it.

    UE can read vertex colors and use them in materials like any other color information, so if your need is indeed merely for UE to read vcol data from your mesh then it's always been possible, without even needing the new tech.
  • thomasp
    Options
    Offline / Send Message
    thomasp hero character
    If there's already a working solution in a proper renderer - why do concepting in a realtime engine at all? All that time spent importing and fiddling in some obscure dialog and compensating for the kind of optimizations built for games when you could instead set up a nice reusable, script-able scene in the 3d app of choice and use proxies/references to load the highres geo only at render time? All the flexibility and none of the engine headache or am I missing something?

  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    @pior I think you misread that last sentence a little, or my comprehension is failing me. I think he's talking about having all the necessary precomputation done automatically in engine and applied automatically at the shader level, so from an artist perspective you just import a model and invoke the magic words: "Hell yeah I want rough edges" and there they are.

    @OccultMonk Similar to what thomasp has said about scripting in engine may be a waste for concepting.

    Just a thought, something that would be kinda useful in a game engine however is a smart material library in engine, that when one is applied to a mesh, it will automatically bake the mesh maps required. Skipping the step of opening up Substance Painter or Quixel Mixer. This really is just a convenience though, and you'd have to make sure your material slots and UVs are configured up front for this.
  • OccultMonk
    Options
    Offline / Send Message
    OccultMonk interpolator
    It's quite simple, I prefer UE5 because I get instant results at almost a render quality. Not to mention the great viewport performance. Iterating renders is extremely tedious work. UE5 excels at rendering environments and if you want to combine characters and environments it's much faster to iterate and view results instantly. We are going this way eventually anyway. For my workflow, I just need Cavity and dirt maps and tri-planar mapping for most assets. And I can always do some UVW work where necessary. 
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    The simplest way to generate an accurate a curvature map is through genererating it from a tangent space normal map. And that does require uvs. Just saying. 

    I've checked out a lot of ways to do this when I was making a material function for unreal for this.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    Axi5 said:


    Just a thought, something that would be kinda useful in a game engine however is a smart material library in engine, that when one is applied to a mesh, it will automatically bake the mesh maps required. Skipping the step of opening up Substance Painter or Quixel Mixer. This really is just a convenience though, and you'd have to make sure your material slots and UVs are configured up front for this.
    - I'm pretty certain you can do that with a blueprint - including the autounwrap. @Obscura  will know for sure

    I prefer to do it at export time via substance automation toolkit since you can change the bake processing part later without writing new code 
  • thomasp
    Options
    Offline / Send Message
    thomasp hero character
    It's quite simple, I prefer UE5 because I get instant results at almost a render quality.
    Fair enough. Don't you have the issue though that UE culls very small geometry aggressively as you move the camera away? Not to mention that you have to go through all the textures, making sure they receive the least amount of compression possible. And despite all that I find rendering quality on dithering/masked textures pretty underwhelming. Light and shadow settings too are spread across rather obscure places at least in UE4.
    I find it a lot of tedious work to fight the realtime optimization when I'm after the best image quality. Not to mention having to reimport for every small mesh and texture change and having to replicate the scene organization. UE also takes over my machine when I'm rendering high resolution screengrabs, making it necessary to close down other GPU-accelerated apps else it produces garbled output or outright crashes.

    Can you do region renders in UE btw?


  • OccultMonk
    Options
    Offline / Send Message
    OccultMonk interpolator
    Having the ability to kitbash environments and see the results instantly is an advantage. I am planning on having characters in the foreground mainly, so culling of small details will probably be less of a problem. But I agree with you that there are still many possible problems with models and textures that could crop up. Still, I don't really understand why there are no procedural ways to generate curvature/Dirt/AO as in renders like Corona Renderer.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Curvature/ao is generated by sampling the mesh or a normal map multiple times with some offsets in different directions and comparing it to the center sample. Imagine sampling those million poly meshes multiple time in realtime. Caching out the result into a texture would make a lot of sense, but you dont want uvs. so...

    They could be both generated in screen space too, but thats kind of unstable especially near the edges of the screen so this method is not ideal for texturing stuff with it.
  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    poopipe said:
    Axi5 said:


    Just a thought, something that would be kinda useful in a game engine however is a smart material library in engine, that when one is applied to a mesh, it will automatically bake the mesh maps required. Skipping the step of opening up Substance Painter or Quixel Mixer. This really is just a convenience though, and you'd have to make sure your material slots and UVs are configured up front for this.
    - I'm pretty certain you can do that with a blueprint - including the autounwrap. @Obscura  will know for sure

    I prefer to do it at export time via substance automation toolkit since you can change the bake processing part later without writing new code 
    Yeah just requires a little dev
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    So. I just checked it out , and the editor modeling tools allows you to do what you want. It can auto unwrap meshes, and also bake different kind of textures including ao and curvature.
  • OccultMonk
    Options
    Offline / Send Message
    OccultMonk interpolator
    I want to use high-density decimated meshes mostly, and am afraid it might now work well on 3-5 million poly objects. I could also use RizomUV since it's kind of made for auto seams/packing. But it just does not work that well with dense meshes either. I hope the upcoming Unwrella 4 plugin for 3dsmax will work better (as it is primarily geared towards decimated meshes also. 
  • oglu
    Options
    Offline / Send Message
    oglu polycount lvl 666
Sign In or Register to comment.