Sat, Nov 30, 2:48 PM 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: how do i turn shadow rendering on from poserpython?


dennisharoldsen ( ) posted Sun, 27 May 2007 at 7:12 PM · edited Sat, 30 November 2024 at 2:42 AM

thanks to those who have helped me in the past.

i tried this:
scene.SetRenderCastShadows(1)

and this:
scene.SetGroundShadows(1)

what else is there?


nruddock ( ) posted Sun, 27 May 2007 at 8:08 PM

Quote - scene.SetGroundShadows(1)

This is for turning on or off the basic preview shadows.

Quote - scene.SetRenderCastShadows(1)

This is a global render setting, and you do need it, but it's not the whole story (see below). > Quote - what else is there ?

actor.SetCastsShadows(1) is required for an actor to cast shadows and
*light.*SetShadow(1) is required for a light to cast shadows.


dennisharoldsen ( ) posted Sun, 27 May 2007 at 8:14 PM

thank you


dennisharoldsen ( ) posted Sun, 27 May 2007 at 9:23 PM

i tried this:

scene = poser.Scene()
scene.SetRenderCastShadows(1)
aLights= scene.Lights()
for light in aLights:
  light.SetShadow(1)
actor = scene.CurrentActor()
actor.SetCastsShadows(1)

no shadows.
how can this be so hard?


svdl ( ) posted Sun, 27 May 2007 at 10:48 PM

Shadows must be cast onto something. If you only have one single actor in the scene, there's nothing that its shadow can be cast on.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


nruddock ( ) posted Mon, 28 May 2007 at 3:03 AM

Most (if not all) items will load set to cast shadows, so unless you've turned them off, it sounds like there's another problem with your scene.
You'll need to post more details (with screenshots) to assist with diagnosing the problem.


dennisharoldsen ( ) posted Mon, 28 May 2007 at 5:29 PM

back again. thanks for the input.

my projects are very simple. 1 standard figure or prop & shadow rendering off.
then i have a script that renders several rotations & exports the rendered images.
my purpose is to make more clipart for my grandsons to use in an image collage program.
i wanted to have a version of each file with and without shadows.

today i investigated turning shadows off.
that works by just setting the lights to not render shadows.
in the future i will not set shadows off when i save projects.
for now, i would need to manually correct and save each poser project.
if nothing else i will do that.

i think that scene.SetRenderCastShadows() should work according to the documentation.
it starts as 1 no matter what the render setting and when i change it, it has no effect.

i also found Shadows() & SetShadows(). No idea what object uses this property.
i tried scene, figure, and actor and got syntax error.

i checked out scene.RenderAntiAliased() as a comparison;
it seems to have a value inherent in the character and it can be changed with a result.

i am using poser7. it seems to have a few rough edges. a real object model would be nice.

thanks


nruddock ( ) posted Mon, 28 May 2007 at 7:01 PM

You may need to do this to make sure the FireFly options are in sync :-

ffopts = scene.CurrentFireFlyOptions()<br></br>ffopts.SetShadows(1)


dennisharoldsen ( ) posted Mon, 28 May 2007 at 8:39 PM

it works. thank you.

i did a basic script first. it changed the render options interface.
i put the code then into my autorender script and it works great.

after my last post, i realized that i had not tried the poser4 render machine.
it works with the code we had explored.

you (nruddock) have specifically answered two major questions that were stopping me.
in the process, i have also learned more about the syntax.
i don't know how you know this stuff but you seem to have a handle on it.

thanks again.


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.