Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Wednesday, August 29, 2007

Poser Python the missing manual

I've been playing with python in Poser a bit and found the E-Frontier version was just a list of objects and methods so I was very glad to see this new product available from one of the known experts on Poser Python, Phil Cooke (known as PhilC on Renderosity).
The "book" consists of:

  • A 388 page PDF manual

  • Over 100 python scripts

  • Graphics files for use in the examples

  • XML files for use in the interface examples

  • 3d models for use in the examples

The book cleverly hooks the examples and scripts into the menus of Poser and in the manual it explains how this was done.


I found the PDF manual to be a little variable. The getting started section is clear and gently drops you into the Poser python world. The intro to python gives a good descriptions of the different types of control statements such as for, if, while etc however the description about boolean operators is overly complicated and confusing. However someone with basic programming knowledge in another language such as VB or Javascript should be able to easily understand the python way.

The bulk of the manual (184 pages) is about creating graphical user interfaces for your scripts, Phil looks at three different techniques and mentions some of their advantages and disadvantages from simple input boxes to complex interactive forms. This section is full of detail with screenshots and clear explanations. If you wish to create UI components for your script then you should buy this book for this section alone.

The next section of the manual provided a mirror of the efrontier manual. Phil covers some topics here in good detail with screenshots and examples and there others are more spartan. I would have liked to have seen this section restructured by topic, e.g. hair, geometry, posing etc.

The manual finishes with an explanation of the utility scripts provided. The provided scripts and examples are easy to read and clearly documented. The example scripts are repeated in the manual with additional explanation.

Although it is possible to navigate the book via the bookmarks and searching, I would have liked to have seen a table of contents and perhaps a small index. The structure of the document feels disjointed as it it's been assembled from others rather than planned properly. An annoying characteristic is having a heading on the bottom of one page followed by the text that it relates to on the next, I also spotted at least one spelling mistake.

The manual specifically mentions that it is for Poser 7 but lots of it also applies to Poser 6. Phil has explained some of the differences for Mac and PC users and where Poser Python features are limited.

Despite it's annoyances and limitations this should prove to be a handy reference guide and indispensable if I need to make any UIs for Poser. I think given that it's a first version the price is a little high but I benefited from the US/UK exchange rate so think I did ok.

See these store pages for details and sample pages:

Friday, July 27, 2007

Distributed rendering?

I was just reading about Microsoft's Compute Cluster and how it used the Message Passing Interface (MPI) protocol to share the work across the nodes. This caused me to wonder what kind of protocols the various distributed rendering solutions used. As far as I can tell the network rendering in Carrara uses a proprietory solution that uses broadcasts TCP packets over a Lan. Piovra one of the Blender network projects uses TCP sockets and custom commands. For software such as Maya there also seems to be no standardisation.

The advantage of introducing some form of standardisation is that there will be more tools for debugging, analysing and possiblities of performance increases by swapping in newer libraries. The developers can concentrate on writing code for dealing with the graphics and UIs rather than on writing low level code for networking and distributing processes.



Given that Blender, DazStudio, Vue and Poser all use Python as an internal scripting language, they could use the Python version of MPI although I am slightly puzzled by some of the comments in their manual that implies that the messages passed from here would not be compatible with the C versions. There would also need to be a standardise language for describing the rendering processes.


2/8/2007 Update

Mac OS X supports MPI in it's XGrid and a demo of using this with POVRay was done a few years back.


There are several other python MPI implementations at SourceForge and another example of Povray.

Friday, July 13, 2007

Take a step to the left


In the latest animation sequence of the Flea Circus Film, the Ring Master turns to the left and takes a step closer to the table to peer over the ring.
This proved to be a rather tricky maneuver in Poser. Because the leg moves and pauses I knew that it was likely to be affected by the issue with splines that I had back in February. However the key issue was that to rotate a figure in poser, you rotate their hip and the rest of the body follows. When turning people rotate around the foot that is on the ground not around the hip. As per usual I sought help from Renderosity and as per usual LittleDragon and PhilC came to my help with some suggestions and ideas. One of these was to parent the actor to an object that was at the point of rotation and rotate that. One of the issues with this is that an object can't change parents mid animation. Also the IK functionality does not help here with the feet sheering off when rotated.

However these technique seemed a little too manual for my liking and I wondered if it could be done with Poser's Python scripting language. In a moment of clarity, I thought back to my A-Level Maths days and remembered something like the following:

"that a rotation, about any point, is equivalent to a rotation (by the same angle) about the origin combined with a linear translation"

The Poser Python documentation that comes with Poser6 is not very user friendly, I was hoping for a graphical object model but the document is just a straight list of values, objects and methods in PDF form. There's also no examples with it (although there are some on the web). So the net effect is that I've not had a chance to get coding. I'm not sure if the Poser7 manual is any better and there does not appear to be any books for sale on this topic although there are plenty on Python and Poser separately.







However in the process of investigating Poser Python I stumbled across PoserSpeak a Windows based product that uses SAPI to add voices to your poser characters.