• Welcome to the Community Forums at HiveWire 3D! Please note that the user name you choose for our forum will be displayed to the public. Our store was closed as January 4, 2021. You can find HiveWire 3D and Lisa's Botanicals products, as well as many of our Contributing Artists, at Renderosity. This thread lists where many are now selling their products. Renderosity is generously putting products which were purchased at HiveWire 3D and are now sold at their store into customer accounts by gifting them. This is not an overnight process so please be patient, if you have already emailed them about this. If you have NOT emailed them, please see the 2nd post in this thread for instructions on what you need to do

Bump versa Normal maps

Ken1171

Esteemed
Contributing Artist
@Faery_Light The same issues exist in DS. 3Delight uses obsolete "tangent space" for normal maps, which will display incorrectly in mirrored geometries,. Iray uses MikkT for normal maps, so if you make a normal map for 3Delight, it won't work the same in Iray. Exact same problems as in Poser.
 

eclark1894

Visionary
Damn! NOW I UNDERSTAnD why I couldn't get the embroidery right on that Prince coat I was trying to do for Dusk. Everything was sinking in, and I wanted it to be poking out. I don't even know if I can find that coat now.
 

RAMWolff

Wolff Playing with Beez!
Contributing Artist
In don't remember about P10, but I know P11 can display the effects of normal maps on previews in real-time. The only detail is that DS has limited support for normal maps, where we can only set the map, but not its intensity. It can only display at 100% or nothing. Also be careful with mirrored geometries, like the other foot of a shoe, because Firefly and 3Delight will render normal maps inside out. Conversely, Superfly and I-ray will display them correctly. :)
That's true of 3Delight but in iRay you have control over the strength of the Normal maps! They are my preferred way to get detail to pop but yea, 3Delight... sucks that there is no way to control the strength!
 

Faery_Light

Dances with Bees
Contributing Artist
I found using both, a regular bump map in the bump slot and a normal in displacement, one set lower than the other, give the texture a better look.
Even with Superfly.
I guess since learning Poser ans Material rooms I find i like to experiment and see what I get...lol.
When i get something I like i keep it and have a template for other sets.
And by asking and getting input from more experienced artists I learn more. :)
 

Gadget Girl

Extraordinary
Contributing Artist
Firefly and Superfly use opposite directions (in vs out) for the green channel of a normal. If making a dual engine material, consider using a component node set @1 (reading green) and using a color math node to negate the green component for the second root node's gradient bump (set to normal) socket.

So question here. I've been working on a script to make it easier to convert FF materials to SF.I t should be pretty easy to add in a few nodes if a normal map is found on the FF shader, but I'm not quite grasping what your saying here.

Mostly I'm hampered by the fact that I understand a good deal about the material room, but far from everything. What sort of node do you mean by a component node? It sounds like you think two nodes should be added, the second being a color math node. Would you be willing to post an example of the two nodes?
 

eclark1894

Visionary
So question here. I've been working on a script to make it easier to convert FF materials to SF.I t should be pretty easy to add in a few nodes if a normal map is found on the FF shader, but I'm not quite grasping what your saying here.

Mostly I'm hampered by the fact that I understand a good deal about the material room, but far from everything. What sort of node do you mean by a component node? It sounds like you think two nodes should be added, the second being a color math node. Would you be willing to post an example of the two nodes?
A component node is a custom node that contains several nodes designed to control a certain attribute(s) in a shader. Ghostship, for example has a component node set up where you can change what kind of metal shader you can get just by clicking one button.
 

seachnasaigh

Energetic
Earl, you're thinking of a compound node. Component is under new node : math : component. It reads the red/green/blue components of a color map (or a point in space).

The component field of the component node can be set to 0, 1, or 2. Set at zero, the component node returns the red color value of an RGB image. Set to 1, it returns the green color value. Set to 2, it returns the blue color value. The "answer" that the component puts out is greyscale.

Instead of looking at an RGB image map, you can have the component node look at a point in space, but for our present purpose, you set the color box to white and plug the normal map into it. With the component node set to 1, it returns the green value of the normal map.

Come to think of it, I wonder if one could simply color invert (new node : Cycles : color : invert) the normal map. Alternatively, could one negate the gradient bump value (-1 instead of +1)? I'll try those ideas. I don't have time to right now, because I've got to run down to the hardware store for more gas plumbing parts, and get some piping installed.

For automating this adaptation, the problem I foresee is how do you know whether the normal map is intended for the Firefly protocol or the Superfly protocol? Thus, you don't know which engine/root needs to have the green component inverted. You can usually figure it out in context (grass blades should stick up/out from the ground), but I don't know of a way to automate that decision.
 

Faery_Light

Dances with Bees
Contributing Artist
what happens if you take the normal map (mine came out blue) and just gray scale it like a bump map?
 

Gadget Girl

Extraordinary
Contributing Artist
Earl, you're thinking of a compound node. Component is under new node : math : component. It reads the red/green/blue components of a color map (or a point in space).

So I partly feel silly because I went down the list of possible nodes in the material room and read right past component. When I looked this time, it was there.

For automating this adaptation, the problem I foresee is how do you know whether the normal map is intended for the Firefly protocol or the Superfly protocol? Thus, you don't know which engine/root needs to have the green component inverted. You can usually figure it out in context (grass blades should stick up/out from the ground), but I don't know of a way to automate that decision.

So in this case, my script assumes you have something set up correctly for Firefly. It's for converting over materials made before Superfly was a thing, and also for people who feel more comfortable in Firefly to help them create Superfly materials. At the moment the main part of what it does, is take things off the Poser Surface Node, create a Physical Surface Node, and plug things back in the right way. So I was thinking of having something that ran if it found a Normal map so it could correctly adjust it for SF.

But ignoring all that, I figured I would also try and get the materials working for a shoe I was working on. But no matter how I try wiring things, it doesn't seem like the green is changing. Here's what I have:



Do I have things plugged in the wrong order? None of the math functions seem to inverse the green. Ignoring all the ones that give me just black or white previews, the rest are either totally wrong colors or seem to look the same (I'm mostly look at the upper edges, which seems to be the greenest part of the normal).
 

Ken1171

Esteemed
Contributing Artist
I am just guessing here, but I think invert means getting the complementary value of the green channel (1 - GreenChannel). You can do that with Math -> Subtract. But this results into ONLY the inverted green channel, so you need to combine it back with the other two to make the complete map again. Only after that you will have the proper normal map.
 

seachnasaigh

Energetic

Ah! I couldn't find this thread for weeks!:oops:

Gadget Girl, I've experimented, and found that reversing the Green channel only seems to change the direction of the "depth" shadowing by 90'. The raised detail still looks raised! So, I don't see any benefit -nor need- to invert the Green change in the material room.

Further, I found that my tiled texture generator (Genetica 4.0 Studio) can produce normal maps for either/both systems. So I was able to check my material room "flip Y" method with an inverted Y map. Same result.

So, I would say disregard my concern about the two different standards used for normal maps. Firefly and Superfly seem to do OK without correction.
Here's a normal sampler tile pack with both the OpenGL normal (tangent space, as used for Firefly) and the DivX normal with inverted Y (MikkT, used by Superfly). In case you want to experiment.:D

It's *not* in runtime format, but in my library these are in runtime\textures\seachnasaigh\Genetica tiles.
 

English Bob

Adventurous
I want to experiment!

All this talk of inverted green channels reminded me of the Great Bump Map Disaster of Poser 4 days.

I set up a simple scene with three single-sided planes and a cylinder, lit by a single spotlight in the top right corner as we look at it (0.5, 0.5, 0.5 PNU, pointed at the cylinder). In all the following examples, the left hand square carries the diamond fence normal map, and the right hand square carries the inverted version. I set Gradient_Mode to Tangent Space Normal Map for both renderers.

Firefly:
FF Tangent Space Normal Maps (inverted on R).jpg


Superfly:
SF Tangent Space Normal Maps (inverted on R).jpg


The inverted version triumphs in both cases - the edges which catch the light are the ones you would expect.

For reference, here's a Superfly render with Gradient_Mode set to Object Space Normal Map:
SF Object Space Normal Maps (inverted on R).jpg


It's obviously wrong. I'm not clear on why the tangent space map is better in Superfly, but I'm a normal map newbie. I usually just plug them in and hope for the best. :cautious: Clearly, I need to pay better attention.
 

English Bob

Adventurous
3Delight uses obsolete "tangent space" for normal maps, which will display incorrectly in mirrored geometries,. [...] Exact same problems as in Poser.

Second test, prompted by Ken's comment from earlier in this thread. Here we have two squares; the one on the right has had its geometry mirrored across X using Spanki's invaluable STOMP utility. Both squares otherwise have the same material, using seachnasaigh's diamond fence normal inverted.jpg plugged into gradient bump, with Gradient_Mode set to Tangent Space Normal Map. Rendered in Poser 11 Firefly with the same single spot as before:

FF Tangent Space Normal Maps (mirrored geometry on R).jpg


Now that doesn't make a lot of sense to me, since the mirrored geometry is a perfectly valid mesh, which works in every other respect. Both squares have anti-clockwise winding order, which is how Poser determines the surface normal; there are no explicit normals in the OBJ files.

In this second render, I used seachnasaigh's diamond fence height map.jpg as a 'regular' bump map, with the strength set to 0.001 PNU:

FF Bump Maps (mirrored geometry on R).jpg


Given that I don't know what it is about the mirrored mesh that causes tangent space normal maps to misbehave, I'd want to be very careful about using them. How could I know if a mesh I was using had the magic feature that caused this misbehaviour?

If I have a choice, my preference would be to stick with bump maps.
 

Ken1171

Esteemed
Contributing Artist
@English Bob What causes the maps (any maps, not just normal) to show inverted in mirrored geometries is the fact that the UV map is also mirrored, and there is nothing you can do about that. Firefly and 3Delight use "tangent space" to map the textures, which shows up inverted in mirrored geometry renders. Examples of mirrored geometries are the other hand of gloves, the other foot of shoes, boots and so on. However, this is NOT necessarily an error depending on how we look at it. If the UVs are inverted, any maps will show as inverted as well.

Modern renderers like Cycles/Superfly, Lux, Octane, and iRay use MikkT space instead of tangent, which automatically compensates for the mirrored UVs when rendered. By "compensate" it means it will automatically detect inverted UVs and flip them for us, so they render the way we want them. It doesn't change the models or the UVs - they are still inverted, though. It's the rendering that gets changed.

So if you render the same normal map with an inverted copy in Superfly or 3Delight, one will show inverted. If rendered with Superfly or iRay, will both show correctly. You have to set them to tangent space in the materials, though. It is also recommended that all bump, normal, transparency, specular, and height maps should have gamma correction set to "1.0", and not the default "2.2", or else they might render overblown.

Hope that helps. :)
 

English Bob

Adventurous
What causes the maps (any maps, not just normal) to show inverted in mirrored geometries is the fact that the UV map is also mirrored

Thanks, it was my fault for using a symmetrical map to do the testing. As you say, this is often the behaviour you want, so that a single map can be used on both items of a pair. I've used it myself, in fact, so silly me for not remembering.

There are other legitimate reasons for UV mapping to go 'the other way', and if tangent mapping can't cope with that, then I'm not sorry that it's becoming obsolete. :p

So if you render the same normal map with an inverted copy in Superfly or 3Delight, one will show inverted.

I think you meant to type 'Firefly' there?
 

Ken1171

Esteemed
Contributing Artist
@seachnasaigh Bump maps will show inverted as well, so when it comes to normal vs bump, none is the better (in this particular case) because both are affected by the OBJ's inverted UV map. What really matters here is that this only shows in Firefly and 3Delight renders. It doesn't happen with Superfly or Iray because they compensate for the inverted UVs. :)

@English Bob Yes, that was a typo. I meant Firefly. ^^
 

Gadget Girl

Extraordinary
Contributing Artist
@GadgetGirl: If you want to experiment, this is the conversion nodework I used:

Thanks for sharing that. I don't have time to experiment at the moment, but if nothing else that looks like a useful setup for learning about a lot of the math nodes, which I know I don't know well enough.
 
Top