Filter: Safe | Sat, Jun 20, 11:06 AM CDT

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Lobo3433, Staff Forum Coordinators: Anim8dtoon

Poser Python Scripting F.A.Q (Last Updated: 2026 Apr 22 10:09 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: script to make poser window anaglyph?


  • 1
  • 2
anxcon ( ) posted Sat, 29 January 2005 at 3:11 PM · edited Sat, 20 June 2026 at 11:02 AM

i dont know anything about python so i post here and someone else can make (if posible) in poser i have my main screen showing my scene that im creating i want to be able to have that 1 window (in 1 part, not a split window) to show 2 cameras blended together for 1 view main camera showing only red channel aux camera showing only green/blue channels so i have a realtime view (as an anaglyph) of my scene rendering every little change in camera and making them into anaglyph manually takes forever, and realtime feedback of camera changes to it would make making anaglyph pics easier and faster anaglyphs are the pictures/movies that use red/blue 3d glasses


underdog ( ) posted Sun, 30 January 2005 at 1:56 AM

Attached Link: http://www.poserpython.com/ScriptsPage.html

I think you are looking for the script on this page: http://www.poserpython.com/ScriptsPage.html It's called "DualCamera.." Is that what you wanted?


anxcon ( ) posted Sun, 30 January 2005 at 5:57 PM

no not quite that script is like 90% right but instead of the 2 pics left and right, i need 1 pic main camera showing only red channel aux camera showing only green/blue channels on ONE picture, NOT split :) see what i need now? if i have to i can make a pic in poser+psp n show o_o


ockham ( ) posted Mon, 31 January 2005 at 4:27 PM

If you're on Windows, I can do it. (The solution requires an external piece of code that only works on Windows.) Show a picture of how you want it....

My python page
My ShareCG freebies


anxcon ( ) posted Tue, 01 February 2005 at 12:15 AM

file_177510.jpg

i need it to look like the window on bottom (anaglyph) top set is normal split window, which i dont want main camera (left eye view) has red channel aux camera (right eye view) has green/blue channels and it shows as 1 window (as seen below) note: the the windows above if posible wont show ...ONLY ONE window on (seen on bottom) shows ...which is just the 2 cameras combined see exactly what i need?:)


underdog ( ) posted Fri, 04 February 2005 at 5:39 PM

I am not sure how to combine these colors. Did you need this on Windows? I would like to see something like this, Ockham, if you are still interested in writing it. If you want to generate random dot stereograms from poser files, that would be cool too. But only if you really want to. :-D


ockham ( ) posted Fri, 04 February 2005 at 9:58 PM

Attached Link: http://ockhamsbungalow.com/PPP/Anaglyph.zip

Here it is if you want to try it. It's not as automatic as Anxcon wanted, but it does give the desired combination. Warning: It's strictly Windows! (Relies on an external piece of C code, in the Win API)

My python page
My ShareCG freebies


ockham ( ) posted Fri, 04 February 2005 at 10:00 PM

The combining action is not done in Win GDI; it's just a file operation. So it could be written in straight Python, but would be somewhat slower (I think.)

My python page
My ShareCG freebies


underdog ( ) posted Fri, 04 February 2005 at 10:40 PM

I would be interested in seeing that 'c' code if you want to post it. As for me, I am off to try it and dig out my red blue glasses..

But.. before I go.. a story..

I am kind of old. Perhaps not the oldest on here, but I was one of the first people in St Louis to own a Commodore Amiga 1000 back in November of 1985. A couple of years (or so) later, a friend of mine from the user-group got some Haitex 3D shutter glasses.

WAY KEWL. We took my video camera, set it on a tripod, and grabbed some stuff to shoot. A clay skull that I made in highschool, an old cap-gun from silver dollar city that looked like it was from the 1800's, a decorative treasure-box, some costume jewelry... it looked like pirates treasure.. Then we pointed the camera at it, shot a frame, move the camera a few inches ("there, that outta be enough...") and shot another frame.

...when we put it into the Amiga... MAGIC.

It really looked like my Amiga monitor was a "carpeted box" with the skull, gun, glass beads, etc, sitting inside.. Yet you could still see the pixels.. hard to explain how magical it seemed..

To this day I still can't figure out why 3D LCD shutter glasses aren't popular. Ah well. Off to try that code.

===Underdog===


ockham ( ) posted Fri, 04 February 2005 at 10:51 PM

file_177512.jpg

Here's the C code. It's written to be compiled into a PYD using the Swig system, which is a whole nother story. The last routine, Mix, is the part that could be thrown directly into Python. The ShowBMP routine is sneaky and rather nasty; it plants a BMP into TKinter's Canvas without TK's knowledge. So a conversion into strict Python would still have to use some external way of showing the image; perhaps giving a command-line call to Irfan or something like that.

My python page
My ShareCG freebies


underdog ( ) posted Fri, 04 February 2005 at 11:15 PM

thanks! btw.. that install didn't work out right. I had to create the camfade directory. The ZIP file has this path...

Runtime/Python/poserScripts/Anaglyph

...but the scrypt is looking for this path...

Runtime/Python/poserScripts/camfade/Outputs

It can create one level of directory (Outputs) but not two levels (camfade/Outputs)..

Once I got that figured out, I realized that the "Render()" calls were commented out. Then I had to move the 2nd DrawAll() call so it took place before the render call (the Aux camera was saving the 'display' view).

Now I get the BMP files created with red-blue mixed...

...but! there is still a problem I can't fix. The displayed image isn't showing up in the dialog box. It does create the BMP file and I think it looks pretty good. I can't find my damned 3d glasses! Any of them (h'yuck h'yuck!)... My kids absconded with them, curse their black little souls ... just kidding.

Anyway, I am off to search some more for 3D goggles.. Last time I had to hand make some.. but that is another long story..

===Underdog===


ockham ( ) posted Fri, 04 February 2005 at 11:21 PM

OOps, I'll correct the path and repost. The Render() calls were removed for speed, because Anxcon wanted something that was close to immediate. I'll set up two versions, one with and one without.

My python page
My ShareCG freebies


ockham ( ) posted Fri, 04 February 2005 at 11:29 PM

Attached Link: http://ockhamsbungalow.com/PPP/Anaglyph.zip

Okay, that's done. Same link as before. I'm anxiously awaiting your judgment on the image itself, because I don't have any idea what it should look like. I suspect the mixing needs to be done in a fancier way, not just by ORing the pixels....

My python page
My ShareCG freebies


underdog ( ) posted Sat, 05 February 2005 at 12:58 AM

I hope you weren't waiting for MY judgement as I am apparently no longer in possession of red-blue glasses. I will look more tomorrow... I guess we have to wait for anxcon to respond to this. I was busy trying to convert Mix to python and realizing that I don't know how to read and write binary data in python. Let alone then display the image once it is written to a file! IIRC, I can't do that? I know Perl really well, and I am always struggling with what I find to be difficult documentation for Python. But that is probably just me. Lots of folks love that language...


anxcon ( ) posted Sat, 05 February 2005 at 1:18 AM

ok sorry if i actin like a critic, especially since i cant do any of this myself :) just trying to guide it to perfection :) ok looks like its on almost right track (btw used unmoved V3 as a test to look) but when i look at the image created (without glasses, and with) i see it mostly straight, but some areas are a bit grainy kinda and window showing pic is same size no matter poser window size so that look might be the result of resizing imagine down? (since my poser window is much larger than the anaglyph window) but as for showing the colors channels together, looks right posible have output window follow posers window size? so both show exact same size pics, if posible current one too small for me :) 27 inch monitor next when i click on "show" i get alot of lag suddenly while the files are saved and loaded from my harddive is it posible to leave entire process in ram? and while the "show" button helps speed up the whole testing angles alot (this idea will kill my comp tho if the pictures arent totally handled in ram), a "Live" button to cause the window to do live updates, and work more like poser main window does, would add both speed and even better end pics assuming you can get above 2 ideas to work, i noticed the window doesnt show while im changing a dial for camera is there a way for the window to stay on top always? if so, add a "always on top" button the live part would require it, while other parts it would cause more annoyance than good, so ya button :) umm should probably shut up now :) just tryin be thorough if above stuff is done, ill add more input maybe lol thanks :)


underdog ( ) posted Sat, 05 February 2005 at 1:34 AM

heh heh heh.. I am still waiting for the random dot stereograms!! (just kidding)

anyway.. I wonder if setting your output window in the animation properties would change the render window size? either there or the render options..

try changing either..
"Animation->Animation Setup"
or..
"Render->Render Options"
...and see if that changes your output window size.

Also, FYI.. I think you are going to run into problems with the way Poser handles interactivity really soon now. Poser doesn't do the "remain on top and still let me click the camera" stuff very well if at ALL.. Just a sad but true fact.

I am out of my depth on this stuff, so I can't help. I can nit-pick some directory issues and then I pretty much have to step aside. I can tell you that saving to RAM instead of disk seems unlikely. The problem is that Poser only lets you do certain things, and if they aren't there.. well it's pretty tough if even possible to do them.

For example.. wouldn't you think it would be easy to create an AVI (movie) file using Poser python? It's NOT. You can create sequences of images, and you can create a flash movie (SWF), but you can't create an AVI. It isn't supported by the poser library.

So buffering images in RAM is pretty tough. But it doesn't hurt to ask, eh?


underdog ( ) posted Sat, 05 February 2005 at 1:43 AM

BTW, ockham, looking at that 'c' code for the bitmap manipulation: shouldn't you be doing an 'fseek()' on the GrnFile for 36 bytes after reading the header from RedFile? If not, won't GrnFile be off by 36 bytes?


underdog ( ) posted Sat, 05 February 2005 at 1:46 AM

Oh and anxcon, I am wrong about the Render Options / Animation Setup stuff. That preview window is hardcoded in the python script. You might be able to change the number. You can definately find the "out.BMP" file and see what it looks like at full resolution. That file is in.. .../Runtime/Python/poserScripts/Anaglyph/Outputs/out.BMP


anxcon ( ) posted Sat, 05 February 2005 at 2:37 AM

file_177514.jpg

this is result top Grn (angle 1) then Red (angle 2) then Out (blended) the output files are much bigger than the script shows inside poser and ya images were changed a bit in mixing, they off a bit as well as that unwanted effect in the Out pic o_o i need do a few things then sleep back in around 10 hours


anxcon ( ) posted Sat, 05 February 2005 at 3:11 AM

o another thought if you cant have the "always on top" part for the window while clicking cam controls, then what about on the window, have 2 arrows, right and left, a click changes X orbit of Aux came by +/- 0.1 degrees, or a box to enter amount that each click effects it then a number is also displayed showing value of X orbit Aux - Main = # (ie 23.4 - 21 = 2.4) and posibly when script is first started, Aux cam copies all stats from main cam and changes X orbit to Main +2 (default startup)


ockham ( ) posted Sat, 05 February 2005 at 8:26 AM

Okay, I'm awake again. Sort of. Underdog: Thanks for the fseek catch! That was exactly why the pictures were unsynchronized. Anxcon: I can certainly do the Main/Aux action as you describe; but shouldn't it be Y orbit instead of X orbit?

My python page
My ShareCG freebies


ockham ( ) posted Sat, 05 February 2005 at 8:52 AM

Attached Link: http://ockhamsbungalow.com/PPP/Anaglyph.zip

Made those two changes, using Y orbit. Try it now.....

My python page
My ShareCG freebies


ockham ( ) posted Sat, 05 February 2005 at 8:54 AM

file_177515.jpg

Here's what it looks like on my computer after moving the Aux by 0.9 degrees from its starting point....

My python page
My ShareCG freebies


underdog ( ) posted Sat, 05 February 2005 at 11:37 AM · edited Sat, 05 February 2005 at 11:45 AM

I gotta say, Ockham: I sure hope you are stinkin' rich from whatever you do as your "day job". All of this free help is wonderful. Everyone already knows this, but it doesn't hurt repeating it..

All Right Then. This weekend I really HAVE to get that Poser Python Script Archive working.

I put a few hours into the upload page this last week, and I almost have it ready, but I am still trying to get the organization of the catalog right once the files are uploaded.

Anyone reading this want to suggest categories for Poser Python scripts? Message edited on: 02/05/2005 11:45


ockham ( ) posted Sat, 05 February 2005 at 2:24 PM

I'm happy you're serving as Editor or Beta for these. Seems like I'm missing a lot of details in the last week or so. This seems to happen about twice a year; means it's time for a break from programming to defrag the old "wet RAM". -------- Some categories that seem likely: Lights Camera Textures Morph and magnet organizers Animation helpers (Naturalizer, randomizers) Multiple prop / Multiple figure control Sound and music Render control File organizers (Extractors)

My python page
My ShareCG freebies


anxcon ( ) posted Sat, 05 February 2005 at 2:46 PM

i installed the recent files and used even tried reinstall 4 times but its acting like no last version like no changes were made -.- ill fiddle with it little more and be back in a few


ockham ( ) posted Sat, 05 February 2005 at 2:55 PM · edited Sat, 05 February 2005 at 3:04 PM

Attached Link: http://ockhamsbungalow.com/PPP/Anaglyph3.zip

Sometimes my stupid web-server doesn't change to the new version when I use the same name. (Some sort of "caching".)

Try this link with a different version name.
Also, be sure to install "manually" by extracting the
files into a temp folder, then moving to Poser area.

Message edited on: 02/05/2005 15:04

My python page
My ShareCG freebies


ockham ( ) posted Sat, 05 February 2005 at 3:04 PM

Note the switch to 3 in the link above, not 2. Last minute correction!

My python page
My ShareCG freebies


anxcon ( ) posted Sat, 05 February 2005 at 3:12 PM

i always install manually :) brb testing


ockham ( ) posted Sat, 05 February 2005 at 3:39 PM

Python Powered Props. Could also be called Kits.... a prop or figure that uses a custom script to run itself, or a script that is tied to a custom set of "stock" props like my Weather kit.

My python page
My ShareCG freebies


anxcon ( ) posted Sat, 05 February 2005 at 3:53 PM

file_177517.jpg

(using P5 btw) latest "out" pic still has the lines look? and the red/blue is gone :S also the box showing degrees off starts and 0 and only way to increase is to add 0.1 at a time each change is a new update meaning more lag perhaps set it so key sets the value that was input to it


anxcon ( ) posted Sat, 05 February 2005 at 4:25 PM

so "enter" key sets the value*


ockham ( ) posted Sat, 05 February 2005 at 4:36 PM

file_177519.jpg

I've tried in both 4 and 5, and the image is good on my computer. Are you sure the right PYD file is in the DLLs folder? Here's a directory snapshot of the proper file.... On the slowdown, I do see what you mean. Will try to solve it. Would you rather see the actual Aux yOrbit setting in the window, instead of the difference between Aux and Main?

My python page
My ShareCG freebies


underdog ( ) posted Sat, 05 February 2005 at 4:46 PM

I wouldn't worry too much about the beta stuff ockham. I sure as hell don't want anyone to hold my feet to the fire for a wrong directory name and stuff like that. If they do, they can find their free stuff elsewhere, fur shure. You just keep crankin' them out and I will try to keep you honest from time to time. :-D ===Underdog===


anxcon ( ) posted Sat, 05 February 2005 at 5:16 PM

_anaglyphmodule15 62,464 bytes 2/5/05 6:17 AM _anaglyphmodule22 65,536 bytes 2/5/05 6:18 PM both of those came with the zip and are in dll folder


ockham ( ) posted Sat, 05 February 2005 at 5:23 PM

Attached Link: http://ockhamsbungalow.com/PPP/Anaglyph4.zip

Yup, those are the latest PYDs. I wonder if your Poser is set to produce a different format of BMP, that my Mix code doesn't agree with? Here's a revision that seems to run faster, and includes your Enter-the-aux idea.

My python page
My ShareCG freebies


anxcon ( ) posted Sat, 05 February 2005 at 5:45 PM

as for the aux cam coords, 3 options 1) show the "difference" in degrees (my prefered way) 2) show both main and aux yorbit 3) show "center point" and a 2nd window shows "+/- #" meaning main is center - # and aux is center + # but you would have to change the arrow keys to effect main and aux yorbit when clicked, so center stays same id take option 1 or 3, 3 is accually lil nicer but then it effects main camera, when i use that to do things so option 1 is best, but your choice to add others ill test latest update :)


anxcon ( ) posted Sat, 05 February 2005 at 9:26 PM

no ideas for the line problem, you on pc or mac? me pc does your code care the poser window size? perhaps some resizing is going on somewhere? Out looks same size as the window in poser tho, so thats straight


ockham ( ) posted Sat, 05 February 2005 at 9:38 PM

It shouldn't be affected by the display size. The mix action just reads two BMP files, skips the header part, then combines the pixels one by one, with red from the Main (RED.BMP) and green and blue from the Aux (GRN.BMP) Red file...r.g.b.r.g.b.r.g.b Grn file...R.G.B.R.G.B.R.G.B Out file...r.G.B.r.G.B.r.G.B It's all PC; if you were on Mac, it wouldn't even begin to work.

My python page
My ShareCG freebies


ockham ( ) posted Sat, 05 February 2005 at 9:42 PM

The only way this could fail is if your BMP files don't follow this same format. I thought all Poser BMPs used the same format, but maybe not.... Could you ZIP up one of your RED.BMP files and send it to me? Posting it here won't help; no telling what the net does to an image. email occam24@aol.com

My python page
My ShareCG freebies


underdog ( ) posted Sat, 05 February 2005 at 10:53 PM · edited Sat, 05 February 2005 at 10:56 PM

uh. I posted the same idea and then finally READ what ockham had already suggested. oops.. :)

Message edited on: 02/05/2005 22:56


underdog ( ) posted Sat, 05 February 2005 at 11:12 PM

Attached Link: http://www.fantasy3d.com/pfiles/python/Anaglyph4B.zip

With Ockham's permission, I have modified the AnaglyphRender.py script in two ways. The link will send you the entire archive again with the updated file in it.

I changed it to not render images until you click the Show button. I also added a mouse click event to START the Out.BMP file with whatever you have associated with the BMP suffix on your box.

Feedback is appreciated!


anxcon ( ) posted Sun, 06 February 2005 at 2:04 AM

"Could you ZIP up one of your RED.BMP files and send it to me? Posting it here won't help; no telling what the net does to an image." forum doesnt accept bmp anyways :) had to convert to jpg sent you red/grn/out hope you dont mind the model :) just the project i saved for testing the script lol also a new addition to the cam controls have it so when you change yorbit on aux cam it cant go any less than yorbit of main cam cuz the anaglyph work by having right/left pics its not really needed, just an "idiot proof" feature lol as for my bmp format, i didnt know was different kinds of bmp :S have fun :)


ockham ( ) posted Sun, 06 February 2005 at 11:56 AM

OK, I'll put in the leftward limit. Makes sense. Analyzing the BMPs now; they appear to be the same format, so that's not the problem. There are different BMP types, for 2-color, 256-color, and 'palette' vs 'RGB' true color. It didn't seem likely that Poser would use different types on different computers, but Poser is full of mysteries, and I wanted to be sure.

My python page
My ShareCG freebies


ockham ( ) posted Sun, 06 February 2005 at 12:04 PM

file_177521.jpg

Aha. When I expand my display window, it looks like yours. Now I can start solving.... it's very hard to debug by "remote control."

My python page
My ShareCG freebies


anxcon ( ) posted Sun, 06 February 2005 at 12:18 PM · edited Sun, 06 February 2005 at 12:20 PM

oooooooooo ya
i kinda knew that color thing from like 10 years ago
dunno why it didnt pop in before :S

sits and awaits next update dont forget underdog's files :P i posted same time as you :S glad ya found it :D this could be best plugin ever ya know :D

Message edited on: 02/06/2005 12:20


ockham ( ) posted Sun, 06 February 2005 at 2:09 PM

Attached Link: http://ockhamsbungalow.com/PPP/Anaglyph5.zip

See if this is any better. It looks better on my computer in large size, but that doesn't necessarily mean anything. Reinstall the whole thing, because I changed the PYD files as well. Also included the left-limit and Underdog's click-to-show.

My python page
My ShareCG freebies


ockham ( ) posted Sun, 06 February 2005 at 2:41 PM · edited Sun, 06 February 2005 at 2:43 PM

Attached Link: http://ockhamsbungalow.com/PPP/Anaglyph6.zip

Added an Animate button, so when you've found the right setting you can automatically mix all frames, with outputs in the standard form like Image_0001.BMP, Image_0002.bmp,,,, Of course, the animation is done in Preview mode in AnaglyphPreview.py, and in Render mode in the other script.

Message edited on: 02/06/2005 14:43

My python page
My ShareCG freebies


anxcon ( ) posted Sun, 06 February 2005 at 3:06 PM

brb testing ^_^


anxcon ( ) posted Sun, 06 February 2005 at 3:11 PM

nope still the same mixing problem for me perhaps tell the window size you are using? i can test at that size and see if it works :)


ockham ( ) posted Sun, 06 February 2005 at 3:18 PM

Hmm. My standard size is around 400 x 400.

My python page
My ShareCG freebies


  • 1
  • 2

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.