mcjApplique ( mcjNanobot01 )






Purpose

NEW  ! mcjApplique2K18  works way better for low-poly objects

mcjApplique and mcjAppliqueBot are two Daz Studio scripts ( a bit like plugins )

Using animated null-nodes, they make it look as if something is parented to the surface of something else

in the animation shown here the small steel ball and the steel stick are made to look as if they were parented to surface of the red sphere.

in the future i may post other tricks similar to this one, collectively I'll call them mcjNanobots



Before we go any further, did you know Daz Studio 4.9 has Followers?


there's a feature named 'Rigid Follower Nodes' in Daz Studio 4.9 ( and maybe slightly older versions )

it's similar to mcjApplique ( see this video here not by me https://www.youtube.com/watch?v=2CJWelfIMxI )

I didn't know about its existence before I wrote mcjApplique.

But there are substantial differences, notably when it comes to backward compatibility.

Also, I plan to make other types of "nanobots" based on the mcjApplique principles


History

April 26 th 2016 - Now compatible with DS 2 and 3 for figure-bones
April 22 nd 2016 4 am mcjApplique v1. and mcjAppliqueBot v1, released



Installation

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 


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

NEW  ! get mcjApplique2K18  works way better for low-poly objects

This new version selects vertices from one facets which increases chances of success

Step1 Creating the follower/Host nodes 


Select all your 'follower" nodes
then select the leader node
the leader node must be selected last

if you are in Daz Studio 1,2,3 and your leader is a figure, then you must select a specific bone
if you are in Daz Studio 4 and you loaded a DS3 scene, you will have trouble using mcjApplique on figures
but if you delete that figure and load the same figure it will solve the issue


building a selection like this us usually done by holding down your keyboard's CTRL key
while mouse-left-clicking on nodes in Daz Studio's Scene tab


in this example, i flicked on the stick, followed by the small ball, followed by the big red sphere

note that the stick and ball did not need to touch the sphere, but they will be "parented" to the
nearest 3 vertices of the sphere surface, which happens to be almost exactly where they sit !

once your selection is done

launch the mcjApplique script

and press the "Go button"

if the leader surface is simple, it will take a fraction of a second

if the 'leader' surface is Genesis figure, it will take a few seconds 

exit by pressing the Exit button


mcjApplique created a null node named "HostSphere 2"  
mcjApplique  placed "HostSphere 2"    on the surface of the red sphere the closest to "Sphere 2" which is the white ball
 "HostSphere 2" then adopted "Sphere 2". 

Same with the stick ( cylinder ) which was adopted by a null node named "Hostcylinder".

the "hosts" are the followers


Step2 - Animating the leader

For my test, I used a D-Form to add some action to the scene

because, if your leader doesn't move, are you really following it?

In fact, if your leader doesn't move, maybe you are the leader



As you can see, if there's no one to make the Followers/Hosts move, they don't.

On to Step 3 !


Step 3 - mcjAppliqueBot - Followers, follow the leader


No need to select anything

But set the Timeline 'playRange' to match the duration of your animation

in my example, the frame rate was 10fps, the play range was from frame 0 to 10

Run the mcjAppliqueBot script

Press the Go button

this will be very quick since it doesnt depend on the complexity of your leader's geometry

For each frame of the animation playRange, each 'follower/host" 

will move to its assigned position on the leader's surface 

There you have it !!!



Technical details and a note about the future


mcjApplique goes through the collection of vertices in the 'leader' surface.

For each vertex mcjApplique  measures and notes the distance between the vertex 
and a given follower candidate ( ball, stick )

mcjApplique  then sorts those vertices by distance and keeps the 3 closest distinct vertices

The 'host' ( null) node is created at the center of the triangle formed by those 3 vertices

The follower gets parented to the host

The host needs to know which surface it should stick to and which 3 vertices of that surface are its home-base

so if you look in the Parameters tab of the Hosts, you will see an unusual section named "mcjNanobot'



and in that section, you'll find a reference to the leader's identity ( the big red sphere ) and the 3 vertex numbers

There's also a "Type" selector. For now, the only 2 types are "None" and "Three-Vertex-Follower".

In the future, there may be other types of "mcjNanobots", for example, a "Point At" bot or a "Rope between" bot


Before i forget, this script was created because i wanted hooks and eyelets to follow a boot surface






License

// =====================================================================
// by 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.
// ===================================================================== 



ċ
mcjApplique.zip
(70k)
mCasual Jacques,
Apr 26, 2016, 7:10 AM
ċ
mcjApplique2K18.zip
(30k)
mCasual Jacques,
May 3, 2018, 3:48 PM
Comments