Tue, Nov 26, 6:03 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: Is there a Python fix for buggy Poser 5=>Wavefront mtl export?


Jovial ( ) posted Sat, 30 July 2005 at 12:58 PM · edited Sat, 27 July 2024 at 5:46 PM

Hi,

When I use Export from Poser 5 to Wavefront OBJ format
(in order to use PoseRay - because my latest scene will not render in P5!), there is a partner scene .mtl file created that seems to be written incorrectly.

If a scene had (for example) two victoria 3 figures and these had two different sets of textures applied, then the .mtl file is written with all of the material reference names for both figures as those for the last figure added.

This is probably best explained with a little example of the .mtl file:

Figure 1 uses Lovely_Body_Tex.jpg
Figure 2 uses Some_Other_Body_Tex.jpg

but the .mtl file is written with

newmtl SkinTorso:1
Ns 19
Ka 0 0 0
Kd 1 1 1
Ks 0.066667 0.066667 0.066667
map_Kd Some_Other_Body_Tex.jpg

newmtl SkinTorso:2
Ns 19
Ka 0 0 0
Kd 1 1 1
Ks 0.066667 0.066667 0.066667
map_Kd Some_Other_Body_Tex.jpg

and the same problem for all the other material zones.

So the first figure has now lost all of its texture references.

I was wondering if anyone had written a Python name mangler so that each internal material group name has (for example) the figure name or other unique id added into the name so that the export would work correctly.

I guess that this would be similar concept to the crosstalk killer but for material zone names. I had a bash at changing the crosstalk killer .py script to be able to rename actors and materials but I am not familiar enough with Python to get the thing to work. It just hangs Poser.

Any help or suggestions greatly appreciated.

Regards,
Jovial.


nruddock ( ) posted Sat, 30 July 2005 at 2:29 PM

The problem is not the Group names (you can make these different by setting extra options on export), but the material names, which can't be altered by Python internally.

AFAIK the only way to change material names is to use a text editor (or a program) on the OBJ file and the CR2/PP2/PZ3.

This is a non-starter, as all your MAT poses would stop working for the items with renamed materials.

Your only hope might be to see if exporting the OBJ from DAZ Studio is any better.


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.