Thu, Jan 9, 10:07 AM 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 Dec 02 3:16 pm)

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: ATTN: Ockham or any Python script writer


Dave ( ) posted Mon, 20 December 2004 at 8:30 PM · edited Thu, 09 January 2025 at 9:53 AM
Online Now!

file_158572.jpg

Can anyone help me out by doing a script to setup the nodes for each body as in the image here. In the past I would either edit each body part by hand or make a pose file to apply the effect to a set of textures. It gets tiresome and repetitive to apply a set to a new set of textures that I've either purchased or created. The guy who made the Real Skin shader script was able to do something similar. The setup in the image below would be a nice handy script I think. Thanks, David


face_off ( ) posted Tue, 21 December 2004 at 2:57 PM

Interesting node network you have there. Would live to see a rendered image using it. I was never able to get realistic results from the skin node. I also did a heap of testing on the translucent plug (thinking it could be the key to sss), however deterimed that it was identical in every way to ambient! Anyway, there are 3 options here David.... 1) Save the node setup for one of the head materials, and one of the skin materials to the library. Then write a script to apply those materials to the required body parts. This is probably the easiest method by far. 2) Remap the materials in the V3 obj file so that she only has one material that covers all of SkinBody (ie. merge SkinHip, SkinTorso, SkinLeg, etc), and one material for all the head textures (SkinHead, Lips, InnerMouth, etc). This is how I test all my new node setups - but the remapping is /hard/ (but only needs to be done once). 3) Buy my script, take it appart, take the bits that create the materials, and rewire to your node setup above. Would probably take you about 24hrs of coding....but certainly doable. Hope that helps.

Creator of PoserPhysics
Creator of OctaneRender for Poser
Blog
Facebook


Dave ( ) posted Tue, 21 December 2004 at 3:08 PM
Online Now!

Attached Link: http://grfkdsgn.myftp.org/USL.html

I've already bought your script which is how I know that this setup is also possible. See attached link for a sample rendering. I've already saved two samples of the above setup to the materials library. Have yet to look at it to see what I would need to do. I'm very green when it comes to Python scripts. That's one part I have yet to tackle. David


face_off ( ) posted Tue, 21 December 2004 at 6:49 PM

I just checked the Python reference, and there doesn't look like any way to apply a material from python, so option 1 is not so easy after all. What you could do is create a mat pose for the different material from the save material thou - although that wouldn't be script modifyable.

Creator of PoserPhysics
Creator of OctaneRender for Poser
Blog
Facebook


Dave ( ) posted Tue, 21 December 2004 at 7:30 PM
Online Now!

so there's not a way to do the node setup after you've applied a texture. I thought that's how your RealSkinShader script worked. I was looking for the same concept so I wouldn't have to set up the nodes up again everytime I wanted to apply a different texture map. David


face_off ( ) posted Tue, 21 December 2004 at 7:44 PM

RealSkinShader works by: 1) User applies mat pose to get texturemap into the materials 2) User runs RealSkinShader, which takes the current material info and builds a new mat pose, and then applies that mat pose. If you then apply another mat pose from your pose library, the node setup is wiped. You could save your setup as a mat pose. Then write a python script to inject new texturemaps into it. That would be a relatively easy script to write.

Creator of PoserPhysics
Creator of OctaneRender for Poser
Blog
Facebook


Dave ( ) posted Tue, 21 December 2004 at 8:16 PM
Online Now!

Easy to somebody who understands how to write a python script, but I don't. David


face_off ( ) posted Wed, 22 December 2004 at 2:27 AM

There are a few pretty good python resourses around. www.python.org, the Poser python methods pdf that should be in your Runtime, and there is a tkinter pdf too available on the web.

Creator of PoserPhysics
Creator of OctaneRender for Poser
Blog
Facebook


Dave ( ) posted Wed, 22 December 2004 at 4:55 PM
Online Now!

Well I managed to get a pose file that put the nodes in for each individual material. How would I go about writing a script that can go back and assign the image maps to the appropriate materials. I tried using DAZ's material editor script but the proved to be just as time consuming as changing the materials in the material room. David


face_off ( ) posted Thu, 23 December 2004 at 2:35 AM

Dave, once a node setup has been set for a material, you can potentially change the texturemap and bumpmap using python. I have not testing this, and depending on the complexity of your node setup, the python methods may or may not work. But the rough code to do this would be.... for each material: material.SetTexturemap ("texturemap filename") material.SetBumpmap ("bumpmap filename") You will need to read the PoserPython methods pdf file that is in your P5 executable directory.

Creator of PoserPhysics
Creator of OctaneRender for Poser
Blog
Facebook


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.