Home Technical Talk

Dual normal mapping -- form and detail.

Hey all,

Okay, here's my problem. I currently have a tree asset that has a tangent space normal map baked from a higher poly model -- thus requiring unique UV space (UV1). Basically, the object's form. Now, I'm trying to use a tiled UV channel (UV0) to produce a higher detail material normal map and diffuse for the bark and high frequency detail. There are problems though..

1. When using tangent space, like the material's normal map, the shader will require additional tangent space information to be contained in the vertex stream.
2. When using object space the shaders are a lot heavier than when using a single normal map.
3. Baking down both normal maps into an extremely large normal map sounds equally heavy weight as the material normal map tiles quite a few times.

Is there an obvious solution we're missing or is there an industry standard for this scenario? We're trying to keep it as optimized as possible.

Thanks all!

Replies

  • Ryan Clark
    Options
    Offline / Send Message
    Ryan Clark polycounter lvl 18
    To find the optimal solution, you'd need to benchmark each possibility. Any one of them could be best, depending on your software and your target hardware.

    In some scenarios, texture memory will be a bottleneck. Especially if your target platform doesn't have much available.

    In other scenarios, vertex processing might be a bottleneck. Especially if your target platform doesn't accelerate vertex processing, as low-end integrated GPUs often don't.

    To know your own best solution, you need to learn where your own bottlenecks are.

    And if your target is a PC, it's important to benchmark on your min-spec hardware; the best solution for a Geforce GTX 295 may not be the best solution for an Intel GMA 950 ;)
  • motives
    Options
    Offline / Send Message
    motives polycounter lvl 18
    Like ryan says. You need to benchmark what solution gives best performance vs. best result.

    some additional comments: you say "we", does that mean you have some code support or similar? you could look into coding some normalmapblend node to use in your shader. A Lerp deluxe kind of thing maybe?
    Also, i dont know what kind of tree you are making but in my experience most treemodels work aswell without the 1:1 normalmap since vegetation is mostly about silhouette. A good occlusion and the detail normal usually produce some good results, while giving better performance and using less texture memory.

    good luck
  • Eric Chadwick
    Options
    Offline / Send Message
    We had a multi-normalmap blending shader system at one place I worked recently, but it was very expensive, since it basically had to apply lighting multiple times and render the surface multiple times. It was more of a generic system than a specifically-tuned one, so it was a bit unoptimized.

    I would second the suggestion to use a single tiled normalmap for the bark, rather that blending it with a macro-scale map.
  • Whargoul
    Options
    Offline / Send Message
    Whargoul polycounter lvl 18
    You don't need to have a second UV channel with tangent space. You can simply blend the normal maps together, then convert them using the tangent space matrix. This is basically like detail mapping, except with a slightly different UV set. It won't be %100 correct, but it'll be close enough. Can you not just repeat the second map many times using the first UV channel? This will save a lot of memory & speed in the shader.
Sign In or Register to comment.