Forum: Poser - OFFICIAL


Subject: Need to Turn Off Shadows for a Whole Figure...

onimusha opened this issue on Jun 26, 2005 ยท 16 posts


onimusha posted Sun, 26 June 2005 at 9:10 PM

Is there an easy way to do this? Thanks...


Fazzel posted Sun, 26 June 2005 at 10:46 PM

In the properties box uncheck cast shadows for everything you don't want to cast a shadow. If you meant the entire figure all at once, I don't think you can unless you were to write some sort of python script.



onimusha posted Sun, 26 June 2005 at 10:51 PM

Is there a python script out there? I have to unshadow 24 figure, each with multiple parts.


TrekkieGrrrl posted Mon, 27 June 2005 at 1:51 AM

I guess you need shadows on other parts, right? Or it would be easier to turn off shadows at the light. I searched freestuff and couldn't find a script for this. Perhaps Ockham or someone equally skilled at Python could do it?

FREEBIES! | My Gallery | My Store | My FB | Tumblr |
You just can't put the words "Poserites" and "happy" in the same sentence - didn't you know that? LaurieA
  Using Poser since 2002. Currently at Version 11.1 - Win 10.



nruddock posted Mon, 27 June 2005 at 3:52 AM

If your using P6 script that will turn off shadows for current figure is attached.

==================================================

If it's not for P6, you'll have to hack at CR2 for each figure to do the job.

Similar to making a MAT, but you want only the castShadow line.
E.g.

{<br></br>version<br></br>  {<br></br>   number 4.0<br></br>  }<br></br>actor hip:1<br></br>    {<br></br>   castsShadow             0<br></br>   }<br></br>figure<br></br> {<br></br>   }<br></br>}<br></br>

One actor block (with name changed) for each actor in the figure.

If that doesn't work there are command line tools that might help (very unlikely that any text editor will handle that big a file).


onimusha posted Mon, 27 June 2005 at 4:56 AM

Okay, I have no idea how to create a python script, so this is what I did: I cut and pasted the text in your link (I do have P6) into word pad. I then saved it and changed the extension from .txt to .py. When I ran it, I got this error: File "", line 7 act.SetCastsShadows(0) ^ SyntaxError: invalid syntax How do I fix it? Thanks for the help by the way... I hate waiting for a render only to havd it turn black...


nruddock posted Mon, 27 June 2005 at 8:34 AM

The script should look like this :-

import poser<br></br><br></br>scene = poser.Scene()<br></br>fig = scene.CurrentFigure()<br></br>if fig != None:<br></br>    for act in fig.Actors():<br></br>        act.SetCastsShadows(0)<br></br>

The spaces are important, so to be on the safe side, right click on the link and save as an appropriately named file.


Tyger_purr posted Mon, 27 June 2005 at 10:06 AM

Is there a python script to turn on shadows in all figures (not just the current one)? I really have too many figures to pick each individualy.

My Homepage - Free stuff and Galleries


nruddock posted Mon, 27 June 2005 at 10:14 AM

Try this :-

import poser<br></br><br></br>scene = poser.Scene()<br></br>for fig in scene.Figures():<br></br>    for act in fig.Actors():<br></br>        act.SetCastsShadows(1)

Poser 6 only.


Tyger_purr posted Mon, 27 June 2005 at 10:41 AM

SyntaxError: invalid syntax act.SetCastsShadows(1)

My Homepage - Free stuff and Galleries


nruddock posted Mon, 27 June 2005 at 11:32 AM

Open the file in a text editor, goto to the end of the file and press Enter, save and try running again.

Python gets upset when there isn't a newline at the end of the last line in a file (I've been caught out by this plenty times).


nickedshield posted Mon, 27 June 2005 at 11:53 AM

Attached Link: http://www.renderosity.com/photos/MSG2/Message2080921.txt

Here's a script written by ockham: cast shadows off/on it should do what you need.

I must remember to remember what it was I had to remember.


Tyger_purr posted Mon, 27 June 2005 at 12:48 PM

putting the enter in at the end made it work for me. I have ockham's script, but i really have too many figures to make it practical.

My Homepage - Free stuff and Galleries


nickedshield posted Mon, 27 June 2005 at 1:07 PM

Oh, well, I tried.

I must remember to remember what it was I had to remember.


lesbentley posted Mon, 27 June 2005 at 2:40 PM

Attached above the text of a pz2 (pose file) that will turn off 'Casts Shadow' for body parts using the standard naming convention, eg P4, V2, V3, etc, type characters. In other words it should work on most characters. It will only work on the currently selected character.

Copy the text in the attahced link and paste it into a text editor. Save it as 'P4V2 ShadowOff.pz2' to a pose folder.

Alternativly you can turn off 'Cast shadows' for the whole scene from the Render Options.

If you need to cast shadows from some props but not cast them from any figures, then this can probably only be implimented from a Python script. Try posting a request in the 'Poser Python Scripting' forum.


onimusha posted Mon, 27 June 2005 at 6:30 PM

YAAYYYYY!!! I love this community... Thanks for the help folks...