Home Technical Talk

[Maya] Baking the mia_roundcorners effect

sublime tool
Offline / Send Message
Fansub sublime tool
Hello !

This is my first creating a thread in this forum section,long-time lurking i was :D

I have started working with the mia_roundcorners shader in Maya to prototype some quick modeling workflows using it.Everything seems to be working when it comes to creating shapes and applying the shader on them,but things get crunky when i start baking the applied effect.

I found a quick tutorial on how to bake the mia_roundcorners in Maya,but as a total Hypershade n00b i think i didn't set things up correctly on the Setrange node.

Here is the Hypershade node and the Setrange attributes :

1422328719-untitled-1.jpg

Here is my first bake test rendered in M.Toolbag 2 :

1422328075-screenshot012.png

As you can see,it looks pretty decent for a first test,but there are just toooo many errors to make it look great.Some normal angles are flat,others a bit sharper than the smoother ones and so on.

I've tried converting the Object-Space normal map with Xnormal to a tangent space one but it doesn't completely solves the problem.The right objet is using a OBJSPC normal map and the left one a tangent space.

I'm also planning to move to Modo by this year,but this mia_roundcorners technique is just obsessing me :poly122:

Replies

  • Fingus
    Offline / Send Message
    Fingus polycounter lvl 11
    Two things that stood out to me.

    First of all in your setRange node you didn't specify the incoming range (Old Min / Max) to be from -1 to 1, in your screenshot it's 0 to 0.

    Second, it seems like you are getting lighting information baked into your map. Instead of using a Lambert just plug the mia_roundcorners node into the color slot of a SurfaceShader as those don't receive any shading or lighting.

    I've been trying to get this method to work for a while as well. Using the setRange node was the missing piece! This setup seems to work perfectly fine, so thank you a lot for setting me on the right path of finally figuring this crap out! :D

    From left to right: SurfaceShader, blinn with World Space Normals, blinn with Tangent Space Normals.

    Ka1MduZ.png
  • Fansub
    Offline / Send Message
    Fansub sublime tool
    Thanks for the clarifications,and yes,this setrange thingy was really hard to find :D
  • Fansub
    Offline / Send Message
    Fansub sublime tool
    Fingus what are your settings for the Batch Bake process ? i have completed the rounded edges steps but now I'm having some UV Seams all around my hard edges even after splitting my UVs on the given areas :(
  • Fingus
    Offline / Send Message
    Fingus polycounter lvl 11
    Could it be that you need texture padding?

    And if it's the Tangen Space normal converted with xnormal make sure you have the Soften Edge checkbox turned off.
  • Fingus
    Offline / Send Message
    Fingus polycounter lvl 11
    Over the weekend I decided to do an experiment and use this method for something more complex than a cube and a cylinder. Really liking how clean it's coming out with minimal effort. :)

    V8vdWKY.jpg
    ePYVMfC.jpg
    RXUrwIQ.jpg
  • Dylan Brady
    Offline / Send Message
    Dylan Brady polycounter lvl 9
    I mean... thats got to show people that this method is viable. it looks great!
    How much time do you think you saved using this method?
  • Fansub
    Offline / Send Message
    Fansub sublime tool
    Bumping up this thread :D
    How much time do you think you saved using this method?

    I know the question is for Fingus,but i've been experimenting with this workflow for months now and it's REALLY fast compared to some subdy stuff.Now the thing is,it's also hard to get some complex shapes (a la Paul Pepera) without having errors,but it's a pretty solid workflow if you want to do some quick stuff (props or anything hard-surface) and if you have time to crease all your hard edges you can actually go inside Zbrush and convert your ugly topology to some sculpting hard surface topology or even SubD.

    The best integration of this technique so far imho is Modo's rounded edge shader,you can set this thing in seconds and it automatically bakes on you normal map :D
  • llb
    Offline / Send Message
    llb polycounter lvl 7
    Hi Fansub, Fingus,

    I was trying to achieve same thing but no luck so far. basically I try to make mia_roundcorners into a normal map and than give some surface details. I hope you guys know how to do it and can walk me through.
  • Fansub
    Offline / Send Message
    Fansub sublime tool
    Fingus's post should help :)

    By the way,i think the best way to have the rounded edge shader effect in Maya is by using Vray's technique,never actually tried it but i saw a few examples on the web where people use Vray to achieve these effects.
  • Psychotic_Mike
    Offline / Send Message
    Psychotic_Mike polycounter lvl 11
    u should make a tutorial! This is an amazing feature nice job!
  • Fansub
    Offline / Send Message
    Fansub sublime tool
    Will be posting one soon :)

    I'm currently working on a ( free ) Quixel Suite 2.0 tutorial and this method will be heavily used on complex parts of my model.

    This mesh was used to experiment with the technique along with many others (auto-unwrapping,creasing,etc...) that i will be showing in the tutorial.Rendered in Toolbag 2 with an Object-Space Normal Map baked in Maya.




  • Asadar
    Offline / Send Message
    Asadar polycounter lvl 4

    I would be very interested in this tutorial (I think I'm not the only one). :)
  • Psychotic_Mike
    Offline / Send Message
    Psychotic_Mike polycounter lvl 11
    when I apply my surface shader my mesh turn black and cannot be rendered in the viewport :/ 
    same goes with blinn and lambert. 
    I got the roundcorners connected to the set range and that one connected to the material node - when the set range connects to the material node it overrides the colour making it black. 
    How did u manage to set a colour value?
  • aponomarev93
    Offline / Send Message
    aponomarev93 polycounter lvl 8
    when I apply my surface shader my mesh turn black and cannot be rendered in the viewport :/ 
    same goes with blinn and lambert. 
    I got the roundcorners connected to the set range and that one connected to the material node - when the set range connects to the material node it overrides the colour making it black. 
    How did u manage to set a colour value?

Sign In or Register to comment.