RobynsVeil opened this issue on Jan 02, 2012 · 71 posts
RobynsVeil posted Mon, 02 January 2012 at 4:08 AM
Being of not entirely sound mind and finally having a few extra minutes (and brain cells, thanks to LaurieA - NOT GIVING IT BACK, LAURIE!!!) I've decided to take up a thread on getting more realistic renders (oh, yeah, did THAT ever devolve into something undefinable!) at this specific point where we had this cool shader set to experiment with, which people all refer to but I've yet to see anyone play with it at all.
Here we are, 4 year on, still lamenting the burnt-in specular plaguing our texture maps and I've decided: let's try this thing.
I wasn't sure which version of Poser this was initially attempted on. Seeing how it was BB, I'd say it was probably Poser Pro. Seeing how it was BB, I'd say lighting was dead-simple. GC at 2.2?
Right.
Oh, I am SO whacking at a hornet's nest, but oh well. Let the rubberneckers all gather 'round and watch me cop it. It's all good. :biggrin:
So: Poser Pro 2012. 1 light: inf, map size 1024 (for shadows?), 100%, white, positioned at 0, 0, 0, all shadows off... and IDL off, and Use Disp maps off and geez, virtually everything off except synch at 2, GC at 2.2, Pixel samples 10 (for now), min shading rate 1 (for now).
I'm using the high-res square to display my texture. Final Render setting will be at 4000 x 4000, now at 2000 x 2000. Set the camera focal length at 300 (minimize distortion? since 25 = wide angle|high distortion , 300 must = extreme closeup|low distortion? dunno).
Test render of my target texture (nose and lips):
Render time: @1 min
That's for a whole face. Might need to up Pixel Samples as well as min shading rate?
Anyway, let's put that spec-remove node set in place:
After this render:
...I thought I would try it with render GC at 1. Orangey image. I took value_2 of the subtract to 2.8 and got:
sooo a lot of the spec has disappeared and on the lips, it's a colour.
Stopping now just because there are so many things I'm unclear about, like what about GC, for instance.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
Anthanasius posted Mon, 02 January 2012 at 4:31 AM
RobynsVeil posted Mon, 02 January 2012 at 4:48 AM
I agree, Anthanasius: good time to stop until I get a few things cleared up. After all, this was published Sept 25th, 2007. No idea what we're really looking at.
Yet.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
ghostman posted Mon, 02 January 2012 at 4:55 AM
This will be interesting.
"Dream like you'll live forever. Live like you'll die tomorrow."
takezo3001 posted Mon, 02 January 2012 at 7:11 AM
What would be wonderful is if you could point us in the direction of any non-pre-spec'd-textures that might reside out there? I know that Daz's default V4 texture were minimal in the burnt on and (Clearly outlined body parts, breasts loin area, etc...) blackened nostrils and would love to see more texture artists go this route as well...If only Bilbo Bagg* BagginsBill, was a texture artist!
BTW, Thanks for the anti-spec tut!
Michael314 posted Mon, 02 January 2012 at 1:12 PM
Hello,
for this purpose, a wiki would be great. To start the list, I'm quite fond of the "Tessen" textures here at RMP.
As for textures with burnt-in speculars, there is the shader solution to remove them, we should also have a list how to configure the despecularizator for every texture, as in my opinion, the parameters depend on the texture set. For the "Rio" textures, I got quite goot results with the attached parameters.
(I had to scale the node setup image, so I repeat the important parameters (red circles) here in text: (4 * comp 2 (blue) - 1,35 * comp 0 (red)). Blender scale: 0.4.
Best regards,
Michael
RobynsVeil posted Mon, 02 January 2012 at 7:21 PM
Thanks, Michael.
Before one really looks at the solution, certain base parameters have to be set. Sort-of like deciding your base unit is inches. Whether inches is the right unit of measure from some qualitative standpoint is really immaterial: just want to be sure that we are all on the same page, or the numbers we enter are meaningless.
Case in point: I tried the above with render GC on (2.2) and settled on keeping it turned off. So, in my fevered mind, we're processing colour components of a corrected image, not linearised. Doesn't really matter to me whether this is okay or not: just wanting to make sure we agree that's what we're doing.
The next thing I sort of want to get the head around is what exactly we are working with in terms of what the nodes do. Like Component. The manual says:
The component node is useful for extracting the red, green or blue component from an input color. It has the following attributes:
Component: The component attribute specifies the color to extract. 0 = red, 1 = green, 2 = blue.
Color: The color attribute provides an input for another node, whose output will be processed according to the component attribute setting.
Point: The point attibute provides an input for a point node whose output will be processed according to the component attribute setting.
This description tells me little. Basically, you set the component attribute (channel) to 0, 1 or 2 to get the red, green or blue component of whatever is plugged into the color channel. When you expand the preview window, you see a grey-scale image. If I plug a simple_color node into the color channel with red as color in simple_color and with component at 0, the preview window displays white. If I make the colour purple (IColor(128, 0, 128)), the preview pane shows a shade of grey. Eyeballing (so, not math-testing this) I put a simple_color node next to the comp node with colour IColor(128, 128, 128) next to it and the preview panes look alike.
So, this still doesn't answer my question. Is this a chroma level? Am I asking the question right? This doesn't address hue, saturation or liminance. For instance, for purple:
...I've already identified that the red component is 128... which is borne out here:
via eyeballing, sort-of. But the hue, saturation and luminance values are significantly different for the two. Would the two bear up well put under the BB microscope?
Anyway, I feel I've got a slightly better idea of what component does. So, they get plugged into a subtract node. Going to BB's explanation of why specular reflections happen:
Quote - But the thing about specular reflections is they effectively blend the diffuse color with a white or near white color. This increases all three color channels, but not in equal amounts. The color becomes desaturated and brighter. So if we can figure out where the speculars are, then by increasing the saturation and decreasing the brightness, we can recover the true diffuse component color. We just need to know where to do that and by how much.
So, the key activity appears to happen in that subtract node:
Quote - I hacked together a specular detector by subtracting a multiple of blue from another multiple of red, giving me a grayscale map of where there was specular and how much. I used that to drive a couple Blender nodes, one for saturation, and one for brightness.I ran those into an HSV node which is receiving the original texture. Because of the specular mask information, it selectively darkens and over-saturates certain pixels - in proportion to how much specular was detected there. The original colors are then coming out of the HSV node.
That would be, in the original:
blue component of image * 4
red component of image * 1.39
So, let's start with which amount (val1 or val2) would be the variable to manage/manipulate spec detection per:
Quote - The Math:Subract node values will control how you detect the specular.
Would one leave one unchanged?
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Mon, 02 January 2012 at 8:19 PM
Thinking about this more:
Quote - The Math:Subract node values will control how you detect the specular.
Going back to the thread to see if there are any clues what needs to be satisfied in order to determine specular has been correctly detected.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Mon, 02 January 2012 at 8:25 PM
Wonder if this is actually addressing my question? What is meant by the term 'ceiling'?
Quote - That would work if the right ceiling was the same everywhere. But you can't just use a single maximum value for any of the components. Some of the areas which are naturally dark have to have a very low threshold in order to remove the specular. The natural true color in some other areas are actually above that threshold, and you'd erroneously drop those lower when there isn't even any specular there.
Here's a render of the texture on a one-sided square. The left half is unmodified. The right half has the treatment.
If you lined everything up right and were careful with render settings, you could render a new version of the modified texture and save that. Then you wouldn't need the nodes any more.
Probably wrong but this says - to me - that both val1 and val2 of the subtract node can be changed.
Now, the question arises (which it should have done ages ago): what do these multiples of a component value actually represent?
Going to go and mess with these values and see what they do.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Mon, 02 January 2012 at 8:41 PM
In just about any face texture image, the highest (sharpest) specular bits appear to be on the lips, followed by the nose and then forehead. In messing with this a bit on the non-dark-skinned texture images, I find that if I drop the blue multiple to 2 (from 4) then even without changing anything else the end-product image appears to have roughly the same overall tone as the original.
This is all eye-balling.
The contrast appears to be softened (less), dark colours a bit lighter, bright colours slightly less. The specular on the lower lip is still visible - however, less so.
I still don't know if I'm meant to change that blue multiple or not.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Mon, 02 January 2012 at 8:50 PM
Leaving the blue-multiple at 4, there appears to be better specular detection at the lips. As in: the tone on the lips is even right the way across. But the overall skin tone is much redder.
Took red-multiple to 2... this lightens the overall tone, keeps the lip specular at bay. At 2.5, the overall skin tone is similar, specular is returning to the lips but not sharply. The skin has a generally flatter latitude of colour range. Settling on 2.3. Now to play with the saturation levels with the saturation Blender node. Is that grey (IColor(85, 85, 85)) a value set in stone?
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Mon, 02 January 2012 at 11:56 PM
Still pondering that whole 4x - 1.39y thing... that really needs to be the first question. The multiples: are they some sort of ratio red to blue? Or inverse ratio?
This is going to drive me crazy.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
ToxicWolf posted Tue, 03 January 2012 at 9:23 AM
:lol: ... You have really opened a can of worms this time, RobynsVeil.
Poser Pro 2012 SR3
Windows 7 Professional 64 bit
Intel Core I7 990x 3.46G 6 core
24G RAM
EVGA GTX580 R Video Card
Single HP LP2475 1920x1200 monitor
______________________________
hborre posted Tue, 03 January 2012 at 9:43 AM Online Now!
I am watching this with interest. This might be a two-fold issue with the red and blue outputs modulated by the HSV node. I think that is where your "ceiling" is located.
RobynsVeil posted Tue, 03 January 2012 at 5:01 PM
Quote - :lol: ... You have really opened a can of worms this time, RobynsVeil.
As I do, TW. :biggrin:
BB says he's aware of this thread but he's up to his armpits in alligators burning the midnight oil coding - he actually has a better solution he's been playing with. Keen to see what this is.
For me, this has been a learning exercise. Since this is (I'm assuming) a hand-cobbled node set - vs matmatic-generated - the nodes each have a specific purpose. To my way of thinking, anyway... such as it is.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
SamTherapy posted Tue, 03 January 2012 at 5:09 PM
You know, there's probably a quick and dirty method in Photoshop, playing around with blending layers in different ways.
Coppula eam se non posit acceptera jocularum.
RobynsVeil posted Tue, 03 January 2012 at 5:12 PM
Quote - I am watching this with interest. This might be a two-fold issue with the red and blue outputs modulated by the HSV node. I think that is where your "ceiling" is located.
You may have a point - pjz99 made some suggestion about a ceiling in that original thread. There's a lot I so don't understand in terms of how that translates to a number, like with the subtract function, for instance. Very curious how he arrived at:
blue component * 4 - red component * 1.39.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Tue, 03 January 2012 at 5:24 PM
Quote - You know, there's probably a quick and dirty method in Photoshop, playing around with blending layers in different ways.
Oh definitely, Sam! Infinitely wiser minds than mine have already suggested not only a complete solution to create perfect spec-free skin textures but also provided links to tutorials for same.
This is an exercise in understanding how this can be done in Poser using maths and nodes.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
SamTherapy posted Tue, 03 January 2012 at 5:56 PM
Ah, I see. Well, it's an interesting read. :)
Coppula eam se non posit acceptera jocularum.
bagginsbill posted Tue, 03 January 2012 at 6:40 PM
Quote - You know, there's probably a quick and dirty method in Photoshop, playing around with blending layers in different ways.
No there isn't. Prove me wrong - whatever you do in PS, I can do better with nodes. Except blur - can't do that.
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)
RobynsVeil posted Tue, 03 January 2012 at 7:00 PM
I was referring to creating a skin texture from scratch in my response, BB... not removing specular burn from an existing one.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
SamTherapy posted Tue, 03 January 2012 at 7:44 PM
Well, I was specifically thinking of killing the specular in Photoshop but I won't dispute if BB says Poser nodes are better.
I'll tell you my train of thought though. Bear in mind I have no idea how to achieve it: it just seemed doable...
Extract the brightness information from an image and duplicate it. Invert the duplicate and put it back somehow* with the original brightness. This should have the effect of averaging it out. Add back to the colour info.
Anyhow, so much for that. As you were, guys and gals. :)
Coppula eam se non posit acceptera jocularum.
bagginsbill posted Tue, 03 January 2012 at 9:16 PM
It was tried by others at the time. Did you look at the other thread, Sam? Others tried showing me how they had "removed the specular" in Photoshop, and then I ran their results through my nodes and found the rest that they had left behind.
Photoshop is math, but not every kind of math, and it is limited to its idea of "gamut". It doesn't allow creating intermediate results involving hyper colors. Poser nodes are not limited in the math at all.
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)
SamTherapy posted Tue, 03 January 2012 at 9:27 PM
I didn't look at the other thread, BB. I'll have to; not now, though. 3.30 am. Time to hit the sack.
Coppula eam se non posit acceptera jocularum.
takezo3001 posted Wed, 04 January 2012 at 12:38 AM
Quote - Hello, for this purpose, a wiki would be great. To start the list, I'm quite fond of the "Tessen" textures here at RMP.
As for textures with burnt-in speculars, there is the shader solution to remove them, we should also have a list how to configure the despecularizator for every texture, as in my opinion, the parameters depend on the texture set. For the "Rio" textures, I got quite goot results with the attached parameters.
(I had to scale the node setup image, so I repeat the important parameters (red circles) here in text: (4 * comp 2 (blue) - 1,35 * comp 0 (red)). Blender scale: 0.4.
Best regards,
Michael
Thanks for the info, but I also like to Im/Export my model via differing 3Dprogs, like Daz Studio, 3DS, and Vue among others, so a poser-specific solution is not always best, plus a texture specific solution is also great for making your own Bump/Displacment maps and burnt specs kill that effect, especially when it's burned into the nose tip and lips!
lmckenzie posted Wed, 04 January 2012 at 3:00 AM
Way beyond my paygrade, but this 'Shop tut seems to address the issue, maybe, kinda sorta
http://www.dgrin.com/showthread.php?t=21648
& for rocket science
http://vision.ai.uiuc.edu/~qyang6/publications/eccv-10-qingxiong-yang.pdf
"Our method is based on a key observation - the maximum fraction of the diffuse color component (so called maximum diffuse chromaticity in the literature) in local patches in color images changes smoothly. Using this property, we can estimate the maximum diffuse chromaticity values of the specular pixels by directly applying low-pass filter to the maximum fraction of the color components of the original image, such that the maximum diffuse chromaticity values can be propagated from the diffuse pixels to the specular pixels. The diffuse color at each pixel can then be computed as a nonlinear function of the estimated maximum diffuse chromaticity."
Or they may be talking about calculating the tea output of China for all I know.
"Democracy is a pathetic belief in the collective wisdom of individual ignorance." - H. L. Mencken
cspear posted Wed, 04 January 2012 at 5:05 AM
There are fairly complex techniques in Photoshop for getting rid of burned-in speculars, shadows and unhelpful colour variations which I've used successfuly on many textures.
There is such wide variation in the degree of burn-in that I doubt that a one-size-fits-all solution is possible, and some texture sets exhibit these problems to such an extreme degree that they are beyond redemption.
The techniques shown in the first link in lmckenzie's post are a good start-point for serious photoshoppers, and while the second link is interesting, at first read-through I can't see an easy way to translate it into something that could be achieved in Photoshop.
I don't doubt that BB can do this using nodes, but I wouldn't know where to start with such an endeavour.
Anyway, hats off to RobynsVeil for starting this discussion - burned in speculars and shadows are starting to drive me up the wall - and if / when I do establish an easy to use workflow in Photoshop, I'll put it up.
Windows 10 x64 Pro - Intel Xeon E5450 @ 3.00GHz (x2)
PoserPro 11 - Units: Metres
Adobe CC 2017
RobynsVeil posted Wed, 04 January 2012 at 5:42 AM
Thanks to all who have expressed an interest in this. I tend to agree with the notion that Poser can provide a means of creating a "baked" solution one could use in other apps. Well, that's where I'd like to go with this. Oh, it's no biggie to just include the node set in your shader if you're going to code it in matmatic anyway - that's still a valid solution. And if you parameterise - in this node set anyway - the subtract node channels and the blending channels of your saturation and brightness blender nodes, you'd give the Parmatic user the ability to mess with how she feels burnt-in specular should be dealt with.
Theoretically.
Personally, I don't think 99.999999% of users want that option. Most want a polished, finished, no-thinking-or-reading-pdfs-necessary solution. I know of which I speak: I created this parameterised makeup shader scheme. Never had any - well, very scant - feedback that indicated anyone dialed in the eyeshadow or tweaked the lip shine any. It was pretty much "we'll take this as served: pass the ketchup, please."
Which - hey! - that's all good. I'll bake me a nice map and serve that.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Wed, 04 January 2012 at 5:46 AM
So far, I think I "got" the 4:1.39 thing. Originally a ratio, used as multiples ... and you mess with the red1.39 channel and leave the blue4 channel alone in the subtract node.
Just checkin'...
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
alexcoppo posted Wed, 04 January 2012 at 7:15 AM
Thanks a lot for the links (especially for the paper one).
Yesterday night, in response to this thread, I did some experiments trying to see whether there was a way of detecting where the speculars where but the method I found (and-ing together the areas with above threshold-1 luminosity and areas with below threshold-2 saturation) was too noisy to be of any use. The paper confirms that you need a much more sophisticated approach.
As usual, the best way to fix a problem is to prevent it so, if people stopped stupidly baking in reflections/highlights, they would provide better products with less work.
Bye.
P.S.: the 4 1.39 numbers look suspiciously similar to the inverses of the coefficients used to compute the Y component of the RGB->YUV transform. Maybe the idea behind the thing is to locate high luminosity regions and tone down the luminosity, keeping chroma info intact.
GIMP 2.7.4, Inkscape 0.48, Genetica 3.6 Basic, FilterForge 3 Professional, Blender 2.61, SketchUp 8, PoserPro 2012, Vue 10 Infinite, World Machine 2.3, GeoControl 2
bagginsbill posted Wed, 04 January 2012 at 7:36 AM
I already explained this elsewhere.
The actual numbers depend on the actual hue of the actual texture I'm using (or you're using.) If you change textures, to one with a different common hue or saturation, then those numbers change.
It is nothing more than eyeballing the average ratio of red to blue, so that the highlights, which you can plainly see with your eyes, show up in the detector.
The nominal ratio would involve a single value, but then you would also need to amplify the delta - I happened to roll the two into one since back then I was a less precise thinker than I am now.
So:
4B - 1.39R
is the same as:
1.39 * (2.878B - R)
What that is saying is: the highest ratio of red to blue that I considered to be a real diffuse value, with no highlight present, was 2.878. Then, I needed about 1.39 amplfication to get the cancellation that I wanted from the detector.
It works because the average hue/saturation has a characteristic ratio of red to blue, and that where there is a highlight, this ratio is disturbed. It happens because specular highlights adds a roughly equal amount to all three components.
Thus, if you were starting with a nominal ratio of
r = kb
where k is some arbitrary constant, and you are on an area where there is a highlight, then it will be such that the highlight disturbed the color as follows:
R = kb + s
B = b + s
The effective red R or blue B coming out of the texture is increased.
The detector is doing
kB - R
which is:
kb + ks - kb - s
leaving:
(k-1)s
Thus it is some measure of the specularity by simply subtracting these two things.
This number has some amplitude that is going to depend on many factors - you will want to scale it with some final amplification to make it into a working detector from 0 to 1.
At the time, I knew nothing about gamma, and if you go back and read the original, I mentioned the difficulty that darker parts seemed to exhibit a greater highlight delta, s, than lighter parts.
Today I understand that to be the effect of gamma. Given two base luminance values, and the addition of a fixed amount to both, the measured numerical difference will be higher on whichever started out lower. This is a simple consequence of the non-linearity of luminance in photographs.
The correct approach is to anti-gamma the texture first, then apply the detector, then apply the highlight remover, then gamma correct the result.
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)
lmckenzie posted Wed, 04 January 2012 at 10:35 AM
"while the second link is interesting, at first read-through I can't see an easy way to translate it into something that could be achieved in Photoshop."
Nah, it was simply the non PS route. Quite a bit of research on the issue. Apparently it plays heck with your computer vision system to have highlights moving all around object's surfaces :-)
Highlight Removal from Single Image
*http://wenku.baidu.com/view/bd2cbcd176eeaeaad1f330d6.html *
Find a way to do it quickly, reliably and automatically, without user intervention and you'll probably get rich. If nothing else, robot babes will love you. 'Is that a specular on your carapace or are you glad to see me?'
"Democracy is a pathetic belief in the collective wisdom of individual ignorance." - H. L. Mencken
masha posted Wed, 04 January 2012 at 5:28 PM
I havent ever painted a skin texture for 3D figures, however I have done 2d portraits a lot. Now in painting 2D faces and bodies it IS the highligths and shadows which bring out the form and depth of the face [or whatever].
What I think I'm reading is that in order for texture artists to avoid 'baked in attrocities' they should totally omit this shaping and forming with shadows and light; rely solely on the underlying mesh with lighting to provide those, and just paint a plain even flesh tone with only tinting/color differences and possible blemishes at various areas. Am I right in this assumption? Is this an accurate description of what's needed for good textures for 3D figures?
What about with photoes used for texturing? what exactly is needed there? Doesnt even the most evenly lit photo create hilites and at least some shadows?
I'd love to hear exact artistic definitions for good texturing of 3D characters.
Thanks :)
cspear posted Thu, 05 January 2012 at 8:31 AM
Quote - I havent ever painted a skin texture for 3D figures, however I have done 2d portraits a lot. Now in painting 2D faces and bodies it IS the highligths and shadows which bring out the form and depth of the face [or whatever].
Yes, in 2D painting you are trying to create the illusion of depth.
Quote - What I think I'm reading is that in order for texture artists to avoid 'baked in attrocities' they should totally omit this shaping and forming with shadows and light; rely solely on the underlying mesh with lighting to provide those, and just paint a plain even flesh tone with only tinting/color differences and possible blemishes at various areas. Am I right in this assumption?
Absolutely, because in 3D, depth is no longer an illusion. The combination of lights and shaders will, if they're set up correctly, accurately produce the shadows, highlights etc. required.
Quote - What about with photoes used for texturing? what exactly is needed there? Doesnt even the most evenly lit photo create hilites and at least some shadows?
Any specular highlights, shadows and so on need to be eliminated. What's required is something as close as possible to the actual skin color, unaffected by directional light.
Windows 10 x64 Pro - Intel Xeon E5450 @ 3.00GHz (x2)
PoserPro 11 - Units: Metres
Adobe CC 2017
hborre posted Thu, 05 January 2012 at 9:21 AM Online Now!
However, don't dismiss specular maps, they certainly enhance the skin textures when rendered under the appropriate lighting conditions. What we really want to accomplish, starting off with the baked specularity eliminated as much as possible.
As for photographic references, harsh, direct lighting should be avoided. Softer, bounced light sets will give better, even illumination.
bagginsbill posted Thu, 05 January 2012 at 9:30 AM
"Specular maps" is an unfortunately ambiguous term in the industry.
Let's break that into two variants:
A map that shows actual highlights, which are the result of light source position, size, color, geometry position and orientation, material behavior, and camera position, ... is bad.
A map that describes material behavior or properties (i.e. shiny here, not there, smooth here, rough there) ... is good.
The kind of specular map that is good does not show highlights. It shows where the potential for a highlight exists, and to what degree (reflectivity level and blur).
Further, the good kind falls into two levels - micro and macro.
Micro level details, such as the shape of poors, the tiny crinkles of skin in general, are not needed to be in a specular map. I can do those with more precision, flexibility, and detail in a procedural.
Macro level details are great in a map. This would be information like:
Forehead area - medium size poors, lots of krinkle - shiny.
Nose area - large poors, almost no krinkle - shiny.
Upper cheek - tiny poors, medium krinkle - slightly shiny.
Lower jaw - no poors, small krinkle - no shine.
I have never seen anybody make such a map for any Poser figure.
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)
Michael314 posted Thu, 05 January 2012 at 12:26 PM
Hello,
Syyd Raven's VanillaSky character has some texture maps which could match this description.
I would post a low res sample of them, but am not sure if that's OK or already copyright violation, so better skip that.
Best regards,
Michael
Michael314 posted Thu, 05 January 2012 at 4:07 PM
I applied this spec mask to some existing texture (replace the usual turbulence modulation of the Blinn node (reflectivity) by this mask). I also applied the complement of the mask as a factor to the blinn's "eccentricity".
The difference is subtle, but noticeable.
Best regards,
Michael
Michael314 posted Fri, 06 January 2012 at 12:45 PM
Hello,
coming back to my first post in this thread, I didn't apply any mathematical rules to determine the factors I used, it was just trial and error until i got something which matched my expectations.
Best regards,
Michael
Michael314 posted Fri, 06 January 2012 at 12:48 PM
Hello,
re the "Photoshop vs. Poser" question, even if Photoshop could do this thing right, I'd still use a Poser solution, simply because i don't have Photoshop ;-).
I think blender could do such as thing, because it's scriptable, but again, it's a another tool in the workchain then.
Best regards,
Michael
bagginsbill posted Fri, 06 January 2012 at 3:07 PM
Parameters:
Normal Color: Load an example from the texture (click it) that shows what color the normal skin is where it has no specular. The shader will use this sample to calibrate itself to your texture.
Strength: How strong is the removal - in case it over-detects, you can reduce the strength. If it exactly detects correctly, strength of 1 is perfect removal.
Split View: If you want the converted image to be split before/after, enter the split point here. To get a 50/50 split, use .5.
It produces two variations. One is a normal shader for loading on a prop. The other is a "Background" shader for loading on the Poser Background. This makes it real easy to re-render the texture with perfect alignment.
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)
bagginsbill posted Fri, 06 January 2012 at 3:07 PM
The bias parameter (one line) is a mistake - leftover experiment that had no value. You can remove that.
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)
bagginsbill posted Fri, 06 January 2012 at 3:13 PM
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)
RobynsVeil posted Fri, 06 January 2012 at 4:20 PM
And chew on it I will... thanks so much for this, Bagginsbill!! Hope you have a spectacular weekend.
Hoping mine will end up being specular-free...
Just looking at it real quick:
So, material-based GC means turn off renderer GC. Have commented out Bias line. (Interestingly, I was messing with bias and gain when I played with your 2007 version).
Confused about a very basic thing, here... sorry if I'm being a dunce. I though linearising was done with AGC() and correcting was done with GC(). No? So:
linearColorMap = GC(colorMap)
has got me scratching.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Fri, 06 January 2012 at 4:22 PM
I'm going to run this and get back with some renders... whilst I don't understand the maths enough to discuss the rest of it, I can already see this is going to be awesome. And no channels to tweak either (except the HSV)...
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
bagginsbill posted Fri, 06 January 2012 at 4:51 PM
Robyn,
Since newer matmatic (1.3?) GC and AGC are built-in, and they are self disabling. You can just never think about that part again.
As for which is which:
An incoming image is already gamma corrected, otherwise it would not look good when displayed. Which means it is non-linear. To make it linear you anti-gamma correct it. AGC converts to linear. GC converts to sRGB.
GC is what you do at the end, in preparation for seeing it on a screen.
Therefore AGC is what you do at the beginning, to undo what was done at the end of the previous thing that made that image you're using.
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)
RobynsVeil posted Fri, 06 January 2012 at 4:54 PM
Right. So:
linearColorMap = GC(colorMap) #as stated in the script
where colorMap is a gamma-corrected image to be linearised? or:
linearColorMap = AGC(colorMap)
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
bagginsbill posted Fri, 06 January 2012 at 5:15 PM
Oops - I didn't even notice that. You're right - I used the wrong function.
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)
RobynsVeil posted Fri, 06 January 2012 at 5:18 PM
No worries, Bagginsbill - I'll make the change - just checking that I understood things correctly.
Thanks so much for this - I'm really excited to use it!!
ETA: oh, and thanks for documenting your code - I so need to follow your example on that. Two weeks later and I'm going "huh?"... :glare:
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
bagginsbill posted Fri, 06 January 2012 at 5:18 PM
It's an interesting question to answer why it still worked with that mistake.
I had to think about it hard.
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)
bagginsbill posted Fri, 06 January 2012 at 5:22 PM
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)
bagginsbill posted Fri, 06 January 2012 at 5:26 PM
I may still have it wrong. I'm on a conference call and distracted.
Have you guessed why it worked?
It's because I was running with render GC, so all my material-based GC or AGC calls were disabled, so it didn't matter if I got them wrong.
Now that I'm testing with render GC off, it's not working right.
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)
RobynsVeil posted Fri, 06 January 2012 at 5:33 PM
-- Disabling GC entirely (by using renderer GC) made it work right.
-- Material GC alone makes it work wrong.
I remember from a previous thread that there was a question of something else (lights?) that was influencing my outcomes with material GC. Dunno if that has any bearing, here...
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
bagginsbill posted Fri, 06 January 2012 at 5:38 PM
Might have found a Poser bug. Switch GC off, render, then GC on, render, I get different results than if I load and render with GC on.
Something about the Background shader or an empty scene means a repeat render with GC switched doesn't work right.
The prop-based one works right every time.
And the Background-based one works as long as you don't switch GC without loading a prop.
x-post: This shader ignores lights. Nothing to do with it. Render without lights - same thing.
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)
RobynsVeil posted Fri, 06 January 2012 at 5:42 PM
So, the script is fine.
-- I'll turn GC off. Save scene (with my hi-res square prop). Close Poser.
-- Load Poser and scene with GC turned off. Run the script and make the materials.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
bagginsbill posted Fri, 06 January 2012 at 5:52 PM
Again - it seems that the prop-based works fine always, and the background-based works fine if the texture is also on a prop, even if we can't see the prop.
It also works fine if you switch before your first render and don't switch after.
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)
Faery_Light posted Sat, 07 January 2012 at 11:13 AM
bookmark
Let me introduce you to my multiple personalities. :)
BluEcho...Faery_Light...Faery_Souls.
RobynsVeil posted Sat, 07 January 2012 at 6:20 PM
I was informed that it's not wise to post even fragments of a skin texture, so I'll show a render using that texture instead.
The approach I used was:
-- include these lines in the script:
path = "runtime:textures:!SaintFox:ToniPolygon:"
textFace = path + "ToniPHead.jpg"
colorMap = PM2(ImageMap(textFace).labelled("Color Map"))
-- run the script without manipulating any values (compile into mt5)
-- load on a high-res square
-- render the square at 4000 x 4000 with the settings I gave earlier
-- save the render as ToniPHeadls3.jpg
-- load this texture for lips and head
The background (non-texture region) ends up being black - not sure how to change that in the script. I photoshop-ped it to be roughly a skin colour as the resultant texture created black lines around the lips. Here's a render:
My focus is on the lips... there still needs to be some manipulating of values I'm unclear on.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Sat, 07 January 2012 at 8:48 PM
It's the Split View thingie - Add(1, 0) fixes it (well, made it white - not sure if that's really a fix).
Put the whole shader on the GROUND instead and used the top camera. The cloth plane was clipping off the side of the texture image.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
bagginsbill posted Sat, 07 January 2012 at 9:31 PM
What? What do you mean "It's the SplitView thingie".
The Split View should be 0 if you don't want to see the original texture.
If you set it to 1, then you will not be seeing the result of the despec. The purpose of split view was to set it to .5, and then half is original color map, and half is despec'd. Or .25 if you want 1/4 original and 3/4 despec'd. Etc.
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)
bagginsbill posted Sat, 07 January 2012 at 9:33 PM
The reason the white background is turned to black is that it is a perfect specular color - white.
I don't think you can get a despec shader to ignore white - that's exactly where it needs to be applied.
Yes I understand that's not in the face, but the shader doesn't know that. Remember, the shader gets to work on one tiny spot at a time, not even a whole pixel. It can't look around and go "oh, I'm not on the face anymore".
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)
RobynsVeil posted Sat, 07 January 2012 at 9:56 PM
Quote - What? What do you mean "It's the SplitView thingie".
The Split View should be 0 if you don't want to see the original texture.
If you set it to 1, then you will not be seeing the result of the despec. The purpose of split view was to set it to .5, and then half is original color map, and half is despec'd. Or .25 if you want 1/4 original and 3/4 despec'd. Etc.
Oh. I see. Just looking at the lip texture, I see no discernable difference between the original and the despecced texture. Set split to PM(.5, ... and see no discernable difference between the right and left side of the texture. GC for the renderer has been turned off.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Sat, 07 January 2012 at 9:58 PM
Btw, hooked that last Blender node to diffuse_color to see the texture displayed on GROUND in preview. Diffuse_Value to 0, of course.
Rendering now...
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Sat, 07 January 2012 at 10:09 PM
Correction: the rendered image does show a difference in the lower part of the face right to left but not in the eyebrow region. I'm going to assume that your script has intelligently identified the paler skin in the eyebrow region as not being paler due to specular burn but rather due to the skin being that colour originally.
As to the lips... I'm going to render again and compare to the original.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
bagginsbill posted Sat, 07 January 2012 at 10:35 PM
Robyn, I'm getting the impression you're not calibrating the shader. There is a color there, initialized to SKIN, but you have to actually choose the color of the lip or whatever it is you're trying to despecularize.
Load the shader. Open a preview on the color map node.
Using the color eye-dropper capability, click on the color chip in the Normal Color node, then click somewhere on the color map where you don't see specular. If it's the lip, click somewhere on the lip.
This is not something you do in Python. You do it in the material room. You click on what is the correct diffuse-only color as an example from the texture you have loaded. Then the shader will use that color as a reference for the correct ratio of diffuse reflection, sans specular.
It compares other points with that reference Normal Color, and things that look whiter than that, it un-whitens.
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)
RobynsVeil posted Sat, 07 January 2012 at 11:53 PM
Wow! You're absolutely right, Bagginsbill: I wasn't calibrating the shader. Thanks for explaining this... how clever is this!
So now, I've got it pretty much optimised for the face - now I'll do the lips and composite the two.
Brilliant stuff - thank you!!!
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
RobynsVeil posted Sat, 07 January 2012 at 11:59 PM
Jeez, this thing is so mind-boggling!~ it's all in real time. Colour change and off you go! Re-rendering now - even the skin looks acceptable, if a bit darker. This is simply incredible!!!!
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
jancory posted Sun, 08 January 2012 at 6:41 AM Online Now!
is there a PP2012 matmatic available? i get "magic number" messages with the copy i'm using from 2010.
lost in the wilderness
Poser 13, Poser11, Win7Pro 64, now with 24GB ram
ooh! i guess i can add my new render(only) machine! Win11, I7, RTX 3060 12GB
bagginsbill posted Sun, 08 January 2012 at 6:53 AM
Quote - is there a PP2012 matmatic available? i get "magic number" messages with the copy i'm using from 2010.
From my web site, matmatic page - been there a while:
ATTENTION!
NEW:
September 21, 2011
Matmatic 1.4.0 for Poser 9 and Pro 2012. The file Matmatic.1.4.0.zip contains the newest binaries, updated Node Reference, and some new demo materials. This package does not contain the full documentation.
(PolygonHair excluded from reference but supported for experimentation.)
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)
jancory posted Sun, 08 January 2012 at 6:55 AM Online Now!
thanks--i should've looked there first....
lost in the wilderness
Poser 13, Poser11, Win7Pro 64, now with 24GB ram
ooh! i guess i can add my new render(only) machine! Win11, I7, RTX 3060 12GB
RobynsVeil posted Sun, 08 January 2012 at 2:24 PM
This script completely works as advertised.
Not sure what I'm doing "wrong" but I appear to be getting colour banding in the colours on the rendered texture close to the reference colour. This happens whether I'm using material GC or not.
ETA: I'm not permitted to show you a sample of the texture map - is my understanding - or I'd give you an example.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]