Home Technical Talk

Tip-Zero Effort Beveling for normal maps

2

Replies

  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    00Zero wrote: »
    cool. saw the rounded corner thing a while ago, never really thought you could use it like that.

    For simple edge bevels on 90 degree corners i usually just take the UV layout into photoshop and fill in each face with white and then crazybump it. change the sliders to get the size of bevel you want and adjust intensity. works like a charm. just in case you want the same effect relatively quickly and youre not relying on MR.
    There is a hard edges render mode in TexTools:
    texTools_ani_rtt_hard_edges.gif
    Using the Ink & Toon shader it renders the Hard edges of the 3d model (where smoothing groups form a hard edge). Use this map to point out where hard edges are in your map or use them as a base for worn edges.
    it creates a temporary mesh/poly object in the scene, sets a camera orthogonal on top of it and renders from that camera view using the ink and Toon smoothing groups line rendering. There is also a thickness value (in pixels) that can be adjusted.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    renderhjs wrote: »
    There is a hard edges render mode in TexTools:
    texTools_ani_rtt_hard_edges.gif
    it creates a temporary mesh/poly object in the scene, sets a camera orthogonal on top of it and renders from that camera view using the ink and Toon smoothing groups line rendering. There is also a thickness value (in pixels) that can be adjusted.

    VERY COOL. that would be an awesome timesaver for wear maps. much better than Neil Blevins Vertex colour script
  • Spatz
    Options
    Offline / Send Message
    Spatz polycounter lvl 13
    can someone explain please how this works ?... im getting seams all over if i try this?...

    i guess i missed some info turning this b/w pic into normalmap...hmm o.O
  • labmonkey
    Options
    Offline / Send Message
    labmonkey polycounter lvl 9
    Im also getting seams everywhere. I made 4 meshes to test it, one with the entire object set to smoothing group 1, second one with each face set to a different smoothing group but with the same uvs as the first example, Third one, I split the uvs where the smoothing groups split, and on the fourth one i kept the smoothing group at 1 for the whole object, and split the uvs anyway, just as a test. None of it renders the results you guys seem to be getting :P They show up fine if i just render, but not when redering to texture.

    Im getting seams along the edge, and the normals along either side of the mesh-seam sometimes render completely wrong as well. How do you setup your meshes and what are your render settings? i cant get it to work :(
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Did anyone figure out how to hook up an additional bump map to the round corners shader as it takes the bump slot in maya to work?
  • nightshade
    Options
    Offline / Send Message
    in maya 2009, what i do is set the bump map in the slot provided by the mia_roundcorners node and then change the bump mode.
    heres what the bump mode does according to the docs.


    bump_mode defines the coordinate space of the bump_vector, as well as that of the return value of the shader itself (which is also a vector), and if it is interpreted as a "normal vector perturbation" or a whole new "normal vector"`.

    The following values are legal:

    0: compatible mode. The old bump parameter is used in place of bump_vector. The return value is 0,0,0, and the shader actually perturbs the normal vector itself.
    1: "add" mode in "internal" space
    2: "add" mode in world space
    3: "add" mode in object space
    4: "add" mode in camera space
    5: "set" mode in "internal" space
    6: "set" mode in world space
    7: "set" mode in object space
    8: "set" mode in camera space
    The "add" modes mean that the vector contains a normal perturbation, i.e. a modification that is "added" to the current normal. The "set" mode means that the actual normal is replaced by the incoming vector, interpreted in the aforementioned coordinate space. Equally for output, an "add" mode implies that the shader returns a perturbation vector intended to be added to the current normal, and "set" mode implies that it returns a whole normal vector. In neither case does the shader actually modify the current normal by itself.

    i find 1 and 2 to be the best values but thats just from a couple quick renders. this shader is pretty awesome, i'd seen it while crawling through maya's docs but didnt really see why i'd want to use it when i could just do a simple bevel, now i know. edit: i meant 0,1, and 2.
  • THE 5
    Options
    Offline / Send Message
    THE 5 polycounter lvl 14
    One more obvious thing you might already know.
    You can put a map into the Radius Slot of the Round Corners Map.
    Then increase the radius by increasing the "output Ammount" Value.

    You can get some quite accetable edge chipping just by using procedual Noisemaps.

    PolycountRoundCornersBump.jpg
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Holy shit, that's great.

    Still doesn't convince me to leave xNormal behind tho! :)
  • airbrush
    Options
    Offline / Send Message
    airbrush polycounter lvl 13
    Can you post a screen of the shader/attribute setup?

    nightshade wrote: »
    in maya 2009, what i do is set the bump map in the slot provided by the mia_roundcorners node and then change the bump mode.
    heres what the bump mode does according to the docs.


    bump_mode defines the coordinate space of the bump_vector, as well as that of the return value of the shader itself (which is also a vector), and if it is interpreted as a "normal vector perturbation" or a whole new "normal vector"`.

    The following values are legal:

    0: compatible mode. The old bump parameter is used in place of bump_vector. The return value is 0,0,0, and the shader actually perturbs the normal vector itself.
    1: "add" mode in "internal" space
    2: "add" mode in world space
    3: "add" mode in object space
    4: "add" mode in camera space
    5: "set" mode in "internal" space
    6: "set" mode in world space
    7: "set" mode in object space
    8: "set" mode in camera space
    The "add" modes mean that the vector contains a normal perturbation, i.e. a modification that is "added" to the current normal. The "set" mode means that the actual normal is replaced by the incoming vector, interpreted in the aforementioned coordinate space. Equally for output, an "add" mode implies that the shader returns a perturbation vector intended to be added to the current normal, and "set" mode implies that it returns a whole normal vector. In neither case does the shader actually modify the current normal by itself.

    i find 1 and 2 to be the best values but thats just from a couple quick renders. this shader is pretty awesome, i'd seen it while crawling through maya's docs but didnt really see why i'd want to use it when i could just do a simple bevel, now i know. edit: i meant 0,1, and 2.
  • Ryan Smith
    Options
    Offline / Send Message
    Ryan Smith polycounter lvl 11
    Nothing is showing up in maya for me on my bakes. I checked off use common settings in the Transfer maps dialog and i still get blank normal maps. I am rendering with mental ray.

    Anyone can make a walk-through for maya? I would love u long time.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Virtuosic wrote: »
    Nothing is showing up in maya for me on my bakes. I checked off use common settings in the Transfer maps dialog and i still get blank normal maps. I am rendering with mental ray.

    Anyone can make a walk-through for maya? I would love u long time.


    someone earlier mentioned that maya cant bake with mentalray. I cant test it myself as i'm not a maya user
  • nightshade
    Options
    Offline / Send Message
    heres the shader setup, nothing special.
    captureem.jpg

    i'm gonna have to try the chipped edge thing, that looks pretty cool.
  • THE 5
    Options
    Offline / Send Message
    THE 5 polycounter lvl 14
    Anyone knows a workaround to get the Round Corners Bump into a blend materials mask? Or to output it as a Black/White map?
    I tried some stuff, but nothing did work so far.
  • KillerPlatypus
    So I am getting the same problem as Virtuosic here. I can get my shader network set up fine, but for the life of me I can't seem to get the texture to bake out of Maya. If anyone has done this successfully can you please explain how.

    As stated before, since Maya has to have a source and a target mesh for its map transfers it doesn't seem to work.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    why dont you just duplicate the mesh and use that as the source? make sure the target mesh has a regular material on it though with no bump effect.
  • wasker
    Options
    Offline / Send Message
    wasker polycounter lvl 7
    Nope, doesn't work.
  • Eric Chadwick
    Options
    Offline / Send Message
    I think unfortunately it's not good for normal mapping, at least when baked in Max. Like labmonkey posted, I can't get decent results either. Maybe XSI or Maya has better results?

    I also tried flipping the red and green channels, but that looks even worse.

    Besides... it only works on hard edges, and only those that are at obtuse angles (edges that stick out not in), and all the round bevels end up the same width.

    roundcorners_3dsmax.jpg

    Anyone else get good results?
  • KillerPlatypus
    r_fletch_r wrote: »
    why dont you just duplicate the mesh and use that as the source? make sure the target mesh has a regular material on it though with no bump effect.

    I tried this this last night, but because Maya's way of transferring maps is wacky, when you have it set to transfer the normals it doesn't grab any information from the map slots of the source mesh. Its limitation is it will only grab the surface detail of another mesh. Additionally, there is no way to bake a texture from one uv set to another unless again you have a source mesh and a target mesh.

    If anyone else knows any work arounds it would be awesome because it would seem like such a shame to not be able to use this in a video game environment.
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    I think unfortunately it's not good for normal mapping, at least when baked in Max. Like labmonkey posted, I can't get decent results either. Maybe XSI or Maya has better results?

    Besides... it only works on hard edges, and only those that are at obtuse angles (edges that stick out not in), and all the round bevels end up the same width.
    To be fair, this doesn't strike me as a technique you'd throw onto any model and expect to work perfectly. But if you build the model with it in mind, you can accomplish some nice results rather quickly and without much of a head ache.
    normalmap.jpg
    (I'm honestly not sure if this is modeled in a way that defeats the point that the original model served with some beveled edges thrown in, or if it could be an example of modeling with the result/techniques in mind. Seemed quick enough and looks decent enough that I can see this coming in handy with quite a few props in the future just to get rid of some hard edges)
  • Eric Chadwick
    Options
    Offline / Send Message
    Wow, cool, glad to hear someone got better results! What settings did you use? And what do the nm and wires look like?
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    I didn't bother unwrapping it, so it ended up using an automatic projection. The shader is just a quick one made in MentalMill to test normal maps.
    normalmap_2.jpg
  • Spatz
    Options
    Offline / Send Message
    Spatz polycounter lvl 13
    cyrid - i am really interested how you achieved this result, so it would be great if you could write down the steps what you did ... oh and can you please post the uv template ... thanks
  • Eric Chadwick
    Options
    Offline / Send Message
    cryrid, that's XSI right?

    I think Max's baker isn't capable of using the Round Corners Bump shader. It seems to be baking in a different space. The normals in the red channel end up pointing all directions, not just pos/neg X like they should be.

    roundcorners_channels.jpg
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    cryrid, that's XSI right?

    I think Max's baker isn't capable of using the Round Corners Bump shader. It seems to be baking in a different space
    Yeah, it is. The rounded_corners bump here gives us the option to set which space we want, but all the ones I tried still seemed to give me a beveled look inside that honey-comb area :S
    cyrid - i am really interested how you achieved this result, so it would be great if you could write down the steps what you did ... oh and can you please post the uv template ... thanks
    I think the only thing worth noting on the model is that the cylinder on the left was welded into the cubed-shape to prevent it from getting a hard edge, where the cylinder on the right is intersecting (as the bump will round this type of hard edge). The rest of the steps can be found here:
    http://cryrid.com/images/temp/XSI/zeroeffort_bevels.jpg
    (I guess it might be tiny to read unless you're familiar with the Softimage menus)

    Beyond that I just threw on an automatic texture projection (the default settings breaks it up according to 45' angles) and baked. It's messy, but it splits it along the hard edges so I don't get any seams. If I try and weld some islands together like Eric's recent example, I'll get the classic seams problem.
    seams.jpg
    (I had to remake it so the mesh and uvs are a bit different than the first example I posted, but it was built the same way and has the same results)
  • EarthQuake
    Options
    Offline / Send Message
    The above example of seams along uv edges which are not broken is not a result of this method, but baking normal maps in general. Anyone having seam problems needs to follow the same rules for traditional normals baking, and that is to split your uvs everywhere you have a hard edge on the low.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    I still can't get the bump map working with this shader in maya, I put bitmap in the bump slot and it doesn't show up in the render. Anybody?
  • breakneck
    Options
    Offline / Send Message
    breakneck polycounter lvl 13
    so, this is useless if your trying to bake out normals in max? boo
  • Eric Chadwick
    Options
    Offline / Send Message
    Might not be useless. cryrid set his XSI bump mode to Vector (2nd red arrow). But The 5 advocated disabling the Vector argument from the Max shader. Jeff Patton didn't disable vector, though maybe that only works with mr shaders, or maybe Max has changed this since 2007 when he posted his tip.
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    it seems to bake fairly well for intersecting geometry in max. obviously not as great as working on every edge you don't chamfer manually, but saves a bit of time on some parts.
  • hyrumark
    Options
    Offline / Send Message
    hyrumark polycounter lvl 12
    So, even after trying all the suggestions on this thread, I'm still getting garbage normal maps when using RTT in Max. Seams and incorrect lighting on the corners.

    So, has ANYONE gotten this to work with RTT in Max? As in, baked out a normal map and applied it to a the lowpoly model with correct lighting?
  • THE 5
    Options
    Offline / Send Message
    THE 5 polycounter lvl 14
    /bump
    Once aggain tried creating a clean Normalmap with this method and gettign just the same problem as hyrumark.
    PolycountRoundcornerspart2.jpg
    Could this be due to incorrect RBG channels?

    @EricChadwick:
    I just kept the vector stuff hiden since I did not know what this could be good for. Sorry for the confusion this might have caused.

    Maybe a specific value for the vector could solve this, couldn't it?

    EDIT:
    Photobucket shrinked the image... :/
  • Spug
    Options
    Offline / Send Message
    Spug polycounter lvl 12
    cryrid wrote: »
    Yeah, it is. The rounded_corners bump here gives us the option to set which space we want, but all the ones I tried still seemed to give me a beveled look inside that honey-comb area :S


    I think the only thing worth noting on the model is that the cylinder on the left was welded into the cubed-shape to prevent it from getting a hard edge, where the cylinder on the right is intersecting (as the bump will round this type of hard edge). The rest of the steps can be found here:
    http://cryrid.com/images/temp/XSI/zeroeffort_bevels.jpg
    (I guess it might be tiny to read unless you're familiar with the Softimage menus)

    Beyond that I just threw on an automatic texture projection (the default settings breaks it up according to 45' angles) and baked. It's messy, but it splits it along the hard edges so I don't get any seams. If I try and weld some islands together like Eric's recent example, I'll get the classic seams problem.
    seams.jpg
    (I had to remake it so the mesh and uvs are a bit different than the first example I posted, but it was built the same way and has the same results)

    It is showing up fine for me in the view port/quick render, but it will not bake out to a texture map. It is very interesting, I'm not sure what the problem is, everything is in its right stack, and is working fine. XSI has the ability to cause many people to cry out, but this work flow is definitely worth the headache. By any chance we can have a higher res image of your work flow, even though I'm very familiar with XSI menus/settings, its hard to read. If you would hook it up brotha I would really appreciate it. :):):)
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    Spug wrote: »
    By any chance we can have a higher res image of your work flow, even though I'm very familiar with XSI menus/settings, its hard to read. If you would hook it up brotha I would really appreciate it. :):):)

    roundedcorners1.jpg
    roundedcorners2.jpg
    roundedcorners3.jpg
    roundedcorners4.jpg
    roundedcorners5.jpg
    roundedcorners6.jpg


    I haven't gotten a chance to use any version of Softimage past 7/7.5, so I'm not sure if any of the layouts or default values for these PPGs would have changed over the last few years.
  • Spug
    Options
    Offline / Send Message
    Spug polycounter lvl 12
    Awesome, thanks so much dude! I am currently using 7.5 so yeah, gonna test this out. Thanks yo!
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    Swampsow and Spug were getting blank maps, and I think where using a different version than me (I'm on 7). I just tried with Modtools 7.5 and got the same blank result they were getting. I'm not sure if this was changed from 7.5 and up or if this was just a result of Modtool's free limitations, but I added an extra step which fixes the issue for me in it:

    roundedcorners_7point5.jpg
  • arshlevon
    Options
    Offline / Send Message
    arshlevon polycounter lvl 18
    this is happening in the renderer, seems like it would feasible just to make a realtime shader that does this. then you could bypass the whole rendering normals BS altogether.
  • Shogun3d
    Options
    Offline / Send Message
    Shogun3d polycounter lvl 12
    arshlevon wrote: »
    this is happening in the renderer, seems like it would feasible just to make a realtime shader that does this. then you could bypass the whole rendering normals BS altogether.

    The purpose is for the renderer to apply to RTT.
  • arshlevon
    Options
    Offline / Send Message
    arshlevon polycounter lvl 18
    i understand that, but if you could just import primitive geo into the engine and as a shader option use "rounded corners" on hard edges wouldn't that save even more time?
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    This was something Ken Pimental commented on when quicksilver came out. it was mentioned that it would take too many instructions for a current gen realtime shader.
  • Shogun3d
    Options
    Offline / Send Message
    Shogun3d polycounter lvl 12
    arshlevon wrote: »
    i understand that, but if you could just import primitive geo into the engine and as a shader option use "rounded corners" on hard edges wouldn't that save even more time?

    Yeah I see what you mean, it would be pretty cool to see this kind of feature in engine but I think it would propose a hell of a lot more technical issues than its worth. For one having control in textures/shader is a must have for normals, having the engine do this would require models built a certain way for sure. IDK, I think it would turn out like SSAO, everyone thinks its hella cool to have real time AO but it ends up looking muddy and a huge perf hit.
  • Cathodeus
    Options
    Offline / Send Message
    Cathodeus polycounter lvl 14
    I don't understand why the Max RTT sometime put the green on top, sometime, on right, sometime on left randomly ... While all the faces are oriented correctly (not rotated, not mirrored as you can see with the checker).

    Do somebody was able to get a clean result ? I can trust "r_fletch_r" but maybe he forgot to explain something ...

    Actually it's pretty unusable inside max while it seems to be perfect with XSI ... :thumbup:
  • Cathodeus
    Options
    Offline / Send Message
    Cathodeus polycounter lvl 14
    Do somebody can test it with Max 2009 i think that there's a bug inside max 2011 & 2010 RTT.
  • pasha_sevez
    Options
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    cryrid, thank you very much for your detailed explanation on rounded corners baking!

    P.S. Tried today to bake round corners in SI 2011 and got flat result :(( Used all your advices (tangents and binormals)...

    May be it fails in 2011 because there's no "round corners" node - only "round_corners_mia" ?
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    For XSI, there's a plugin called SaveRenderMesh which should let you export your rounded corner high poly and bring it into xnormal or other programs. Theoretically.

    Surprisingly, nobody seems to have written anything similar for Max...
  • Karaoke_Warrior
    Options
    Offline / Send Message
    Karaoke_Warrior polycounter lvl 13
    Wow. I know this thread is from last year, but has anyone gotten this to work in Max without seams? This would be a big time saver for those of us making several small assets on a weekly basis, as I don't have to dedicate an entire day adding control edges to round my corners.

    Also, is there a way to use this with Light Tracer instead of Mental Ray? I realize that baking AO in both is considerably slow (compared to XNormal), but I prefer Light Tracer since it seems to produce less artifacts at the same render time.
  • aferalva6
    Options
    Offline / Send Message
    does anyone knows the same technique for maya???
  • MsChewBecca
    Options
    Offline / Send Message
    As this thread states, this mental ray shader to normal map technique only works in XSI, not Maya or 3DS Max.

    I had never touched XSI before but was able to quickly and easily follow the instructions that are provided in this thread and produce a nice looking normal map in a few minutes. Though there were a few artifacts I got waaaay better results than using xnormal or 3ds Max. It looks great in Unity as well.

    This process was so quick, easy, and produced great results that even though I model in Max, I'll bring all my objects into XSI for bevel edge normals from now on.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    If someone is still interested in this trick
    max + MR + 3point shader

    mr_rc.jpg
    You can see that objects need to intersect on the "high" to produce the round corner.

    First, you can't bake an object on itself, you have to create a copy and use a cage.
    Second, you have to put "low"object visibility to 0 in the object properties. You always have to do this when baking with mental ray (AO for instance), else the low will render too, creating artifacts.

    I still have issues with AA, even with high samples rate. Could render in x2 or x4 to counter that.

    Now my opinion on the trick is it's pretty limited. Ofc it's just a fake on normal so even on render it doesn't look very nice from close range. However, i plan to use this for pimping CAD models where i don't have time to chamfer thousands of pieces.

    with AO :q
    mr_rc_ao.jpg
  • tynew
    Options
    Offline / Send Message
    tynew polycounter lvl 9
    Just wondering if anyone knows if there are any up to date methods (or new), which are feasible for making quick low poly normals in max?

    Considering what Noors above me said possibly a high quality solution. Looks like the old method in this thread is also dependent on UV shell orientation which is a nightmare.
  • EarthQuake
    Options
    Offline / Send Message
    Honestly, unless you need to make like 100 very simple props in a short timeframe, I would not bother with this method. There are too many technical issues and too little control over the end result to merit the hassle of setting it up.

    If this is way faster than using standard control loops/sub-d, you should probably practice your sub-d skills more.

    Much of what is cool about this can be done with other, more flexible tricks, like floating object with soft intersections.

    floaterintersection.jpg
2
Sign In or Register to comment.