Darkworld opened this issue on Oct 23, 2012 · 17 posts
Darkworld posted Tue, 23 October 2012 at 9:37 PM
So I'm using D3D's tool and have created and tested some nice overlays for V4, but I'm not finding any information on how to save them into pose files so they can be used/removed.
Anyone can point me in the right direction?
Thanks!
cedarwolf posted Tue, 23 October 2012 at 9:55 PM
Interesting...how does this work?
Darkworld posted Tue, 23 October 2012 at 10:10 PM
I used D3D's python materials 1 utility. This will be a boon to my second skin packs.
markschum posted Wed, 24 October 2012 at 8:56 PM
They are not difficult to write, so you could package a script with your files.
attached ias a script that does that, requires an edit to name the overlay image and mask. It connects the same image to diffuse and specular , but it could be altered for seperate maps and masks.
Darkworld posted Wed, 24 October 2012 at 10:39 PM
awesome! thanks
Darkworld posted Thu, 25 October 2012 at 2:12 AM
is there a way i could alter this to specify a displacement map and strength?
I see where to alter it for mask and texture, but do i change "current material" to the correct materials? I'm not sure how it knows to apply this overly to V4 and the correct materials
Darkworld posted Thu, 25 October 2012 at 2:29 AM
Ok so i've tested and it did not apply the mask or the overlay. i tested it using a pose file that runs the python.py, and also tested it directly launching the python. i'm not getting an error but no overlay has been applied.
EDIT: i didn't read the fine print close enough lol... gotta mess with the shader nodes... hopefully ill get it working :)
OK one final question after some testing lol... the instructions say to disconnect the diffuse and specular nodes... but that erases the texture; and i'm trying to overlay the texture not erase it. It looks like your script should be doing all this automatically but i still see nothing happening.
When i followed the commented steps manually all i come up with is trashing the material (torso in this case) and it's not showing the underlying texture, because i deleted the nodes =P
markschum posted Thu, 25 October 2012 at 1:08 PM
The script will work on the current selected material. One only, sorry.
The script will disconnect the nodes and reconnect them after inserting the new nodes. Do not manuall do anythingor the script wont find them.
I can amend the script to work on more materials. Can you specify exactly what you need to do ?
If you change the script to point to an image file and a mask it will change the selected texture by overlaying the new image and the old one.
markschum posted Thu, 25 October 2012 at 1:48 PM
Darkworld posted Thu, 25 October 2012 at 2:13 PM
what do you mean "currently selected material"
Do u mean you have to select a material and be in the material room for it to workt? Hmm... I need to be able to automate the script from a pz2. I've seen overlay packages done this way, you select your figure, click the pose and it runs the script.
i can write a pose that executes a script, but dont have a script that works. I need it to be able to apply the overlay automatically once the pose tells it to run.
Darkworld posted Thu, 25 October 2012 at 2:14 PM
And I can make and apply overlays all day lol, but an .ovl file doesn't help me I need to get it into python.
markschum posted Thu, 25 October 2012 at 6:10 PM
If you specify what you need I can do the script for you. I need to know what materials and what to overlay.
Darkworld posted Thu, 25 October 2012 at 6:31 PM
Well to start ill just be using the hip, torso, and nipple materials. I've been looking at python tutorials trying to figure out how I could make a script template for this, that I could update for different overlays. It would always be those 3 materials.
Channels will be diffuse, specular, ambient, bump and displacement.
markschum posted Thu, 25 October 2012 at 6:35 PM
ok, do you have a saved material file of before and after your overlay is applied ?
Darkworld posted Thu, 25 October 2012 at 8:59 PM
Well shouldn't the overlay work with any character? In other words the material we start with could be any texture
markschum posted Thu, 25 October 2012 at 10:24 PM
Yes , up to a point. There are many variations on how a skin shader can be written. I simply want to know for the following you specified what image files and masks go to which parameter .
Diffuse > skin texture map + (a: overlay + mask)
Specular > skin map or specular map + (b: overlay + mask)
ambiant > ? (c: overlay + mask)
bump > bump map + (d: bump overlay + mask)
Displacement > displacement map + (e: displacement overlay + mask)
thats up to 5 sets of overlays and masks to add if you are using seperate images and masks for each thing.
Darkworld posted Thu, 25 October 2012 at 10:59 PM
There's only 1 mask and 1 texture. Thy get referenced multiple times. Diffuse specular and bump all use the same texture. Likewise the mask is the same file as the displacement map. I just need a way to set displacement to 0.015 or so.