My workflow on some smaller objects right now involves creating minor details (electrical sockets, small switches, bumps) as a 0-255 grayscale height map with a 128 midpoint that I normalize with the Nvidia filter and overlay on a baked normal from max that I use to capture general surface curvature.
Right now I'm fighting with the Nvidia filter. I can get good red and green channels for my left-right and up-down tangents, but I'm trying to figure out how to either make it read the grayscale height and process it into the blue depth channel, or to add it manually afterwords.
Been looking at Ben Mathias' workflow from his site and it's been helpful on some parts, but he builds his heighmaps from a 0 base layer instead of 128 mid (I'm going both up and down in my heighmaps, so I need the gray midpoint).
Am I missing a setting in the Nvidia filter, or is there a good process for taking the original grayscale and copy-pasting it into the blue channel of the normalized map to get better height data?
Replies
Red and Green indicate changes in light direction which will give the impression of the surface going up or down. If you invert these two channels details will also appear to invert from going inward to outward and from outward to inward.
Blue is just there to indicate a change in surface direction from flat to not flat. The blue channel is not supposed to look like a full range grayscale bump map, it's white where the surface is flat and gray to black where the surface is not flat, black would indicate a surface at a 90° angle from flat.
I hope that helps.
EDIT:
Here's what I'm talking about.
EDIT2:
On some geometry.
if you want to layer detail I suggest you do it manually instead of using a tool where you have limited adjustability.
http://www.cgbootcamp.com/tutorials/2009/12/9/photoshop-combine-normal-maps.html
when converting 'surface detail' to a normal map, you dont really have to worry about if you are considering 0 or 128 as the starting point (flat). after converting you will always have the 'impression' of up or down because the normal map does not store height information. that information is lost - you only get 'surface change' information.
Thanks for the pointer, chronic, I'll take a look at that.
http://www.cgtextures.com/content.php?action=tutorial&name=normalmap
Making an action in Photoshop for something like this is really easy.
EDIT:
Oh I almost forgot about njob, that's a pretty good tool too.
Sorry if I'm preaching to the choir here, maybe I'm not understanding your question but how I do it is, I just put my xnormal high frequency detail normal map result on top of the baked normal map, make it a overlay and do this:
Edit, oh shit, chronic basicaly beat me to it! And judging by the tut he posted, I've been doing it wrong?! :O
Here's a comparison between three methods for mixing normal maps.
To me, CGBootcamp's method actually looks worse than just overlaying and darkening the blue channel 50%... but both methods look pretty bad to me. The added details look flat because they aren't oriented correctly.
Blending normalmaps is a 3D operation. It's not something that can be done correctly with a 2D image editor like Photoshop.
Here are the source images I used:
http://crazybump.com/images/composite/
Actually, a 50% value in the blue channel indicates a surface 90° from flat.
A black value in the blue channel would indicate a surface 180° from flat: a back-facing surface. But that doesn't really happen in a tangent-space map. In practice, blue values are always at 50% or higher.
Cool, thanks for correcting me
I did not know that, I was just trying to interpret what I remembered seeing from baking high poly meshes to a flat plane.
You're right! they don't get darker than 50% I must've remembered wrong about getting black in the blue channel... or baking incorrectly :poly136:
You're right that method isn't the best, or what I would use personally. I was just too lazy to write a full on tutorial. :poly136:
What I would do if I only had Photoshop and the Nvidia filter is:
EDIT2: IMPORTANT! Do this whole process in a new document, the conversion back from 16 Bit per channel to 8 Bit per channel isn't as lossless as it might seem. It will introduce noise like artifacts as some pixels get pushed up or down a notch in value. Sorry if that caused trouble for anyone, I really shouldn't post tech stuff late at night...
1. Make a real heightmap instead of just using the diffuse. Tile the image if necessary.
2. Change the editing mode to 16 bits per channel to avoid stair stepping artifacts in the final result.
- Image -> Mode -> 16 Bits/Channel
3. Copy the heightmap to a new layer.
4. Gaussian Blur it with a value of maybe 10 pixels.
5. Run that layer through the Nvidia Filter with the following settings.
- Add Height to Normal Map checked on.
- Height Generation Filter Type set to 4 sample.
- Min Z = 0.
- Scale = 100.
- Height Source set to Average RGB.
- Alpha Field = Set to 1.0
6. Repeat steps 3, 4, 5 around 4 or 5 more times, but reduce the Gaussian Blur and Scale values by 1/2 each time.
So the next step after repeating step 3 would be a Gaussian Blue value of 5 pixels followed by Nvidia filter with a scale of 50.
7. Change the mode back to 8 Bits/Channel.
- Image -> Mode -> 8 Bits/Channel
8. Blend and combine the resulting normal map layers together, using your method of choice.
Crazy Bump would be the best for this, though if you had Crazy Bump you'd be using that instead of this convoluted method to get bumpy normal maps anyway...
So as a free alternative I recommend this action by one of the Project Offset guys in that I found in this thread about combining normal maps. It seems to be better than the 50% blue overlay method though not as good as Crazy Bump.
Also at this time you now have 5 or 6 different normal map layers each made with different blur/scale values. You can selectively erase parts of or hide the layers you don't want to get different height results throughout the texture. For example the 10 pixel blur/100 scale layer might be too much so just delete that layer and use the rest.
9. Normalize the final combined normal map layers.
Done
Well anyway that's what I'd do for bumpier normal maps with only Photoshop and the Nvidia filter at my disposal. It makes for a pretty good Photoshop action.
If there's a better method for any part or all of this I'd love to hear about it, as a pro license of Crazy Bump is currently out of my price range
EDIT:
I'm currently trying this process out with xNormals Height2Normals filter and so far it seems to offer more control and be easier to use with actions.
It might not be 100% correct as crazybump might provide but it looks almost the same and has the ability to keep things in photoshop. To have multiple layers you can tune interactivly makes it much better and more useful to the artist. there is nothing i hate more than destructive processes so having a non-destructive method you can use in a multilayer psd is a major selling point for me.
That method is definitely nicer than an overlay, though it still leaves details looking flat, and not lighting from the right direction.
Here's an animated comparison:
CrazyBump's mixer is also somewhat nicer to the artist, because it lets you adjust each layer's strength with a realtime 3D preview. Alas, it does require alt-tabbing out of Photoshop.
@Ben: Out-of-work artists can use CrazyBump free-of-charge... I think I announced that on polycount awhile back. If that applies to you (just guessing based on your .sig), then drop me a PM!
I added the different methods to the wiki as well.
http://wiki.polycount.net/Normal_Map#BlendingNormalMapsTogether
But in Ryans post above the Rod Green version seems to differ a whole lot. Especially the lighting direction.
How did you two (Ryan and Eric) manage to get such different results? ^^
Oh and thanks for adding all this knowledge on the wiki, loving it.
I imagine Ryan's difference is in using CrazyBump to render them? Maybe also CrazyBump has different results because it allows you to fine-tune the strengths of each map. Rod Green's is a one-off, though I imagine you could duplicate the resulting layers and/or mask them if you wanted more strength.
I did normalize mine before rendering, while Eric's looks non-normalized. But I don't think that accounts for the differences between the renders.
I rendered my examples using two simple dot3 lights, with diffuse and specular components.
Eric's rendering looks like it has some sort of environment map on it? It's harder for me to tell what's going on there.
Not criticizing or anything, trying to wrap my mind around it and form my own opinion. I was sold on CB for a while there when viewing Ryan's animated GIF. Then when later viewing the wiki I was convinced that the CB example and Rod Green example were similar, so had to layer on top of each other in Photoshop to compare.
Now I'm just confused. Think I'll do some testing myself tomorrow.
Single diffuse light. No specularity. No color. Nothing happening but a plain dot3 operation.
For conveying the shape of a normal map, I think simple lighting is best. Eric's cubemap looks cool, but it's harder to tell the shape of the underlying normals.
The images I used are here: http://crazybump.com/images/composite/
http://crazybump.com/images/AnimatedAll.gif
(Disclaimer: I'm not an objective party. The renderings are as plain-and-unadorend as I can make 'em though.)
some observations:
I'm left wondering about how the lighting 'falls off' on the shadowed side of the sphere. the crazybump version is overall very intense (the flowers) while the RG version (ron green) seems more natural, significantly less illumination on the flowers in away facing directions.
the intensity of the normal mapping effect is about the same on the center of the sphere in both versions where there is very even lighting - then in the crazybump version, as you hit more glancing view angles the intensity/'depth' effect seems to increase.
i would expect the intensity/depth to stay the same on all angles of the surface, and only the shading/lighting information (directionality) to change.
I'm interested in the math behind all this if anyone can enlighten us.
Once I did that (and spent a whole day trying to reproduce Crazy Bump's results) I totally understood what Crazy Bump's mixer was doing vs. the limitations of any Photoshop based operations.
I can't explain the math behind it but it's very easy to understand visually once you load those normal maps onto a plane in 3d and see the results for yourself. A truly successful normal map blend will combine the actual light directions (vectors?) from two maps together. It's not really a color based blend like what you can do with Photoshop but a recalculation of light directions, which I think is what Crazy Bump is doing.
In tangent space normal maps where the lowpoly matches the high, most of the pixels are at or around 50%, 50%, 100%... and in the example being used, the only places that really change are where the extreme angles of the sphere exist.. unless of course it only looks that way in static images, and I need to load up a model and check it out as Brian says.
Nonetheless, I feel that while clearly the weaker, inferior method, using 2D image editors to blend normal maps doesn't seem all that bad if your lowpoly matches the major forms you're reaching for sufficiently well.
RG's technique works by adding detail normals to existing ones. It's kinda similar to embossing. New normals are stamped down on top of your old ones, but their orientation isn't changed. That's as good a job as I can imagine doing with Photoshop!
CB's approach is more like baking from a 3D model... details end up reoriented, because they've been transformed into your base map's tangent space. This avoids the "embossed" look, but the math is too complicated to mimic in photoshop.
Thank you very much for your offer of free-of-charge Crazy Bump for out of work artists, not sure if I qualify... I PMed you anyway.
It's a normal, heightmap, and ambient occlusion maker/converter.
http://wiki.polycount.net/Normal_Map#BlendingNormalMapsTogether
I created a new "dome" base normalmap, baked from geometry, but re-used Ryan's detail normalmap.