mcjSoftPush




==========
======================================================================
Introduction
================================================================================
This script uses the services from my Daz Studio plugin named mcjCollider. 
It can project a surface onto another surface. It can also soften the imprint.

The impetus for this script was to have a character in a bed displace the mattress surface
and have the character's body displace the bed sheets ( or get draped by the sheets )

 

This script and plugin system is meant for technically saavy users
please do not ask me to re-explain everything ... about mcjCollider or mcjSoftPush

it's free ... so technical support is asking a bit much :)

no but really i have so many projects to tend to ! ...

thanks for your understandingsion

i know it's not a word

note version 4 is safer because previous versions when applied to subdivided surfaces were creating morphs that made your scene-file un-loadable !!!



================================================================================
History
================================================================================

February 21st 2019 - V4 - Safe for use with subdivided surfaces, added help features

September 25th 2017 10:56PM  -  V3 Same Correction as V2 but for the "floor" morph

September 25th 2017 -  10:25PM - V2 Correction the first version only worked correctly for non-rotated planes !

September 12th 2017 -  V1 Released





================================================================================
Installation
================================================================================
First you need my mcjCollider plugin found here
https://sites.google.com/site/mcasualsdazscripts2/mcjcolliderds45
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
For the script, the zip package is found at the bottom of this page

unzip it in your daz content folder, 


typically :

C:\Users\USERNAME\Documents\DAZ 3D\Studio\My Library


once installed, it will appear in your content library, under 


The Daz Script will be found in  My Library / Scripts / mcasual 


Starting with Windows 7 if you right click on the downloaded zip file

and select the [Extract All ....] pop-up menu item
you simply browse up to your Daz Studio Content Folder
and the files will fall in the proper folder 


================================================================================
Use
================================================================================

Select the object(s) in the scene that will be draped

example, i select the red ball 

i do a "Create / mcjCollider" ( as explained in the mcjCollider manual )

next i create a primitive-plane, 64x64 divisions

i move the plane above the ball

i select the plane

i launch the script

since the special arrow prop was not in the scene, the script automatically created one at 0,0,0

by default, it points up

but we want to project the  plane down

so we click on the "Flip Arrow" button

we could also exit the script and orient the arrow "manually"


Select the plane and start the script

Select the "Push Onto Option

Click the "Create Push Morph" button

You should see the mcjCollider ( white line ) jump all over the plane for a few seconds

If nothing happens it may be that you are attempting to re-use an mcjCollider from a previous session.As stated in mcjCollider's manual colliders forget the list of collide-objects when you exit the program.


The script is taking one vertex after the other, 4096 in my example's plane and evaluated hits against the red ball.

The result of all this activity is a morph named "Onto" ( because that's the name i specified ).

Depending on the complexity of your bed sheet and the figure draped this may take minutes or seconds.

But you can interrupt the process.



Click on the "Set Morph Strength" button.

and here it is our "Onto" morph in all its humble earth worm glory.





Adjusting the vertices left behind -  The "Create Floor Adjust morph" button


As you can see the vertices of the plane that would not hit the red ball are not part of the "Onto" morph


While the plane is selected and the script is running, click the "Create Floor Adjust morph" button


This operation should be moderately quick


Exit the script


Go in the plane's parameters tab, you will find the "Onto" morph and the brand new "onto_floor" morph


Use the  "onto_floor" morph to adjust the altitude of the floor




Note that if the whole plane had been projected onto the ball, this would be absolutely useless.

Now, since we plan on smoothing this shape, we need to combine the "Onto" morph and the "Onto_floor" morph

Once that's done, the "Onto_floor" morph won't be destroyed but it will have its morph strength set to 0.

Click on the "Combine Floor and Push Morphs" button.

This operation should be moderately quick


Propagating the push effect a.k.a. smoothing


This is a very special type of smoothing. 

Only the less displaced vertices surrounding the most displaced vertices get pulled along.

With the plane selected, and the script running, click on the "Propagate Effect" button.

You can press it more than 1 time and widen the gap around the draped object






The "Project-Through projection type


Instead of projecting the plane's vertices onto the first surface of the redball it hits, the script projects it on the last surface it crosses.

This is meant to be used to push the mattress surface under the sleeper.

So, we place the plane above the red ball, the green arrow points down, and we get this "Through" morph



once we create the floor morph, adjust it , combine it and smoothen it, we get


Here is a step by step example for an x-rotated plane

1 i select the Aiko3 root node
2 i do a Create - mcjCollider
3 i create a primitive plane 64 X 64 divisions
4 i place the plane across the face
5 i select the plane
6 i start the script
7 i exit the script
8 i select the "arrow"
9 i re-orient the arrow so in points toward the front
10 select the plane
11 start the script
12 select the "push-Through" option
13 click on the "Create Push Morph button
14 click on the "set morph strength to 100%







License

// =====================================================================
// by mCasual/Jacques
// copyright mCasual/Jacques 
// You can use this script freely for personal or commercial use.
// You may not sell, resell, sub-license or rent this script in any way.
// you may credit this script  to mCasual/Jacques
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 
// OTHER DEALINGS IN THE SOFTWARE.
// ===================================================================== 






ċ
mcjSoftPush.zip
(24k)
mCasual Jacques,
Feb 21, 2019, 12:27 PM
Comments