Sun, Dec 1, 6:18 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 29 7:57 am)



Subject: Poser Pro changeGamma script not working properly


IsaoShi ( ) posted Sat, 13 December 2008 at 1:31 PM · edited Sun, 01 December 2024 at 6:16 AM

I know this script has been mentioned recently in another thread, but this is a different issue.

I want to use this script to change the Gamma In value of all my bump, displacement and transparency maps to 1.0. I enter 1 for the Gamma value, then select "All props and figures", then select "All the above" (which means Transparency, Bump, Gradient_Bump and Displacement maps). It thinks for a bit, but does nothing to any of the Gamma In values. It also does nothing if I select only one of these map types.

However, if at the third step I select "All materials", it changes all Gamma In settings to use the value that I entered. This is no good because I then have to go back and reset all of the colour maps to use the scene render value.

So it seems that the script is unable to recognise which image maps it should be changing when you only select a subset - which is what you would normally want to do.

Has anyone else seen this problem, and found a way round it? Please?

"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)


nruddock ( ) posted Sat, 13 December 2008 at 3:05 PM

I've seen other people mention the same thing.
Unfortunately I can't look at the script and see what might be the problem as I don't have PPro.


IsaoShi ( ) posted Sun, 14 December 2008 at 8:29 AM · edited Sun, 14 December 2008 at 8:31 AM

This is the part of the script that applies the gamma setting to each material, depending on the selected node types.

I would guess that the problem is with the variable "name" not matching the expected values, but I'm not that clever with Poser Python to know how to check it out. Maybe someone cleverer than me can put their finger on what needs to be done...

def setGammaPerMaterial(mat, newGamma, channel, revert):

shdrTree = mat.ShaderTree(); 

allAboveFlag=0

if (shdrTree):

for node in shdrTree.Nodes():

for input in node.Inputs():

name = input.InternalName()

texture = input.Texture()

if (texture):

if (channel == "All materials"):

changeOneGamma(texture, newGamma, revert)

else:

if (((channel == "Transparency") or (channel == "All of the above")) and (name == "Transparency_Max")):

changeOneGamma(texture, newGamma, revert)

elif (((channel == "Gradient_Bump") or (channel == "All of the above")) and (name == "Gradient_Bump")):

changeOneGamma(texture, newGamma, revert)

elif (((channel == "Displacement") or (channel == "All of the above")) and (name == "Displacement")):

changeOneGamma(texture, newGamma, revert)

elif (((channel == "Bump") or (channel == "All of the above")) and (name == "Bump")):

changeOneGamma(texture, newGamma, revert)

"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)


adroge ( ) posted Thu, 18 December 2008 at 3:48 AM

in the latest service release 1.2, there is an update to that script. Don't know if it will help you though. you can get it from the www.smithmicro.com web page.


IsaoShi ( ) posted Thu, 18 December 2008 at 4:20 AM

Ah, thanks for the information, adroge. I thought I was right up to date with SR1, and I hadn't heard anything about SR1.2. I guess I should use the 'Check for updates' switch.

I'll apply the update this evening and report back whether or not it fixes the problem.

"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)


Teyon ( ) posted Mon, 05 January 2009 at 6:03 PM

Did the update fix the problem?


IsaoShi ( ) posted Mon, 05 January 2009 at 7:02 PM

Oops, I forgot to post a reply here. No, it didn't.

I already had SR1 installed. SR1.2 is SR1 plus some more updates for the Poser Pro full version plug-ins, but I only have the Base version without those plug-ins.

I downloaded and tried out the new changeGamma script, but it made no difference. It still doesn't change the gamma for the required image maps. It only updates if you select "all".

"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)


Teyon ( ) posted Mon, 05 January 2009 at 7:16 PM

Ah. Yes, I was afraid of that. Thanks for the info.


Privacy Notice

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.