Home Technical Talk

Superspecular soft edges tutorial chapter 1

1
deadlineproof
polycounter lvl 8
Offline / Send Message
deadlineproof polycounter lvl 8
Tutorial to improve Shading of your low poly models and get rid of hard edges or surfaces that heavy depend upon normalmapping.
It will introduce techniques i use that makes normalmapped model looks better.
Tutorial for Superspecular soft edges
m16.jpg
tecniques i used on this model to let it perform good edge specularity without normalmap smoothing group with only a normal shader with some reflections to show the precision of shading(no bumps or deformations) compared to other unique smooth groups models.


Moderator Edit: there's a similar tutorial here: http://frostsoft.blogspot.com/2012/01/shading-interpolation-vertex-normals.html

Replies

  • pior
    Online / Send Message
    pior grand marshal polycounter
    Dude please indicate your polygon counts visually on all the pictures. And also show wireframes. Without that I honestly have no idea what you are talking about ...

    Looks good tho

    [edit] oh ok I found it. Man you can remove maybe 90% of the text haha
    Workflow for boxes and other planar shapes is really simple just add an edit mesh modifier after you have unwrapped the model and select a planar face and do an average normal on it.
    Perform the same for all other planar faces but not on fillets or fillets intersections.

    Interesting, will try asap. Sometimes to get a similar look I bake 'lowpoly to lowpoly' and blur the edges in photoshop. It looks similar but your stuff is much lighter since no maps involved. Smart!

    [edit 2]
    Ok I tried it, it does look very good!!
    However I have a problem (tried it in Max) : I did it on both a cube and cylinder, it works great, but the highlight somehow disappears when crossing from one flat face to the next, across the bevel. Any idea on how to cheat this? Other than than it does look very cool.
    Not sure why you mention edit mesh tho, you sure mean edit normals?
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Hey, this is very interesting. I have to agree your text is very lengthy, and it doesn't read very well since you're not a native english speaker. I also had to look a bit before I found out you meant "Edit Normals" instead of Edit Mesh.

    Looking at the result, I have to say it is very good looking and simple to create. But that's for a box, I wonder if it doesn't become very hard to do for more complex object ?
    I do think perhaps this process could be improved a bit with a script, it's kind of tedious to do for every face.

    Also: what about exporting to game engines, surely not all of them support application exported normals, and will try to generate their own ?

    edit: pior,I don't see any of that here ?
  • SyncViewS
    Offline / Send Message
    SyncViewS polycounter lvl 13
    Well this is cool! Thanks Paolo for the tip!

    I'm already shaping in my mind a script to automate the process on more complex objects (in 3ds Max). Look for contiguous flat polys, apply the Edit Normals modifier, collapse, that's it. Thresholds here and there to refine the process. I'll be back when got something working.

    I'm interested to what happens when exporting to game engines too, as I still don't have any experience about it. Need to test its compatibility and results with normal mapping too.

    Edit: I'm afraid single polys to be made flat shading would require to be processed by hand, because I can't see a way to sort them among the others. Auto selection would need at least two contiguous flat polys, and it's still not enough, as it could get faces on bevels too. Still thinking...
  • rasmus
    Iiiinteresting. I will assume that as long as engines support custom vertex normals this should fly - interested in seeing how it can benefit baking.

    Pior: About baking lopoly-to-lopoly - you're talking object-space normals, right?
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    SyncViewS:

    How about thinking about it in a different way? This just dawned on me:
    why not work with a script that's about selecting the faces other than the ones you average with the current method ? It seems like a better way to work, setting the adjacent normals correctly, since you might not always want to average all normals of a face. Imagine a face that has one of those nice bevels at the top, yet goes into a big curved surface at the bottom. You would probably mess up the smoothing by averaging this face's normals.

    I guess it would even be best not to work with averaging four normals per face, since frankly, that's a bit blunt. I think the script should mainly provide the user a more intuitive way of changing these normals.
  • SyncViewS
    Offline / Send Message
    SyncViewS polycounter lvl 13
    I'm still mulling over this, thanks Laurens. Working per face is a too coarse process as you stated. In the case you provided the poly wouldn't be selected, but I got your point. Selections in Edit Normals Modifier are quite hard to manage, so I'd say it would be better to handle them in Editable Poly, than apply the calculation through the Modifier by script. As working on a face basis is quite bad, as it is on edge basis, I'm considering to use them in conjunction: select faces, then select border from those faces to affect. It could be made quite easier employing some selection conversions I already coded, then the matter would be about refining the edge and face selection... Keep on thinking...
  • deadlineproof
    Offline / Send Message
    deadlineproof polycounter lvl 8
    thanks for feedback!
    That's true about my engish is something long and bad ahaha.
    Yes i mean edit normals.


    For Pior:
    In next steps i will show how to fix all the related problems at least manually.

    I have to rewrite some better scripts to automate some process and avoid some common mistakes my actual doesn't do automatic iteration on selection groups properly so i cannot do all the process within a second with a button press.


    i have to solve some special cases i used to solve manually.

    The real problem with this technique is how max manage normal data.
    It doesn't go together with edit poly so some changes in edit poly can lead to complete mess in normal data due to changes in vertex order.

    At beginning i had to do the normal process 2 times but now i have learned when to do it and how to avoid common max crazyness.
    For now try to make the process late as possible.

    With your feedback i hope to write a better and smaller article and all related tools for my one magic button workflow.

    xoliul: Average normal is only for planar faces with only fillet around with a script you can do other kind of curve surfaces with normal interpolation that evaluate only the actual selection and bake it.Actually a kind of smoothgroup.
    As you see i use it a lot on any kind of surfaces not only planar ones.

    I'm trying may kind of automatic fix and selections everyone has it pros and cons.
    i have to come to a solution that can fix with one button at least 90% of the model.

    now i'm experimentin something that works with prior smooth groups the only problem is that chamfers interfere with automatic smoothing group creation and i have however to recoglize what is surface and what a bevel.

    I strongly believe that the key is in the tools when i will come with a decent one button automatic script i will release it.

    i edited because i come with an idea...i have to try to automate all in edit poly and not in edit normals(ehm i ater read that syncviews has the same idea) i don't remember if it is possible.I'm thinking to convert all to a plugin because i'm hating maxscript sintax and maybe in sdk i can avoid some limitations.
  • deadlineproof
    Offline / Send Message
    deadlineproof polycounter lvl 8
    i had another fantastic idea don't worry i will come soon with something i hope to have your support in this research.
    Soon i want to try a script that do a preliminary job before chamfering.

    Please if you like it leave comments also on site maybe with links to images of your models you will do with this technique.
  • StJoris
    I think I might not be understanding this technique completely. If it's editing normals to make your normal map come out a bit better, that's not that new I guess. However, you seem to do without normal maps?
    Could you elaborate, or rather, simplify.
  • mLichy
    I'm also a little confused on what you are doing exactly with the edit normals.

    I've learned from some people at work, if u apply an editor normals to your lowpoly with the normal map applied in realtime in the viewport , it fixes them up quite nicely alot of the time.
  • deadlineproof
    Offline / Send Message
    deadlineproof polycounter lvl 8
    i will do a video soon.Do you know some good and free video capture soft?

    mlichy : yes you can use it also as postprocess to fix normals, but if you apply it from the beginning you rarely have something to fix and the overall quality is better.

    A curvature defined by model normals is in floating point , normalmap is based on filtered low definition pixel samples.Good normals let you create less gradients in normalmap in low frequency details.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Try CamStudio for free screen recording.

    Interesting stuff here, I look forward to developments. I think similar scripts already exist for Maya, but I can't remember the name now. Will look around.
  • Taylor Hood
  • greuh
    Offline / Send Message
    greuh polycounter lvl 15
    for anyone using Maya, this script has been extremely useful for a long while already: http://migugi.net/mel/normalTools/

    there's also a couple technical-savvy screenshots for those interested.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    That's the one I was thinking of, thanks greuh :)
  • System
    Offline / Send Message
    System admin
    3ds max 9 - First time messing with the edit normals modifier, couldn't see an option for average normals anywhere. Some splines/lines were visible denoting normal directions and editing options were break or unify. Unify did nothing but break looked terrible.

    Kind of get what you are saying, but it seems like a hell of a lot of work that could only be done on simple, non-organic models.
    btw what does this mean?? "No normalmaps = lot more horsepower + memory with no tangentspace structs as tangent and binormal vector3 in vertex that use the same space you can use on part of your models to have 3 other handmade uv sets."

    Are you saying not to use normal maps?
  • divi
    Offline / Send Message
    divi polycounter lvl 12
    the average normals thingie are a few buttons inside a box titled "average". you need to hit the "selected" button. had trouble figuring that out too :|

    had major problems baking normal maps from highpoly with this - but thats probably because im too stupid :)
  • vcool
    Had the same problem, at first. I later realised I had to set the object to one smoothing group (like his 4th object in the screenshot) ad then apply the modifier. Then, using Face, select a planar faces and in the "Average" box click "Selected". Do that to all planar faces.

    I could be completley wrong, but in the end my green normal lines were indetical to the author's, so I take it that I did it correct.
  • deadlineproof
    Offline / Send Message
    deadlineproof polycounter lvl 8
    gcmp : i mean don't use normal map for every part of the model. es i'm actually doing models with 2 materials and only one use normal mapping where i put all parts of the model that require details i can't do with polygons.

    vcool : you did it correctly.
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    Im going over this now. But I wonder if a trade off could happen in complex objects? The areas that are more organic (say like I don't know, a hood of a car) still burn from a high poly. But certain areas that are very.. mathematical? Symmetrical? Planar? Don't know what to use or the true distinction. Would use this instead.

    I know that you mention deadlineproof that just burning on the normal map detail separately. But I'm thinking of objects that really would require the use of normal maps to catch the subtlety of the surfaces curves that doing without a normal map would be loss or raise polycount too high.

    I guess I'm asking. Would there be a good way to know when this process is usable, and when it is not? Especially on the >same< industrial design model?

    Somewhat separate, attempting to burn normal maps from these areas where you have applied that edit normals. That would create bizarre normal maps if attempted to burn from a high rez correct? Where the rg>B< channel especially has funky shading. I had a fellow artist hand me a model he did in maya where I think he did use that edge softening technique I think Mop is mentioning, but then applied a high rez normal map on top.. The resulting normal map was interesting.. I thought he had chosen the wrong world space or something at first, but now I wonder if it was this.
  • Frump
    Offline / Send Message
    Frump polycounter lvl 12
    Interesting technique! Glad there's already a script for maya, very glad.:)

    Good luck with making one for Max, guys!
  • deadlineproof
    Offline / Send Message
    deadlineproof polycounter lvl 8
    I have added the videotut.
    i'm looking for a different kind of script that do all automatically.
    It have to select surfaces surrounded by fillets recognizing them and apply to this surfaces the local interpolated normal.This will really speed up all the process.
    Sadly this script is only in concept stage all script i have done so far are not so different from maya one.
  • Electro
    Offline / Send Message
    Electro polycounter lvl 18
    rasmus wrote: »
    as long as engines support custom vertex normals this should fly

    Engines support vertex normals of any kind, it's just data ;)
    They can also be manipulated in realtime via vertex shaders.
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    First off, thanks for this nice info.

    Secondly,
    greuh wrote: »
    for anyone using Maya, this script has been extremely useful for a long while already: http://migugi.net/mel/normalTools/

    there's also a couple technical-savvy screenshots for those interested.

    Does this script actually achieve same as the 3DSMAX feature? I can't figure it out. Perhaps with the Type-in-functionality, but that seems way to time consuming to repeat multiple times. :(
  • Ged
    Offline / Send Message
    Ged interpolator
    nice feature didnt know it existed, so is the idea to use this workflow and have your model looking good without using normal maps? if so then I can see how it could be a good fast solution in some cases. Will game engines display these edited normals properly? any screens of that?
  • vcool
    Ged wrote: »
    nice feature didnt know it existed, so is the idea to use this workflow and have your model looking good without using normal maps? if so then I can see how it could be a good fast solution in some cases. Will game engines display these edited normals properly? any screens of that?

    Imma try porting such a model to Source today, and see what happens.
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    Here's some example images of my tests. Created in Maya with awkward methods. Need to find a easy way to work with this in Maya. Any suggestions?

    orthosmoothingvisualisa.th.jpg planarnormalsexample1.th.jpg planarnormalsexample4.th.jpg planarnormalsexample2.th.jpg planarnormalsexample3.th.jpg
  • deadlineproof
    Offline / Send Message
    deadlineproof polycounter lvl 8
    kodde: i don't use projection for the entire model i only bake the hole and keep the rest 128 128 255 it looks better than the slight gradient you can have

    Great news i have finished the script now in testing it works with one button and it seem to be faster and better than any previous attempt.

    the idea is really easy but worked perfectly for curvy and planar surfaces and give always the proper shading to all fillets too.
    I have only to test it on some complex model.
    Maybe to fix the script to let a workflow when you don't whant it applied to the entire model.Actually it apply a onesmooth group before to calculate so you lost all previous smooth groups.I have to find a solutio to keep wanted ones.
  • pior
    Online / Send Message
    pior grand marshal polycounter
    It's looking really really good Kod. It almost makes me rant a little.

    How come that after all these years of transitioning between oldgen and nextgen (yeah stupid labels but you all know what I mean), not a single technical artist ever pointed out that stuff? I mean they are the ones supposed to know that kind of things, how to make stuff look good using smart tech and so on. Makes me kinda bitter after fighting against ugly shading for so long using either handpainted stuff ruined by shading, or normalmaps looking weird because of the annoying 'gradient' faces not being managed well by this or that engine.

    Really can't wait to play with that stuff more. Now that I look around I almost feel like I am seeing it everywhere hehe (looking at the very nice details in Forza3 for instance)
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    kodde: i don't use projection for the entire model i only bake the hole and keep the rest 128 128 255 it looks better than the slight gradient you can have

    Great news i have finished the script now in testing it works with one button and it seem to be faster and better than any previous attempt.

    the idea is really easy but worked perfectly for curvy and planar surfaces and give always the proper shading to all fillets too.
    I have only to test it on some complex model.
    Maybe to fix the script to let a workflow when you don't whant it applied to the entire model.Actually it apply a onesmooth group before to calculate so you lost all previous smooth groups.I have to find a solutio to keep wanted ones.


    How do you mean? You don't even use the small color gradients in my left example towards to edges of the object? Does that that make much of a difference?
    I suppose if you are able to optimize and overlap UVs you can save texture space since in this example most sides are identical.
    The color gradients in the right hand is yuk, nobody wants those.

    pior wrote: »
    It's looking really really good Kod. It almost makes me rant a little.

    How come that after all these years of transitioning between oldgen and nextgen (yeah stupid labels but you all know what I mean), not a single technical artist ever pointed out that stuff? I mean they are the ones supposed to know that kind of things, how to make stuff look good using smart tech and so on. Makes me kinda bitter after fighting against ugly shading for so long using either handpainted stuff ruined by shading, or normalmaps looking weird because of the annoying 'gradient' faces not being managed well by this or that engine.

    Really can't wait to play with that stuff more. Now that I look around I almost feel like I am seeing it everywhere hehe (looking at the very nice details in Forza3 for instance)

    Tell me about it. I was feeling the same way yesterday. "How come nobody ever told me this before? It's so bloody simple.".
    Now I just need to find a proper way of working with this. Anyone know a good script for this in Maya is welcome to share the info ;)
  • sprunghunt
    Offline / Send Message
    sprunghunt polycounter
    kodde wrote: »
    Tell me about it. I was feeling the same way yesterday. "How come nobody ever told me this before? It's so bloody simple.".

    Well I did a test and this feature doesn't work in Unreal 3. It doesn't make any difference to the normals. So while it's useful to know you can do this it's not directly applicable in that case.

    I'm guessing that several other game engines wouldn't support this either. It'd be interesting to hear which engines do support this.
  • glib
    I'm interested in knowing how on earth this *wouldn't* be supported by an engine. The engine must store vertex normals, correct? Why would changing the angles of a couple of normals cause an engine to make up its own data all of a sudden? How would it know which data to make up?
  • pior
    Online / Send Message
    pior grand marshal polycounter
    Sprung, as far as I know unreal (or is it actorX?) recalculates the normals so yeah this wouldn't work. However normal editing being such a hugely widespread thing to do (especially to piece up destructables, human body parts, pieces of cars...) I would bet that it is supported by basically almost every other engine under the sun...
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Glib, it's kinda obvious; all you need to define a mesh is vertex positions and an index list of triangles. All the rest is optional or can be calculated from that data, just like normals, binormals and tangents. I guess they do it for several reasons, smaller filesizes, faster loading, simplicity, etc ?
  • ImSlightlyBored
    Offline / Send Message
    ImSlightlyBored polycounter lvl 13
    I've used edit normals on assets for UE3, pretty sure it picks it up, though I've only tried through .ASE not .PSK
    That's all this idea is based around, right? manual normal tweaking?
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Yep as long as your game engine brings in custom normals from your 3d app, it'll work.

    Pior: possibly the reason that it's not more widespread is that currently it's a lot of manual labour to get something which in many cases doesn't make any visible difference (eg. on characters you wouldn't do this). Until there's a magic button which can do what is shown manually here then it's gonna take a fair bit of time to do this for most complex models, time which isn't needed if you just manually add a couple of edges and bake.
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    I've used edit normals on assets for UE3, pretty sure it picks it up, though I've only tried through .ASE not .PSK
    That's all this idea is based around, right? manual normal tweaking?

    I tried ASE importing a box like from the tutorial into Unreal, doesn't work, normals just get reset.
  • zOffTy
    Offline / Send Message
    zOffTy polycounter lvl 16
    Hey

    I made a quicky script to average normal in edit poly mod

    [code]-- AverageNormal V1.1
    -- Fucking average normal for selected face
    -- 29 Septembre 2009
    -- macroScript run on 3dsmax 2009 in edit poly mod
    -- http://mathieujacquin.free.fr

    macroScript AverageNormal category:"zOffTy Tools" tooltip:" AverageNormal " buttonText: "AverageNormal"(
    --===========================================================================================================================
    clearListener()
    disableSceneRedraw()
    ---array pour stoker la face selectionn
  • Ben Apuna
    I've gotten edited normals into UE3 in the past by importing ASE files not through actorX. I wanted to use this technique to make foliage planes have a more unified shading, however once lighting was baked onto the static mesh the normals get "reset" so in that sense it doesn't work. I believe it would work fine for a dynamic mesh though. Also of note it wasn't the retail build of Unreal Tournament 3 so maybe that's why it worked for me and not Xoliul.
  • funshark
    Offline / Send Message
    funshark polycounter lvl 16
    For Maya users, I think I found a (very simple) workaround :

    - Use the "set to face" function and be sure to choose the "Match face normal" option.
    - Note that the modified normals will be locked
    - Then simply apply a "soften edge" normal modifier on the whole mesh. The unlocked normals will match the locked ones.

    ( Tested on 2008 )
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    funshark>
    That works only on simple objects, like the beveled cube. T_T
    Try a cube with an extrusion, like the one in my example.

    Almost got the migNormalTools script who greuh linked to working in a funtionally easy way.
  • funshark
    Offline / Send Message
    funshark polycounter lvl 16
    kodde > what the prob with your cube?
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    funshark>

    cubeexamples.th.jpg

    1) Manually tweaked to get "hard" look where the extrusion/cube meets.

    2) Way you described. "Set to face" w. "Match face normal" and then Soften Edge. Note the look where extrustion meets the cube.

    3) Soften edge only, no "Set to face".
  • mLink
    Offline / Send Message
    mLink polycounter lvl 10
    I haven't tried that script for maya yet, but Maya already has tools for this built in (at least in 2009).

    -Select all of the verticies you want to be on the same average plane
    -go to the Normals Menu> Vertex Normal Edit Tool
    -You'll have to at least nudge in one of the rotation axis to get the tool activate
    -Rotate the tool around so the blue arrow is facing the direction you want the vertex normals to face.

    I hope that helped a little bit, just another way to do it.
    (you can also get to the Vertex Normal Edit Tool through the default shift-right click> vertex normals with the desired vertexes selected.
  • funshark
    Offline / Send Message
    funshark polycounter lvl 16
    kodde > and what do you want to obtain? I don't get it :)
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    funshark wrote: »
    kodde > and what do you want to obtain? I don't get it :)

    The first example without all the awkward hassling. I want an easy applicable process that you can use for a full scale project with a complex model.

    One of my students figured out the last puzzle when using the migNormalsTool for Maya. This seems to be the easiest way of working with this in Maya that I have come across so far at least. I'm happy. :)
  • funshark
    Offline / Send Message
    funshark polycounter lvl 16
    kodde > Ok, I got it. I think the solution comes with the VtxFaces. We have to do all the "Hardening" process before the normal edition, and then, with the method mLink explains ( which is more efficient ), do the job on vertex normal when the normal isn't broken, and do the job on the VtxFace normal when it is.

    What do you think?
  • deadlineproof
    Offline / Send Message
    deadlineproof polycounter lvl 8
    The one button script is almost done i just noticed a bug with cylinders with many sides where i get a face with incorrect normals.
    It works actually very well with a slight manual adjustment very time saving.
    I will release a video of the script 8 hours from now.Now i have to go or my girl will kill me.

    For Unreal 3 i'm pretty sure it works in ase i remember to have used it.Maybe some missing option . I don't have any installed game now to test.

    Engine support is not a problem all engines will support it if people will use the technique.
    Most part of engines actually doesn't recalculate normals.
  • hyrumark
    Offline / Send Message
    hyrumark polycounter lvl 12
    The engine I use takes .X files, and the Pandasoft exporter has the option to export custom normals. Just wanted to say this works like charm. This is one hell of a cool technique, especially for any type of boxy model (which most manmade things are anyway). Great for breaking up that hard knife-edge look. I'm looking forward to more tutorials from you!
  • glib
    Xoliul wrote: »
    Glib, it's kinda obvious; all you need to define a mesh is vertex positions and an index list of triangles. All the rest is optional or can be calculated from that data, just like normals, binormals and tangents. I guess they do it for several reasons, smaller filesizes, faster loading, simplicity, etc ?

    So there are engines out there that will completely ignore your normals? Like I export a cube with hard edges, and get an average-normal pile of crap in-engine?

    I think I'm pretty thankful I've never had to work with one of those.
1
Sign In or Register to comment.