Discuss face weighted normals. (or
FWN for short)
Oftentimes I wonder why certain features are left out of the major 3d packages, and usually I will figure out why it was ignored.
But this time I am having a hard time understanding why no-one uses face weighted normals, it isn't something terribly new ID has
been using it since doom3. Still I have yet to see even a third party script for any package dealing with face weighted normals.
[example below created in Openbrf]
I realize it is possible to edit normals manually and get an even better result than this, but it only took two minutes to do and there is nothing to prevent me to continue tweaking the normals. It also benefits normal maps, by making them do less work because the vertex normals match the hi-poly normals much closer, and the sampling rays are fired at a more orthogonal direction.
[link explaining technique in depth]
http://www.bytehazard.com/code/vertnorm.html
Also...a bit off topic, Why isn't there any programs that offer a physics simulation for UV packing?, it just seems like the most logical next step...ten years ago. *grump face*
Thanks for reading!.
!!!Edit Nov-02-12: We now have a script for
3ds Max that can calculate FWN created by Lehm2000 of the Cgtalk forums
http://polycount.com/discussion/comment/1690226/#Comment_1690226, an
d now Maya 2013 calculates normals using Face and Angle Weighted by default, this can be toggled in the shape node under >Mesh Controls
Replies
Actually since Maya 2012 I believe this has been added in the Normals>Set to Face just check the Match Face Normal option box when doing so.
Now, is there any way of doing the same thing in 3ds?.
The face weighted model certainly looks better.
And I am told that having a vertex normal set to face is actually quite different than 'face weighted' normals...confusing.
Seems like a useful technique. I've done something like this manually, upon a time, but since maya's normal-editing tools are complete and utter balls, I never considered it a viable technique. If there's actually scripts and tools to do it with, could be pretty great.
I think so, yes. Actually I believe Doom3 had an option to do something like this all the way back in 2004 too.
If anyone knows of a maya script / plugin that could do this, I would be eternally grateful.
Could you elaborate a little bit? I just downloaded maya 2013, and it doesn't seem to function any different from previous versions.
EDIT: Checked the 'what's new' for maya2013, doesn't mention anything about normals.
Great, thanks!
Autodesk - add a great new tool for editing normal maps, but don't put it in the normal map menu, and don't mention it in your what's new pdf. Brilliant.
I've never really used the shape node attributes before, but it looks like there's some useful stuff in here.
Oh Is that how it works. Thanks for sharing. Is this option in older versions as well?
Nope. Or if it is, it's hidden somewhere else.
Anyone got a script for us stoneage ppl still using Maya 2011?
I think there are still major advantages to using FW Normals, some of which are covered in this thread.
Earthquake goes over the advantages of reducing normal map gradation (which fw normals would do, at least on larger faces where any artifacting would be more noticeable).
I agree that there's an inherent cost to adding more information that must be transferred through the pipeline, but this method doesn't really add anything. Vertex normals are already part of the pipeline - using a face weighted algorithm simply gives better results.
But Per's point of "Studios need to bake correctly in the first place" really trumps it. As well as the various workflow disadvantages he's brought up.
@Earthquake your examples showing perfect normals is also without using compressed textures so it is a little misleading, and if you think the next generation of consoles won't use block compression you have another thing coming. The reduced gradients on FWN will reduce compression artifacts which become even more visible at angles and with mip-mapping.
Finally, games that don't use normal maps at all are still quite common.
I agree with this probably not being a major thing in production. But if I can get this for free at no real extra cost of time simply by knowing about this functionality and enabling it I'll use it. Like you said perna, if all software would have this by default it would be sweet. Maya 2013 seems to have taken this step as far as I can tell.
I linked to that thread because it discusses the advantages of having less gradienting in your normal map. Using face weighted normals wouldn't lower the gradienting OVERALL, but it would shift it to smaller faces, where the artifacting that Earthquake talks about in his later posts would be less noticeable.
Sorry if it seemed like I wasn't addressing any points you made. I was just now typing up a big long explanation of what I meant, and making a quick bake / demo - but I refreshed this page, and a lot of stuff has already been said.
As for the bake / demo, I figure I'll summarize the results I got. They key thing about this technique is that it doesn't make all faces look better. It makes large faces look better and small faces look worse. The trouble I had with setting up a good example bake, is that baking correctly really does give quite good results, even using default vertex normals. So I changed the geometry into a shape that emphasizes errors with traditional averaged normals. The problem is that while this made the large faces look better - it didn't look THAT much better. And the small faces looked MUCH worse. I'm still toying around with it, but it's clear to me that this isn't a technique you want to use in every circumstance, for sure.
I did read your posts/thread Perna, Earthquake.
Earthquake actually did mention compression artifacts in the thread (I redact what I said about it being misleading earlier), and while I don't think he said the models/normal maps were perfect at any point, they do look damn near. My problem was when Perna claimed they were perfect and therefore no discernable improvement to be made by FWN. My argument is that when block compression is applied over his perfect normals, they will no longer be perfect and FWN can result in an improvement, they might even be usable on a lower lod.
When you are really pushing whatever platform you are on, you can't just add some so called "zero-cost verts" that somehow "don't require any extra data". Any extra verts you have would probably best be used describing the form instead of fixing shading errors.
Aight, I understand. I guess a lot of people, including myself, are at a stage where we're optimistic / naive enough to think that anything can be the new holy grail of modeling.
So here's a test that shows off the strengths of face-weighted normals.
Some things to note - exporting the fbx from maya2013 gave TERRIBLE looking results in udk. Possibly because I am using an old (march 2012) build of UDK. Had to import the fbx to maya 2012, then re-export for udk. Doing that created some odd seams on the edges of both tiles, but otherwise the results looked much more correct. I am pretty sure I could have gotten rid of the seams by unlocking normals in maya2012, but then I would have lost the face-weighted normals from 2013. So yeah.
I baked both of these - as far as I am aware - with optimum settings. Both triangulated, both using a cage with softened normals, both with UV-seams hardened, etc. If you want me to post more info about the test, I'll be happy to.
CONCLUSION:
Using Face weighted normals can give noticeably better results in some circumstances, and noticeably worse results in other circumstances. Given the problems I had going back and forth between versions of maya, I can't see myself using this very often YET. At least until I can iron out the issues with 2013 fbx. Even without pipeline issues (Like Perna mentioned), I would need some way of gauging when using it would help, and when it would hurt. I >think< that a decent rule of thumb is 'if your model has small faces that are highly visible, and are at extreme angles to large faces, then it's worse to use face-weighted normals'. There might be additional factors I haven't considered.
I fixed the issue with exporting from 2013, it's just that some of my checkboxes were checked when they shouldn't be, or unchecked when they should be. So that's not really an issue.
The results from a top view look the same as the image I posted (face-weighted normals have less shading errors). Here's another screenshot to demonstrate the cost of using FWNormals. The smaller edge faces - as expected - have much worse shading.
I definitely underestimated how much I could get away with using only a diffuse texture, and I did go way over budget for what the model was intended for, but every single vertex is either being used to describe the form or allow for decent deformation, in an of itself it can't be called badly optimised.
Our engine supports vertex normals. Everything will be very low poly. We won't have to use smoothing groups as much, so we'll avoid the extra vertex overhead.
I created a maxscript that does face weighted normals. It also uses the angle between the faces as outlined in the byte hazzard's link. Unfortunately, I created the script at work so I'll need to get approval before posting it online. Maybe Monday?
Perna, you actually made me google "gogo 3d" as I was convinced it was some sort of optimizing program I had never heard of.
Here you go.
The top vertex normals are all welded, and simply weighted upwards. The bottom vertex normals were split (on both models), since I had a UV seam there anyway.
It does look like it has hardened normals. That's just how much of an effect fwNormals can have.
In this case it looks like the turret and front glacis are more true to form but it created some strange looking shading on the upper left sonic cannon thing. So whether or not it is better is really subjective. *shrug*
But as always - if it looks good and you / your client are happy..
I just find that relying on things like that is setting yourself up for failure. You may get away with it once or twice, but having an arsenal of tricks that work depending on far too many factors out of your control, is just ridiculous when a proper solution isn't unattainable.
You create an asset with the normalmap baking in mind every step of the way, you set up the uv's a certain way etc... so when you go in expecting to rely on tricks like that and they fail you, that's lost work. I so far haven't ever seen a need to reach for the dirty tricks since properly learning what normalmaps do and what you can do to alleviate common issues, which was all thanks to Polycount.
That said, I personally don't hand-edit normals on normal-mapped assets either, it's a hassle and I'm afraid of losing the edits somewhere down the pipeline..
I have used it on lowpoly-only models though, as per this method: http://www.polycount.com/forum/showthread.php?t=66139&highlight=superspecular
I think you answered your own question. :poly124:
I can't tell if I agree or disagree with you, since I'm not sure what kind of tricks you're talking about.
For instance "partial mirroring". Like if I had a person with a hole in one side of their shirt, but the rest of the shirt could be symmetrical. As long as I sculpt, model, and uv everything correctly I can wind up mirroring the entire shirt, minus the one area that should have a hole in it. I can apply the same technique to get patches of asymmetry wherever I want on an otherwise symmetrical model, without wasting a ton of UV space.
Is that a trick? If so it's a useful, reliable trick. I wouldn't use it every time, but that doesn't mean I should never use it.
I don't think the answer is "don't use tricks". I think the answer is "know which tricks are reliable and which aren't and use them accordingly". If you go in using unreliable tricks, you gotta be prepared to get burned.
In my case (no normal maps, and extremely low poly models) this is a fantastic solution.
In the end the vertex count is what matters to me (I'm a technical artist after all). Using Face Weighted Normals and UV Seams from Smoothing Groups I can lower the vertex count and get nearly the same visual as using Smoothing groups.
For the object below I can even raise the poly count while lowering the vertex count!
This is a screenshot taken from Unity. The descriptions show the steps I took from top to bottom.
Unfortunately, I won't be releasing my script, but the one posted by Scruples works well enough. It doesn't do angle calculations, but it does get the poly area which achieves the same affect with quads.
For this example, the beveled faces have no influence on normals, instead taking their normals from surrounding faces. This results in some sweet arse highlights. The only way I could do this was by selecging everything though, otherwise the areas I didn't select would mess up (also SSAO is on, so the darker patches on the large faces are there for that reason)
What I want is a button that does this:
In that I'd select the newly beveled face on the right (BEVEL and an arrow pointed to it), then press one button, then get some more of the damn nice bevels.
I'm using Maya 2012, is there a way to do this already that I haven't noticed, or would I need to script something?
it works on a selection of multiple faces, and sets the vertex normals for all the verts making up that face to be the same as the face.
kinda like set to face in maya but it doesn't cause a smoothing split, it just works with the existing verts and normals with out creating new ones.
i more or less just select a bunch of big faces and run this.
I really need to learn mel, some day.