Geoshell setup script?
Is there a script to automatically set up a geoshell on a Daz Studio figure, and thus save the user some repeated drudge-work? It would probably go like this:
1. Figure A is selected in the scene.
2. Create a geoshell from that figure.
3. Slightly increase geoshell mesh offset, from the default.
4. Select geoshell and all its surfaces. Fix the geoshell's default 50% opacity.
5. Apply shader B to geoshell.
6. Fix any clothing, so as not to have poke-under with the new geoshell.
I'm also looking for a lineart geoshell shader where the lines show up in the viewport, while keeping the default surfaces below perfecly visible 'through the lines'. I doubt it's possible in Daz, or it would have been done already. But it seems worth asking, and I figure if it is possible then some scripting and/or complex tehcnical stuff could be involved - and thus this seems the right place to ask.
Comments
Moved to Daz Studio Discussion as it was not about scripting but rather a request for a script.
Have you tried saving a Wearables Preset with your desired settings? Though I'm not sure how 6 could be automated.
After you set up a geoshell the way you want it, you can save it as a wearable preset and use that saved wearable preset everytime instead of the create menu option.
You could try resaving the clothes with the Geoshell set as the collision item for the smoothing modifier.
Mattymanx's solution is probably the best way to do this, but since I've already posted a similar script, here is a modified version that does steps 1-5. I'm not sure what is involved in step 6.
You will need to edit the script to set the desired mesh offset and shader (if Iray Uber is not the desired shader).
Thanks, OmiFlux, that's very generous of you.
Step 6 - to remove poke-under on the clothes - would I think be done in the way Mattymanx suggests, with:
That would be a setting on the clothing, and not handled at shell creation time then so you'll have to do that one manually.
I see, thanks. So it sounds like there's no scriptable way to have a Daz script distinguish between bodies, hair, props and clothing - and then 'select all the clothing items'?
Clothing can be found in the scene heuristically and have a fairly good success rate.
Check if metadata says it is a Wearable or check if it is fit to to a known figure (eg Genesis8Male) or has Shirt or Dress in the name, etc.
But what I meant is it is not very sensible to do it in the same script because of the work flow
When the script to create the shell is run, the dress does not exist and so can not have its collision target set.
If you change the order
The script can set the collision target, but then if you change your mind and delete the dress and add a different one, the setting will not follow and you will have to set it manually anyway.
Because it cannot be guaranteed the clothing will exist before the shell, this should be done separately. It can be done in a script, but it makes more sense to have it done in a separate script (you could even have the shell creation script call the new script automatically for cases where the workflow is the first example above).
As an addendum, it may be possible to use a callback to detect when something is fit to your figure and you could use that to then adjust the collision target automatically, but it is not something I am familiar with at this time.
hi @omniflux , thanks for script .
I wanna know How to edit your script for used with another shader presets ( 3delight Geoshell Oultine ) and auto change value in mesh offset ?
Thanks
There are two lines near the beginning of the script you will need to modify.
Super Thanks !! Thats work perfectly . One more thing , if I want to set custom parameter in surface parameter , should I create custom shader first, then call it via your scripts or is possible to create new Surface parameter direct from your script ? i.e like changing surface parameter value in 02_Z-depth Cutoff
Thanks again
You can do it either way. I don't have that shader, so I can't give you exact instructions, but it would be something like this
At the beginning after
add
And near the end after
add
Thanks @Omniflux , Will try your suggestion