Tue, Nov 19, 5:38 AM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Looking for a Script to mass change shader rates on a figure


Khai ( ) posted Tue, 24 March 2009 at 2:00 PM · edited Mon, 11 November 2024 at 8:48 PM

can someone please be a very cool person and create a script to change a figures default shading rate from the default .2 to an inputted value?


Sunfire ( ) posted Tue, 24 March 2009 at 2:06 PM

I second the request for such a script. Going in by hand and changing the shading rate on all the actors on a big busy scean is more daunting than the creating of the scene!

Sunfire's Creations


semidieu ( ) posted Tue, 24 March 2009 at 2:39 PM

file_427054.txt

Like this ?

It applies the entered value on all figures and props in the scene.

Rename the script as SetShadingRate.py (you must change the extension)l


Khai ( ) posted Tue, 24 March 2009 at 2:53 PM

I owe you one.. that works perfectly! thanks! :)


Sunfire ( ) posted Tue, 24 March 2009 at 2:58 PM

Me too, thanks. Love it.

Sunfire's Creations


semidieu ( ) posted Tue, 24 March 2009 at 3:04 PM

You're welcome :D


infinity10 ( ) posted Tue, 24 March 2009 at 10:22 PM

 Crikey, you mean the shading rate is for individual scene components, and not the whole scene ?!  I didn't know that ..

- grabs python -

Eternal Hobbyist

 


Khai ( ) posted Tue, 24 March 2009 at 11:10 PM

as well as. the Great BagginsBill pointed us at it.


semidieu ( ) posted Wed, 25 March 2009 at 5:30 AM

The value you set in the Render Settings is the value really used with the FireFly render engine. But if this value is lower than the  one in the actor, it will use the actor's minimum shading rate.

So reducing the values in the actors and props allows to use even lower values in the FireFly render settings.


IsaoShi ( ) posted Wed, 25 March 2009 at 9:50 AM

Or increasing the shading rate for all actors apart from the critical ones in your scene should allow for faster renders... n'est ce pas?

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


semidieu ( ) posted Wed, 25 March 2009 at 11:07 AM

In theory, yes :)


infinity10 ( ) posted Wed, 25 March 2009 at 12:34 PM

 Geewhiz... I learned some things here which explain A LOT of my rendering results.   Honestly did not know about these until just now.  

Eternal Hobbyist

 


Sunfire ( ) posted Wed, 25 March 2009 at 1:15 PM

Khai and I are just passing on what we learned from BagginsBill, and are glad to do so. :)

Sunfire's Creations


IsaoShi ( ) posted Wed, 25 March 2009 at 3:54 PM · edited Wed, 25 March 2009 at 3:55 PM

file_427120.txt

I wanted a script that applied a chosen shading rate to a selected actor, figure, or the whole scene.

So I stitched together this script, based on SVDL's TextureFilter dialogue and the code that semidieu gave us above.

I'm not yet clever enough in Python Widgets to combine the two dialogues into a single screen. The script first asks you for a shading rate value, then for what you want to apply it to.

If someone wants to tidy it up by combining the two dialogues, please feel free!

As before, change the file extension from .txt to .py after download.

(edit) I just realised I have not yet tested this on a figure... I'll do that now!

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


semidieu ( ) posted Thu, 26 March 2009 at 2:15 PM

Hi!

Thanks for the edited version! Instead of doing like this, you should 'simply' ask if you want to apply to all or only to the currently selected figure or actor.


IsaoShi ( ) posted Thu, 26 March 2009 at 2:50 PM

Thanks for the advice, semidieu. I know what you mean, but I don't know enough about Python coding to do it myself.

I could probably find bits and pieces from other scripts to tack together, but I wouldn't know how to write them myself.

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


semidieu ( ) posted Thu, 26 March 2009 at 3:04 PM

file_427187.txt

Here is a version with the choice to apply to the current figure/prop or to all actors/props.


IsaoShi ( ) posted Tue, 31 March 2009 at 3:05 PM

oops... forgot to say thanks for the new version. :O)

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


semidieu ( ) posted Tue, 31 March 2009 at 3:38 PM

You're welcome :)


Khai ( ) posted Wed, 01 April 2009 at 10:07 AM

thank you :)


MistyLaraCarrara ( ) posted Wed, 19 December 2012 at 2:36 PM

kewl.  Thanks!



♥ My Gallery Albums    ♥   My YT   ♥   Party in the CarrarArtists Forum  ♪♪ 10 years of Carrara forum ♥ My FreeStuff


markschum ( ) posted Wed, 19 December 2012 at 4:59 PM

drat , late to the party again ;)

I just posted mine on a differnt question.


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.