Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 28 11:20 am)
I've added the definitions of the functions PM and PMC to the above script, but now it's falling over on the function TrueFresnel().
At a guess I'd say that BB has built these functions into his own version of Matmatic, and we don't have them (?).
"If I were a shadow, I know I wouldn't like to be half of
what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki
Murakami)
Sorry I took so long to answer - I have many meetings lately and I'm not in here as often sometimes.
I probably should have mentioned this with the posting...
Izi is right - I have some new functions in matmatic that the script is using. Many in fact. I'm preparing to release matmatic version 1.1!!!
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)
Here is TrueFresnel
def TrueFresnel(ior):
n1 = 1.0
n2 = ior
nr = n1 / n2
nrsq = nr * nr
cosAi = EdgeBlend(1, 0, 1)
if isNode(ior) or ior < 1:
cosAt = sqrt(Max(1 - nrsq * (1 - cosAi2), 0))
else:
cosAt = sqrt(1 - nrsq * (1 - cosAi2))
s1 = n1 * cosAi
s2 = n2 * cosAt
p1 = n1 * cosAt
p2 = n2 * cosAi
Rs = ((s1 - s2) / (s1 + s2)) ** 2
Rp = ((p1 - p2) / (p1 + p2)) ** 2
R = .5 * (Rs + Rp)
return R
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)
Thanks BB! And my stock phrase: "No need for sorry".
Latexluv, here is the complete script, tested, including those missing functions.
"If I were a shadow, I know I wouldn't like to be half of
what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki
Murakami)
Thanks Izi! I'll give that a try. I put together a scene with the P8 car to test out the discussion in this thread.
"A lonely climber walks a tightrope to where dreams are born and never die!" - Billy Thorpe, song: Edge of Madness, album: East of Eden's Gate
Weapons of choice:
Poser Pro 2012, SR2, Paintshop Pro 8
In matmatic 1.1, PM and PMC are more interesting. Either moves all the nodes over two columns and places the parameter nodes down the left side. I used to do that with a hack, but now it is built into matmatic.
There is also PM2 to place nodes in the second column, and PM3 to place them in the third column.
Regardless of how many parameter columns you use, there will always be a blank column before the surface node. This leaves some extra space for you to manually add nodes that get plugged into the parameters.
Any other ideas I should implement?
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)
...if I could jump in here with a quick question to BB and you who are proficient with Matmatic.
I've been reading the docs for matmatic and I´m at the basic stage. I'm confident that I´ll be able to understand the Python programming bit but where I start to fall off is when the actual nodes come to play. (okay this is gonna be a silly question but...) Should I play more with the basic nodes in Poser before attempting Matmatic scripting? My only experience in the material room has been with VSS and that mostly been moving image maps around and setting up blender nodes. So what node in particular should I familiarize myself with before tackling basic Matmatic scripting?
Oh - and of course Math and Color_Math, although there's nothing to understanding the node's themselves. Rather, you need to know when to add two things or multiply two things. And matmatic will almost always take care of building those for you anyway, or eliminating them when there is a way to do so.
For example, the expression a + b may result in a Math, or a Color_Math, or nothing at all. Depends on what a and b are set to.
a = RED
b = BLUE
a+b = MAGENTA
a = 1
b = 3
a+b = 4
a = Diffuse()
b = Blinn()
a+b = a Color_Math:Add node connected to a and b
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)
Quote - Oh - and of course Math and Color_Math, although there's nothing to understanding the node's themselves. Rather, you need to know when to add two things or multiply two things. And matmatic will almost always take care of building those for you anyway, or eliminating them when there is a way to do so.
For example, the expression a + b may result in a Math, or a Color_Math, or nothing at all. Depends on what a and b are set to.
a = RED
b = BLUEa+b = MAGENTA
a = 1
b = 3
a+b = 4a = Diffuse()
b = Blinn()
a+b = a Color_Math:Add node connected to a and b
Ok. thank you. This is slowly creeping in. I will need to sit down and focus my whole attention on this (something I've been finding hard to do lately). I'll take a close look at this after the weekend.
BTW, I found your sequins material yesterday and it kept me up all last night. What a fantastic set of materials. It really makes a huge difference with dynamic clothing. I´m waiting on a render now that I hope will do the material justice. Thanks for that one! Oh and your light meter is real light safer as well (burum boom ka tisshh!). Thanks for that one too!
Quote - > Quote - Any other ideas I should implement?
Do we already have access to the Texture Manager settings in Matmatic?
I was going to say no, based on how I thought this worked, from the original Poser Pro. But I figured I should check it with Poser Pro 2010. Good thing I did. Either I never understood how this worked, or it changed in 2010.
When I looked into this back when PPro came out, I thought I verified that the gamma setting is not stored in the material file. I recall comparing saved mt5 files after making different gamma settings and I found nothing in the material about the setting. But 2010 clearly does store the gamma value in the material if you set it to an explicit value. It does not set it if you leave it at the "use render gamma" setting.
Now this works a little strangely. I loaded an image and saved the material without setting gamma, i.e. leaving the "user render gamma" setting. Nothing is written in the material file about this. Let's call this A.
Then I changed it to explicitly gamma = 1.5 and saved it. The file has an extra line in it saying "gamma 1.5". It is not stored in the same style as other parameters - it's just sitting there naked. OK. Let's call this B.
I then re-loaded A and checked the value in the GUI. It was still 1.5. Hmmm.
I did a File/New to start a new scene. I then tried loading A again and it still said it was 1.5. But remember, when I saved A, the setting was "use render gamma", not 1.5.
I then closed Poser and started it again. This time, loading A gives me "use render gamma".
Loading B then A once again I'm stuck at 1.5.
I then set it to 2 and saved a third file, C.
Loading B or C would always produce the expected value.
But loading A always leaves the gamma value at what it was before for that image file.
So - I can't promise that you are able to load a material and get the "use render gamma" setting. It will depend on what you did before you tried to load that material. It seems that Poser remembers (during a session) how you last explicitly set the gamma for the image file itself, and loading a material with an ImageMap that doesn't say what gamma to use results in the existing value being retained. I find this odd.
No matter. I think in the use cases where this is important (bump maps, transparency maps) you're going to get the behavior you want because you'll be setting the gamma to 1 and that always seems to apply.
I'll add it to matmatic 1.1.
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)
Any feedback on my last image? kinda derailed my thread there BB
TemplarGFX
3D Hobbyist since 1996
I use poser native units
It should look like this.
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)
heres another, using a HDR image from Dosch as the env sphere (at 1.0)
I also changed the out-of-camera buildings so its more surrounded
pixel samples at 1.0 here as these small renders take a couple of hours as it is :p
TemplarGFX
3D Hobbyist since 1996
I use poser native units
The car looks good. The lighting is still a teeny bit underexposed, but that's easily corrected in postwork. If it were a lot underexposed, I'd raise the light level.
The figure's skin still lacks specular. It looks to me like you haven't raised the Shine since I suggested to do so.
I'd hide the car and hair (for speed) and do some tuning with just the VSS parameters.
Maybe I'd drop the Diffuse Reflectivity a bit, too.
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)
Quote - > Quote - Here I set my EnvSphere luminance to .01. It's not the best image, though - others might be better.
Using parameter dials, I set the infinite light color to .9, .9, 1, making it a bit blue. I set intensity to 10%.
Okay??? Luminance??? Do you mean the ambient of the EnvSphere?
"A lonely climber walks a tightrope to where dreams are born and never die!" - Billy Thorpe, song: Edge of Madness, album: East of Eden's Gate
Weapons of choice:
Poser Pro 2012, SR2, Paintshop Pro 8
Quote -
Okay??? Luminance??? Do you mean the ambient of the EnvSphere?
Yes. In my EnvSphere EnvPanoramic shader there is an HSV node. You adjust the luminance using the "Value" in the HSV node. Otherwise, if you're just connecting the image to Ambient_Color, then you'd control it with Ambient_Value.
I like using the HSV node because I like to adjust saturation as well sometimes.
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)
I set the PM:shine level to 2.0 do you suggest higher?
EDIT
lowering diffuse reflectivity seems to help. ill do another render.
please continue to discuss what you were discussing, just an odd bit of feedback on my image would be nice (as thats why I created the thread :p)
TemplarGFX
3D Hobbyist since 1996
I use poser native units
Nah. I don't like thread drift myself. Makes it hard to link to things or find them. Matmatic discussions should go elsewhere.
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)
Quote - > Quote -
Okay??? Luminance??? Do you mean the ambient of the EnvSphere?
Yes. In my EnvSphere EnvPanoramic shader there is an HSV node. You adjust the luminance using the "Value" in the HSV node. Otherwise, if you're just connecting the image to Ambient_Color, then you'd control it with Ambient_Value.
I like using the HSV node because I like to adjust saturation as well sometimes.
Ah ha! This just fixed the problem I've been having in rendering M4 this week. I was getting to the point where I hated all the M4 textures that I have (and that's not very many), because he was rendering so pale and blown out. Making that one adjustment to the EnvSphere made him look more normal in coloring. Sorry for the subject drift!
"A lonely climber walks a tightrope to where dreams are born and never die!" - Billy Thorpe, song: Edge of Madness, album: East of Eden's Gate
Weapons of choice:
Poser Pro 2012, SR2, Paintshop Pro 8
Quote - pixel samples at 1.0 here as these small renders take a couple of hours as it is :p
A couple of hours each render? Your patience is doing you a disservice!
You could take Min shading rate up to 1 or even 2 and your test renders would be much faster without, I think, altering the paint shader much. I'd sooner do that than lose the anti-aliasing by reducing pixel samples. Giving your model a headshave would also help a lot. Or at least make her hair invisible to raytracing.
Sorry about the drift...
"If I were a shadow, I know I wouldn't like to be half of
what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki
Murakami)
Ive adjusted the shine and the diffuse in VSS
I replaced the environment image with Dosch's free 50mb HDR sphere map and the lighting came out much more realisticly I think.
I also replaced much of the surroundings with some buildings from one of Stonemasons other products
I think this looks about as good as it gets, in the final I am going to use a little dof, but I havent played with that yet
TemplarGFX
3D Hobbyist since 1996
I use poser native units
I think the car looks terrific, except for the orange indicators and repeaters. Usually these are a hard, shiny, semi-transparent plastic, which should at least have some specular reflections. Here they look dull and completely opaque.
Personally, I would still not be happy about the lack of specular on the model, particularly her legs. They look very flat and lifeless to me. But perhaps the model is not your main focus.
"If I were a shadow, I know I wouldn't like to be half of
what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki
Murakami)
I agree the indicators need work, there are just a simple color at the moment. the old material I had is terrible so I need to make a new one.
This image is sortof a "promo" to the re-release of my 158 Car Materials freebie (its a few more now) that I have gone over and made some adjustments to so they work in P8 with IDL.
That being said, the image is not all about the promo! I would appreciate any ideas on the skin, here is the current VSS configuration I am using :
PM:Shine 0.25
PM:Shine Spread : 0.7
PM:Shine Level : 2.0
PM:Diffuse Reflectivity : 0.5
PM:SSS 0.3
PM:SSS Color Default Red
PM:SSS Falloff 1.0
PM:SSS Boost 1.0
Texture Set : Daz3D Elite Series Lana
I'll try increasing PM:Shine and see what happens!
TemplarGFX
3D Hobbyist since 1996
I use poser native units
The intensity of the Shine (and Shine Level) is mediated by the specular map. If the specular map is black, you'll never get any shine.
If there is no specular map, VSS uses the red component of the color map. Because the starting luminance of maps is different, this means the overall shine luminance is different from one texture set to another.
So it's really difficult to tell you what value to use. If the skin texture is very light, 2.0 can be ridiculous. If the skin texture is very dark, you may need 20 not 2.
PM:Shine is a master specular parameter that simulaneously adjusts Shine Spread and Shine Level. (In opposite directions)
For the purpose of "calibrating" the shader to your texture, just use Shine Level.
Increasing shine will decrease spread, and increase level.
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)
Regarding the car material, it doesn't look right, if I understand what I'm seeing correctly, i.e. I think I'm seeing reflections of the sky.
If you have HDR sky, then the reflections of any surface turned away from the camera should be much brighter than what I see.
Are you using the true Fresnel equations, or just something you eyeballed? I used to eyeball it, and it was always off. Now I only use true Fresnel values.
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)
Hmm. Scratch what I said about it not looking right. It really depends on the relative luminance of the sky photo versus the local lighting.
In real life, it can look like that, or it can look different. Sigh.
Just put a reflectivity knob in for the user.
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)
Nevertheless, here's something to look at.
The paint reflections of the sky seem brighter to me in my image than in yours, and my glass seems darker. Mine are using the Fresnel reflectance equations I got from Wiki.
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)
Not read any of the above posts, just to give my impressions:
Skin looks over saturated and doesn't react to light correctly.
Way too much stepping in curved areas.
I think that's enough to go on.
Coppula eam se non posit acceptera jocularum.
are you commenting on the image in the first post, or the image I posted just above? I only ask because if its the image in the original post, some of these things may have been fixed
TemplarGFX
3D Hobbyist since 1996
I use poser native units
You ain't gonna like this...
Last image:
Over saturated, too dark (some of us still have real monitors which display proper colours), pose is horrible with way too much body parts sinking into other body parts, lighting and overall shading is a million times better but it's a crappy image mainly because the outfit looks dreadful. And what's with the 6 foot wide knee on a pin sized shin? Either the model or the pose (or both) needs to go.
Coppula eam se non posit acceptera jocularum.
Im always open for feedback good or bad! I'll re-pose and dress v4 and give it a test, I think I'll try standing on the street behind the car...
TemplarGFX
3D Hobbyist since 1996
I use poser native units
BB : How do I use that true fresnel script you posted earlier?
I gotta say I like this one alot better
TemplarGFX
3D Hobbyist since 1996
I use poser native units
TemplarGFX
3D Hobbyist since 1996
I use poser native units
this image is of the other side of the model, the light is still behind (in the back of this shot) and the lighting on her skin is IDL at work
TemplarGFX
3D Hobbyist since 1996
I use poser native units
TemplarGFX
3D Hobbyist since 1996
I use poser native units
Quote - Here is a high res render, I think this is the winner, unless anyone has any last ideas
This is looks pretty awesome. One advise I'd give before doing the final render is raise the shadow samples for the sun light. It's very grainy at the moment. Apart from that, this looks perfect!
Quote - BB : How do I use that true fresnel script you posted earlier?
The TrueFresnel function takes an IOR as an argument, and returns a node tree that calculates the correct Reflection_Value to use. It implements the Fresnel equations exactly.
I used IOR=1.45 for car paint. Use IOR=1.33 for water. Use IOR=.75 for when you're underwater. Use 1.54 or thereabouts for paint. Use IOR=20 (approx) for softly shiny metal. Use IOR=40 for shiny metal (like chrome).
How you use the output of TrueFresnel depends on the material, and also depends on whether you're making a GC material. A full explanation is many pages.
But for plain paint, simplest version, without GC in the shader:
fresnel = TrueFresnel(1.45)
specular = Blinn(...) # whatever
diffColor = .5 * RED # or whatever
diffValue = .8 * (1 - fresnel) # Conservation of energy says if you're reflecting, you're not diffusing
s = Surface(diffColor, diffValue, 1, 0, Alternate_Specular = specular)
s.Reflection_Color = Reflect()
s.Reflection_Value = fresnel
For thin glass, there are multiple internal reflections that compound the Fresnel reflectivity. And since thin glass doesn't bend light enough to matter, we use transparency instead of refraction.
The function to generate thin-glass compound reflection is 2 * r / (1 + r), where r is the ordinary Fresnel reflectance.
fresnel = TrueFresnel(1.54)
fresnel = 2 * fresnel / (1 + fresnel)
s = Surface(1, 0, 1, 0)
s.Transparency = fresnel
s.Reflection_Color = Reflect()
s.Reflection_Value = 1
Of course you'd probably want to include a specular in 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)
Quote - > Quote - BB : How do I use that true fresnel script you posted earlier?
The TrueFresnel function takes an IOR as an argument, and returns a node tree that calculates the correct Reflection_Value to use. It implements the Fresnel equations exactly.
I used IOR=1.45 for car paint. Use IOR=1.33 for water. Use IOR=.75 for when you're underwater. Use 1.54 or thereabouts for paint. Use IOR=20 (approx) for softly shiny metal. Use IOR=40 for shiny metal (like chrome).
How you use the output of TrueFresnel depends on the material, and also depends on whether you're making a GC material. A full explanation is many pages.
But for plain paint, simplest version, without GC in the shader:
fresnel = TrueFresnel(1.45)
specular = Blinn(...) # whatever
diffColor = .5 * RED # or whatever
diffValue = .8 * (1 - fresnel) # Conservation of energy says if you're reflecting, you're not diffusing
s = Surface(diffColor, diffValue, 1, 0, Alternate_Specular = specular)
s.Reflection_Color = Reflect()
s.Reflection_Value = fresnelFor thin glass, there are multiple internal reflections that compound the Fresnel reflectivity. And since thin glass doesn't bend light enough to matter, we use transparency instead of refraction.
The function to generate thin-glass compound reflection is 2 * r / (1 + r), where r is the ordinary Fresnel reflectance.
fresnel = TrueFresnel(1.54)
fresnel = 2 * fresnel / (1 + fresnel)
s = Surface(1, 0, 1, 0)
s.Transparency = fresnel
s.Reflection_Color = Reflect()
s.Reflection_Value = 1Of course you'd probably want to include a specular in that.
does this shader have a lot of nodes? can you please post a screenshot? its easier for me to see teh nodes.
thank you.
Quote - does this shader have a lot of nodes?
It's like you don't even know who I am. LOL
OK I'll show you the nodes. Give me a minute.
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)
This is the small version. If I were to make parameters and nodes for the IOR, the color, the shine, the reflectivity, the sparkles, etc., it becomes 50 nodes, not the 18 you see here.
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)
You need to plug the Reflect node into Alternate_Diffuse to get that to work right.
fresnel = TrueFresnel(1.54)
fresnel = 2 * fresnel / (1 + fresnel)
s = Surface(1, 0, 1, 0)
s.Transparency = fresnel
s.Alternate_Diffuse = Reflect()
Here's what that glass looks like.
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)
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Okay, so it's not just me. Maybe someone can figure out what's going on. I've tried copying and pasting matmatic scripts before from the forums and from the Node Cult and haven't gotten any of them to compile right on my system. I have no problem if BB attaches a matmatic script to a post as a text file. Only when he or someone else posts the code and I manually copy and paste into Notepad.
"A lonely climber walks a tightrope to where dreams are born and never die!" - Billy Thorpe, song: Edge of Madness, album: East of Eden's Gate
Weapons of choice:
Poser Pro 2012, SR2, Paintshop Pro 8