Home Technical Talk

Baking normalmap as diffuse instead of lots of highpolys.

polycounter lvl 14
Offline / Send Message
sltrOlsson polycounter lvl 14
I got some stones i'm doing for a smaller scene. Atm i'm at 1.5k stones with a tris count on 3.5m.. Not very easy to work with.

So my friends ask me, why not bake the highpoly stones, it's five different ones, one by one to a lowpoly version. Like 20-30 triangles. The place them in my scene and apply the normal map as an diffuse and bake diffuse to texture. THEN combine that with a regular normal bake from the low stones.

Wouldn't be any technical difficulties with the normal direction of the LP stones right? Or i'm i thinking all crazy here?

Ofc i would be using tangent base normals..

Replies

  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    I don´t get what you want to do, why would you bake a normal map, apply it as diffuse texture to bake it out again into a texture?

    Makes no sense to me :-/
  • Bal
    Options
    Offline / Send Message
    Bal polycounter lvl 17
    Eh, if you bake a normal map to diffuse on randomly dropped objects, you're gonna lose your tangent basis.
    In xNormal though you can load your rocks, load the normal maps in the "Base texture to bake" slot, and check "Base texture is a tangent-space normal map", that will alow to bake it all in one go (normal maps + mid poly geometry) without messing up your tangent basis.

    Still seems like a kind of convoluted way of doing things, not sure why it would be necessary.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    What app?
    In max im doing the same sort of thing. I am using very low poly proxy stones that have a substitute modifier on them which points to a library of about 20 medium poly stones which are normal mapped from some highpoly models.
    The detail rocks only load at render time so its pretty light to work with.
  • mbknielsen
    Options
    Offline / Send Message
    Remember to do instances of your rocks instead of copies, it will speed up your scene tremendously.
  • Mark Dygert
    Options
    Offline / Send Message
    If you're in max, if you're just looking to lighten the seen up. fletch's proxy model is a good idea. There are a few different ways to do proxy objects or lighten the scene but have the high poly kick in at rendering time.

    If they are all joined into one object detach the all the separate elements that way it can adaptively degrade the objects as you work in the viewport.
    AdaptiveDegradation.jpg

    It only does adaptive degradation on the object level not sub-object so if you have 3mil tris sitting in one object its going to have trouble. But if it can cull a few thousand that are far away from the viewport camera then it will be much faster.

    You can also lighten the load by turning some of them to display as bounding boxes (select object(s), right click, object properties, check on display as bounding box).

    You could also try applying a proOptimizer modifier and turn it off before rendering.

    You could take it into zbrush and run it through Decimation Master which will lighten the load but preserve the detail.
  • sltrOlsson
    Options
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    Bal wrote: »
    Eh, if you bake a normal map to diffuse on randomly dropped objects, you're gonna lose your tangent basis.
    In xNormal though you can load your rocks, load the normal maps in the "Base texture to bake" slot, and check "Base texture is a tangent-space normal map", that will alow to bake it all in one go (normal maps + mid poly geometry) without messing up your tangent basis.

    Still seems like a kind of convoluted way of doing things, not sure why it would be necessary.

    Yeah, that was what i where looking for i guess. Same friend just told me the the exact same way.

    Why? Well, try to get 1500 mid poly stones in to a scene and make them look dynamic. It's really hard to work with.

    Like they bean their for awhile. Not just put there random. I want to use physics on them so that they place nicely. And if i can have a stone that's 20 tris instead of 2000 tris. That will help me ALOT!

    I could have gone with instancing the stones for optimization, but i've found that's hard for maya to export an obj out of that. Or well, the memory runs out.

    And yeah, i use Maya.. But thx for the Max tips (:
  • Brendan
    Options
    Offline / Send Message
    Brendan polycounter lvl 8
    I tried to do a similar thing about a year ago, but instead of rocks, it was a face. If you separate the colours of he normal map in Photoshop and make good use of the layer settings, you can bake the normal onto the diffuse.


    However, all you really got after all that messing about was 90% the same as an ambient occlusion map on top of the diffuse (multiply layer setting); albeit one that handles highlights and brightness just as well as the shadows and darkness.
    Wouldn't really worry about trying it that way in any program.


    I'm curious though; you're exporting them as OBJ for what reason?


    As for your physics, why not just make a low-poly (maybe 20 tris)...thing, then make the hi-poly stones children of that. Only use physics on the blocky-shape with the low detail and it'll scatter your stones faster, I think.
  • sltrOlsson
    Options
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    Brendan wrote: »
    I tried to do a similar thing about a year ago, but instead of rocks, it was a face. If you separate the colours of he normal map in Photoshop and make good use of the layer settings, you can bake the normal onto the diffuse.


    However, all you really got after all that messing about was 90% the same as an ambient occlusion map on top of the diffuse (multiply layer setting); albeit one that handles highlights and brightness just as well as the shadows and darkness.
    Wouldn't really worry about trying it that way in any program.


    I'm curious though; you're exporting them as OBJ for what reason?


    As for your physics, why not just make a low-poly (maybe 20 tris)...thing, then make the hi-poly stones children of that. Only use physics on the blocky-shape with the low detail and it'll scatter your stones faster, I think.

    I don't wnat any diffuse info from the normal map. Just the normal map it self.. I from what i understand i can bake a AO to the LP stones and bake it in xnormal the same way.

    Your idea about the paranting is a pretty nice idea! Though, if i'm happy with what the xnormal bake thing gives me, i'm gonna go with that.

    And why OBJ? Dun know.. Maybe SMB is better for xnormal bakes?
  • Justin Meisse
    Options
    Offline / Send Message
    Justin Meisse polycounter lvl 18
    how about using heightmaps
  • EarthQuake
    Options
    Offline / Send Message
    Max will allow you to bake a NM onto the lowpoly rock, and then bake that onto another object as well. Placing rocks for a tiling texture, is that what you're doing?
  • sltrOlsson
    Options
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    EarthQuake wrote: »
    Max will allow you to bake a NM onto the lowpoly rock, and then bake that onto another object as well. Placing rocks for a tiling texture, is that what you're doing?

    I'm doing a rail module-ish. That's gonna be repeated, so yeah. Pretty much the same as a tiling texture.

    But that the same thing that xNormal does? Is their a difference?

    Hightmaps isn't a bad idea! But wouldn't the normals from my original stone be a bit cranked?

    And oh, this is what i'm doing..

    eskjmg.jpg
  • EarthQuake
    Options
    Offline / Send Message
    You could bake a normal to each of the "lowpoly" rocks in max(I'm assuming you're using max here, correct me if I'm wrong), and simply apply the normals in the rock material, this would bake out as if it were just high res geometry detail. The normals wont get wierd or anything, you dont bake a "diffuse" of the normals, you just do a regular NM bake, max will take into consideration the normals of the "low res normal mapped rocks". You should even be able to preview the results realtime, assuming you only have a handful or so of unique rocks, but maybe performance would still be slow on that many objects.

    Or you bake a height map, and assign this as a displacement map on your low, but you'll need to sub-divide the low and then its not worth it, the normal map thing is super easy.

    Oh also, make sure you soften up the edges of those wood planks(and the rails too?) so they show up well in the bake.
  • sltrOlsson
    Options
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    EarthQuake wrote: »
    You could bake a normal to each of the "lowpoly" rocks in max(I'm assuming you're using max here, correct me if I'm wrong), and simply apply the normals in the rock material, this would bake out as if it were just high res geometry detail. The normals wont get wierd or anything, you dont bake a "diffuse" of the normals, you just do a regular NM bake, max will take into consideration the normals of the "low res normal mapped rocks". You should even be able to preview the results realtime, assuming you only have a handful or so of unique rocks, but maybe performance would still be slow on that many objects.

    Or you bake a height map, and assign this as a displacement map on your low, but you'll need to sub-divide the low and then its not worth it, the normal map thing is super easy.

    Oh also, make sure you soften up the edges of those wood planks(and the rails too?) so they show up well in the bake.

    I'm a maya guy :/ *5 minutes later* I just realized that Maya have the exact same function :P That's great, never looked for it.

    The beams are just 6 sided cubes. The highpolys look like this.

    Cheers!
  • EarthQuake
    Options
    Offline / Send Message
    yeah, those beams look much nicer! =D
  • sltrOlsson
    Options
    Offline / Send Message
    sltrOlsson polycounter lvl 14
Sign In or Register to comment.