Tue, Nov 19, 9:37 AM CST

Renderosity Forums / Poser Technical



Welcome to the Poser Technical Forum

Forum Moderators: Staff

Poser Technical F.A.Q (Last Updated: 2024 Nov 13 12:50 am)

Welcome to the Poser Technical Forum.

Where computer nerds can Pull out their slide rules and not get laughed at. Pocket protectors are not required. ;-)

This is the place you come to ask questions and share new ideas about using the internal file structure of Poser to push the program past it's normal limits.

New users are encouraged to read the FAQ sections here and on the Poser forum before asking questions.



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



Subject: Control a prop from pose file?


pjz99 ( ) posted Fri, 19 October 2007 at 6:30 AM · edited Tue, 19 November 2024 at 7:15 AM

Say I have a prop with many morphs in it.  I'd like to have a pose file set values for the morph dials as required.  Poser doesn't seem to want to write a pose file for a prop though.  Can this be done?  I don't mind writing a pose file by hand, it's only for 8 or so values, but I haven't been able to guess the syntax.

My Freebies


lesbentley ( ) posted Fri, 19 October 2007 at 9:04 AM

Yes, you can write a pose file for a prop (PP2) file. There are some restrictions. First there must be a figure in the scene before any pose (pz2) file will work, the check mark in the pose pallet will not even be available untill a figure is loaded, noe will the pose dots work untill a figure is loaded. Second by the nature of Poser an underscore "_#" and number are appended to the name of every prop loaded. Thus a pose for "box_1" will not work on "box_2". We must distinguish two situations. The first is where the prop is parented to a figure, in this case nothing special is required other than to keep in mind the above restrictions, for example the following will work on a box prop parented to a figure.

{

version
        {
        number 6
        }

 box_1
        {
        channels
                {
                rotateY yrot
                        {
                        keys
                                {
                                k  0  45
                                }
                        }
                }
        }
}

To make this same pose work on a prop that is not parented to a figure we need to address the prop as "actor", eg: {

version
        {
        number 6
        }

 box_1
        {
        channels
                {
                rotateY yrot
                        {
                        keys
                                {
                                k  0  45
                                }
                        }
                }
        }
}

This last version should work in any version of Poser, and irrespective of wether the prop is parented to a figure or not. Almost anything that a pose can to to a figure it can also do to a prop. It can chang material settings, eg load a new textuye map, scale, translate, rotate, lock, force limits, inject new geometry, eg inject the ball geometry into a box prop, provided there is a targetGeon channel available in the pp2 it can even inject a morph.


lesbentley ( ) posted Fri, 19 October 2007 at 9:30 AM · edited Fri, 19 October 2007 at 9:34 AM

There is another syntax you can use to apply a pose to a prop in P5 and up. Poser 5 introduced a new statement "actor $CURRENT",  this applies the pose to the currently selected actor irrespective of whether it is a prop or a body part. A big advantage of using this syntax is if you have a number or instances of the same prop loaded, say box_1, box_2, box_3, you can apply the same pose file to any or all of the props.

{

version
        {
        number 6
        }

actor $CURRENT
        {
        material Preview
                {
                KdColor 0.992157 0.992157 0.992157 1 
                textureMap "GetStringRes(1029,7)"
                }
        }
}

Fore example the above MAT pose can be applied to any Poser primitive, or indeed any prop that uses 'material Preview' as its material. But remember there must still be a figure in the document before it can be applied, and this method does not work in versions before P5.


pjz99 ( ) posted Fri, 19 October 2007 at 9:53 AM · edited Fri, 19 October 2007 at 9:55 AM

Thanks very much for that info, I will give that a try!  I was trying to reverse engineer this technique but was not having any luck - it's annoying that Poser doesn't even throw an error message, just nothing happens when the pose file is bad.  Appreciate your info!
edit: reading what you've got there, I see why I was stuck - the prop is not parented, and the example I was trying to reverse engineer deals with a parented prop :)
Thanks again!

My Freebies


lesbentley ( ) posted Fri, 19 October 2007 at 10:06 AM

Glad to be of service.

From the above postes it should be evident how to write a MOR (morph dial) pose. For a pp2 that only uses one geometry, in P5 or up, you could use 'actor $CURRENT' something like this:

{

version
        {
        number 6
        }


        {
        channels
                {
                targetGeom Morph-01
                        {
                        keys
                                {
                                k  0  1.000
                                }
                        }
                targetGeom Morph-02
                        {
                        keys
                                {
                                k  0  0.500
                                }
                        }
                }
        }
}

If it needs to work in P4, or if there are multiple parts in the pp2, you will have to use this type of syntax: {

version
        {
        number 6
        }

 box_1
        {
        channels
                {
                targetGeom Morph-01
                        {
                        keys
                                {
                                k  0  1.000
                                }
                        }
                }
        }
 box_2
        {
        channels
                {
                targetGeom Morph-01
                        {
                        keys
                                {
                                k  0  0.500
                                }
                        }
                }
        }
}


lesbentley ( ) posted Fri, 19 October 2007 at 10:59 AM

Another trick, you can get Poser to write a pose file for a prop. Parent the prop(s) to a figure, save a pose using 'Select Subset' to select only the prop(s), use 'Include Morph Targets' if desired. The resulting pose will use "prop propName_1" so it will only work on props parented to a figure, unless you edit it to use "actor propName_1".

There may be situations where you want to use poses on a prop but you don't want to have to load a character into a scene. You can use "MinFig" available in the Free Stuff. It is a figure that consists of only an invisible BODY actor, it is a very small file size abuot 5KB. You can parent a prop(s) to MinFig then save MinFig back to a figure pallet eg as "MyFigure", the next time you load MyFigure the prop(s) will load with it, and you will be able to save or apply poses for it in Poser at any time, and without needing to edit the pose files (unless you want to exclude some part) as the prop is already parented to a figure no special syntax is needed.

There are other advantages to using MinFig. It you have a group of props, locking  MinFig will lock all the props, hiding the Body actor of MinFig will hide all the props, deleting MinFig will delete all the props parented to it. MinFig can also help to overcome gimball lock, those situations where one axis of rotation is lost to a prop.


lesbentley ( ) posted Fri, 19 October 2007 at 11:38 AM

I said that you can't apply a pz2 (pose file) to a prop unless there is a figure in the scene, and that's true, but you can apply a cm2 (camera file) to a prop even if there is no figure in the scene. Just change the pz2 file extension to cm2 and move it to a camera folder. You will still need to use "actor propName_#" or "actor $CURRENT" in the file.


pjz99 ( ) posted Fri, 19 October 2007 at 8:26 PM

Quote - Another trick, you can get Poser to write a pose file for a prop. Parent the prop(s) to a figure, save a pose using 'Select Subset' to select only the prop(s), use 'Include Morph Targets' if desired. The resulting pose will use "prop propName_1" so it will only work on props parented to a figure, unless you edit it to use "actor propName_1".

Dang, I wish I had thought to try that :)  Would have saved a lot of trial and error!  I like to bang on something at least a little bit before I go running for help.  I'm gonna go with your actor $CURRENT suggestion, it's the simplest for me.  Appreciate your help very much, thanks!

My Freebies


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.