normalized normals?

When we load a PRT, do the normals get normalized? Or are they left at whatever magnitude they are set at in the file?

Just thinking to myself that the magnitude could be used to encode, with no additional data, an extra scalar which could be say… the specular level or glossiness per point.

  • Chad

In some papers, this is called the “surface magnitude”, and is used to define glossiness, or as a metric for surface definition, or as a means of thresholding out low quality normals.

  • Chad

developer.download.nvidia.com/wh … l_Maps.pdf

Apparently, Nvidia would like us to call it the Toksvig factor, which scales the specular component by the local average normal length (normalized to the maximum length). So in areas where the normals are all pointing randomly, they average out to near 0, but if they all point in the same direction, they average out to near 1.

Averaging and finding the maximum will be bad for Krakatoa, especially for animated PRTs, but just looking at the absolute lengths, maybe we could get a useful glossiness map. Especially when you let high particle spatial density take care of averaging everything out.

With KCM/KCE coming, we are discussing the addition of explicit channels to read/write shader data like Glossiness, Shininess Strength and some more. Saving one Float channel by denormalizing the normals might not be worth it. We will see.

But there is no glossiness channel at all, currently. Whatever the shading code is under the hood, it’s setting it to be the same for all the particles. I’m just saying if you set it based on the incoming normal, that would be pretty easy to understand and use. If the user has set the normals to unit vectors already, then they’ll get the current result. But if they have glossiness encoded into their normals, then multiplying the glossiness by the length will yield automatically soft and diffuse surfaces where the normals are less “coherent”.

But what I am saying is that we want to provide PER PARTICLE value for Glossiness, Shininess Strength, Absorption (actually we already do, see http://www.franticfilms.com/software/support/krakatoa/absorption_channel.php), eventually Emission (Self-Illumination) and so on. Many of these will be acquired from any assigned material and support mapping, as well as KCM generation and tweaking.
So with the global Specular controls hopefully going away from the Main Controls Rollout, messing with the Normals would be unnecessary - one channel more or less won’t affect the memory consumption that much. For per-particle Glossiness and Shininess Strength, we are looking at two more Float channels. With one of them encoded in the Normals, we would typically save 16 bits per particle, but then most Normal acquisition methods like Krakatoa Geometry Lookup, PRT Loader Culling and various PFlow operators wouldn’t directly support scaled Normals. So you would have to multiply normals in KCM and provide them from outside of Max. I don’t see the big benefit of doing that.

Ah, I see. I didn’t know the plan was to have per point mapping of those parameters. I was trying to find a way to modulate the glossiness based on the controls we have now, which is currently just a global.