bagginsbill opened this issue on Apr 23, 2008 · 2832 posts
bagginsbill posted Mon, 20 October 2008 at 9:48 AM
Normally, we don't assign actual image files to Image_Map nodes in the template. However, it is allowed and if you make such assignments, they will be copied into the target material zone along with all the nodes. If, however, the target zone already has an Image_Map with the same node name, it will not be replaced.
Suppose you set the Image_Map called "Lip Map" directly in the template to the file "blurryLip1.jpg". When VSS copies the shader, it will look in the target material for an existing Lip Map Image_Map node. The first time, it will not find one, so it will just go ahead and use the "blurryLip1.jpg" image.
The next time you run synchronize, it will find an existing Lip Map and use the value already there. As long as they are the same, it makes no difference.
But if you go into the template and change Lip Map to be "sharpLip2.jpg", this will not be used on the next synchronize. Instead the value already on the target zone will replace it - in this case "blurryLip1.jpg".
Further, we have to consider what happens when you don't even give the Image_Map a name. Suppose it still has its Poser-assigned default name such as Image_Map_4. Then VSS will try to figure out what the image map is actually used for, and try to assign it a name. If you already have a Color Map (which you do have in my template) that name is not eligible. However, it may get confused by other possibilities. For example, if you connect Image_Map_4 to the specular calculation, VSS might think that the purpose of the image is for a Specular Map, and it may rename it accordingly.
If you want to avoid this (and you should) it is a very good idea to give the Image_Map node a name. Unfortunately I have not provided a tool for you to do that. It should be part of the VSS Designer but it isn't yet.
Fortunately, there is already a Python script out in the wild that renames material nodes. You can use that script to give the map an unambiguous name, so VSS doesn't try to do anything funny with it.
http://poseworks.com/files/addons/WCRO_RenameNode.zip
You install that into your PoserScripts/Wacros/UserDefined folder and then you can change the names of nodes in the material room.
As for the quality of the blur/edge, are you familiar with the Math_Function operations Bias and Gain? You could actually modify the contour of the lip map using those functions, and not have to bother with editing them again. I think that's actually a good idea, because I can think of ways to take advantage of a nice soft blur for various effects, such as a lip liner effect.
I don't have my math function diagram tool finished yet, or I'd show you very easily what I'm talking about. Basically, the Bias function will allow you to shift the mid-point of a math function up or down. That is, Bias(x, .7) means that it bends the values of x so that .5 becomes .7. Bias(x, .2) means that it bends the function x so that .5 becomes .2. The interesting thing about Bias is that 0 stays 0 no matter what, and 1 stays 1 no matter what.
The Gain function bends the input data so that values near 0 get closer to 0 and values near 1 get closer to 1. Basically it increases the slope of your function, while still starting at 0 and ending at 1. So Gain(x, .8) would make a much quicker rise in your lip mask - reducing the amount of blur.
Combining the two, such as Gain(Bias(x, .8), .8) would give you a sharper edge, closer to the outside of the transition zone. And Gain(Bias(x, .2), .8) would give you sharper edge, closer to the inside of the transition zone.
Head exploded yet?
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)