Sun, Oct 6, 9:21 AM CDT

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Oct 05 8:40 pm)



Subject: How to change the base colour of a character with a script?


MartinW ( ) posted Sat, 03 August 2013 at 6:56 AM · edited Tue, 17 September 2024 at 9:09 AM

Pootling around, and wondered about whether there was a simple way to 'drow-ify' some of my favourite V4 characters.

What I'm looking for is a simple way to load up a favourite texture, and then run a script to change the ambient (or other node) colours all at once, rather than click and change each individually in the materials room.

Is it possible? Is it do-able via a script to change them all to the same colour at once rather slog through material after material?

Any advice...?


ironsoul ( ) posted Sat, 03 August 2013 at 7:31 AM

Don't know what drowify means but EZSkin will allow global colour changes



hborre ( ) posted Sat, 03 August 2013 at 9:13 AM

EZSkin2 will do easily if you own P9/PP2012/P10/PP2014.  I don't understand why you want ambient color to be involved; it only causes the model to glow unnecessarily complicating any lighting and rendering setup.  

However, you didn't mention which version of Poser you are using.


hborre ( ) posted Sat, 03 August 2013 at 10:13 AM

Content Advisory! This message contains nudity

file_496892.jpg

This is an example of using EZSkin's builtin HSV to modulate the base texture color.  Only takes seconds to apply.  Image is Miki3 with default skin textures, color modified with EZSkin2.


markschum ( ) posted Sat, 03 August 2013 at 10:17 AM

 

you need to get the material

get the shader tree

get the PoserSurface node

change the diffuse color

refresh the shader tree

redraw the scene

 

import poser

scn = poser.Scene()

fig = scn.CurrentFigure()

mats = fig.Materials()

for mat in mats:

      tree = mat.shadertree()

      bnode = tree.Node(0)

      dc = bnode.InputbyInternalName("diffuse-color")

       dc.SetColor(255,255,255)    # color code in r,g,b

       tree.refresh()

scn.DrawAll()

 

you need to check the commands because I did this from memory.

This method tints an image map with the given color. You can get better results with other methods.


Snarlygribbly ( ) posted Sun, 04 August 2013 at 3:32 AM

Quote - Pootling around, and wondered about whether there was a simple way to 'drow-ify' some of my favourite V4 characters.

What I'm looking for is a simple way to load up a favourite texture, and then run a script to change the ambient (or other node) colours all at once, rather than click and change each individually in the materials room.

Is it possible? Is it do-able via a script to change them all to the same colour at once rather slog through material after material?

Any advice...?

 

As Hborre said, EZSkin can do this but makes other changes too (applying SSS) which you might not want.

Markschum's approach is also good, but only works if the shader tree is plugged into the Diffuse_Color node. It will have no effect (or need to be modified) if the shader tree is plugged into another node, such as Alternate Diffuse.

My MatHelper script allows you to copy shaders from one mat zone to several others simultaneously, but retaining the texture maps of the other zones. It might be close to what you want.

Free stuff @ https://poser.cobrablade.net/


MartinW ( ) posted Wed, 07 August 2013 at 8:59 AM

Thanks all - EZSkin was what I needed.


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.