xpdev opened this issue on Feb 26, 2014 · 85 posts
I have put some effort on programming some constraints. First, I wanted the shader to be able to cope with a water surface, if the figure or object stands in water. In this case, the foam must be prohibited underneath the water surface. Additionally, the glossyness of a wet skin does not exist under water, so I also removed any specularity (as long as it goes through my shader) underneath the water. Second constraint to be implemented was the upper ending of the foam. We cannot just apply it to a material zone (like i.e. the chest), because the foam will cause an unnatural friction where the chest texture zone meets the neck texture zone. In other words, the foam shader needed to work across texture zones, but also needed to be able to fade out at a given height, if the user doesn't wish to cover the entire figure from feet to head. I did this by implementing another p-node logic, which allows to end the foam at a given height (i.e. 150 cm) and also allow for a soft transition area of a chosen width (i.e. 15 cm). I was not very happy to use the p-node here, but found no alternative. While the p-node makes sense for the lower (water surface) constraint, it is not a perfect means for the upper ending of the foam. If you move the figure up or down in some water swamp, it is very well the shader respects just the water surface and automatically will remove any foam and specularity under water. Unfortunately, the upper foam ending will also remain stationary, when you move the figure up or down (or it bends down or sits down), because the p-node is related to Poser Universe Coordinates, and not to figure coordinates. However, the p-node was still a better choice than using the v-node (UV coordinates), because this would make things even more complicated and difficult. I realized that we would need from SmithMicro for a later Poser version an o-node, which relates to object coordinates. In this case, the foam on Tylers chest will remain exactly there, even if he stands up or sits down. Anyway, please take a look into the screenshot showing details about the constraints, and where to enter your desired values. I am using centimeters as preferred unit and also as poser units. Even if you have set Poser to work in inches or feet, the p-node (to my knowledge) always works in Poser Native Units (PNU). This is why I applied a factor of 0.762 to the y-coordinate. This way I can enter later constraint heights in centimeters, which is very convenient when building up a scene where you need to synchronize your water surface prop with the foam shader. I guess (but could not yet verify) that using a factor of 0.1 in the y-component of the p-node can enable you to enter constraint heights in inches. Those who prefer to work in inches can please test and give us a feedback?
Poser Pro 2014 GameDev, Lightwave 11.6.3, Blacksmith3D Pro 6, Bryce 7, Carrara Pro 8.5, Reality 4 & LuxRender, Python 2.7 & Wx-Python, UV-Mapper Pro, XFrog 3.5, Paintshop Pro X7, Apophysis 7x64
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Don't render faster than your artistic guardian angel can fly...