Digital Art Zone

 
   
1 of 4
1
Released ! —mcjCollider plugin for DS4.5 PCWin
Posted: 04 November 2012 07:32 AM   [ Ignore ]
Power Member
Avatar
RankRankRank
Total Posts:  1897
Joined  2006-01-19

download and manual here—-> https://sites.google.com/site/mcasualsdazscripts2/mcjcolliderds45

________________________
version history

2012 Nov 30th - initial release
________________________

my first ds4.5 plugin, yay,

for a few years there has been a plugin for DS3/PCWIN named mcjCollider,

it’s more a service than anything

you select target objects in your scene and add an mcjCollider in the scene,

it looks like a white ray

you point the ray at the target object(s)

activate the mcjCollider

and it very quickly jumps to the surface of the target object

the ray is also oriented as if it had bounced on the surface

—-

in expert hands, or with the help of a script, could do interesting things

like fix poke-trough issues !!!

—-

soon the version for DS4.5 will come out

in fact it already seems to work, as shown below

—-

 

Image Attachments
collo.png
Profile
 
 
Posted: 04 November 2012 08:38 AM   [ Ignore ]   [ # 1 ]
Active Member
Avatar
RankRank
Total Posts:  294
Joined  2003-10-10

Very nice sir…

 Signature 

As Always B3D
..........................
My radio Station…
http://www.pandora.com/?sc=qm81447313#/
.........................
http://www.foleypromagic.com
http://www.michaelhershman.com
http://www.artwanted.com/foleypro
http://foleypro.deviantart.com/
http://home.comcast.net/~foleypro

Profile
 
 
Posted: 04 November 2012 08:39 AM   [ Ignore ]   [ # 2 ]
Active Member
Avatar
RankRank
Total Posts:  294
Joined  2003-10-10

Wondering if this might work on my ParticleFX and Genesis or other things…?

 Signature 

As Always B3D
..........................
My radio Station…
http://www.pandora.com/?sc=qm81447313#/
.........................
http://www.foleypromagic.com
http://www.michaelhershman.com
http://www.artwanted.com/foleypro
http://foleypro.deviantart.com/
http://home.comcast.net/~foleypro

Profile
 
 
Posted: 04 November 2012 08:40 AM   [ Ignore ]   [ # 3 ]
Power Member
Avatar
RankRankRank
Total Posts:  2354
Joined  2007-12-07

Interesting!

 Signature 

Some writings by a friend:
http://www.lizardsofthehost.co.uk/11.html
http://www.lizardsofthehost.co.uk/13.html
http://www.lizardsofthehost.co.uk/7.html

Profile
 
 
Posted: 04 November 2012 09:11 AM   [ Ignore ]   [ # 4 ]
Power Member
Avatar
RankRankRank
Total Posts:  1897
Joined  2006-01-19
foleypro - 04 November 2012 08:39 AM

Wondering if this might work on my ParticleFX and Genesis or other things…?

next , i’ll do a test on the basic Genesis

i’ll publish the source code, so if your programmer wants to include collision detection, it could help

the mcjCollider node could also be “remotely operated” by your plugin

Profile
 
 
Posted: 04 November 2012 09:25 AM   [ Ignore ]   [ # 5 ]
Power Member
Avatar
RankRankRank
Total Posts:  1897
Joined  2006-01-19

test results, it works on Genesis figures

i selected the torso nodes of the Genesis figure

and created an mcjCollider node in the scene

i pointed the mcjCollider ray at Genesis

i ran this script

var collider Scene.getPrimarySelection();
collider.activated(); 

and the mcjCollider node jumped on Genesis and oriented its ray as if it had bounced (like a mirror bounce)

 

Image Attachments
bbbing.gif
Profile
 
 
Posted: 04 November 2012 09:37 AM   [ Ignore ]   [ # 6 ]
Power Member
Avatar
RankRankRank
Total Posts:  1897
Joined  2006-01-19

the collider node communicates it’s collision results using the label of a parameter named “report”

usually this result should be of the format

skeletonName / boneName / polygonType / facetIndex

polygon types: 0 = triangle, 1 = quad

so there’s a problem to fix, here

it should be something like “genesis abdomen 1 22988”

Image Attachments
rezz.png
Profile
 
 
Posted: 04 November 2012 09:58 AM   [ Ignore ]   [ # 7 ]
Power Member
Avatar
RankRankRank
Total Posts:  1897
Joined  2006-01-19

in Stephanie (V4 based) collisions also work
but i have to better understand how the new DzFacetMesh work
and how the skeletons/bones work under DS4.5

Image Attachments
rezz3.pngrezz3b.png
Profile
 
 
Posted: 04 November 2012 09:25 PM   [ Ignore ]   [ # 8 ]
Active Member
Avatar
RankRank
Total Posts:  294
Joined  2003-10-10

Freakin awesome…

Well if you do give me the script I will give it to Vasily and he can incorperate into the plugin and you will get credit for the script…And I will send you ParticleFX DS 4.5 with a serial code that will expire in 9999 years…

 Signature 

As Always B3D
..........................
My radio Station…
http://www.pandora.com/?sc=qm81447313#/
.........................
http://www.foleypromagic.com
http://www.michaelhershman.com
http://www.artwanted.com/foleypro
http://foleypro.deviantart.com/
http://home.comcast.net/~foleypro

Profile
 
 
Posted: 04 November 2012 10:47 PM   [ Ignore ]   [ # 9 ]
Power Member
Avatar
RankRankRank
Total Posts:  1897
Joined  2006-01-19

Genesis wearing a tube created using mcjCollider, mcjTransport, setInterpolation and the script below

using a Null, i animated the camera rotating around Genesis, while going down, the collider was parented to the camera

the script repeatedly “shoots” an mcjCollider at Genesis and moves the object named ball0 to the hit position.

this animated ball is then used to make a 512 segments tube using mcjTransport

node Scene.getPrimarySelection();
ball Scene.findNodeByLabel"ball" );
tick Scene.getTimeStep();

for( 
fr 0fr <= 512fr++ )
{
 Scene
.setFramefr );
 
processEvents();
 
node.activated();
 
fr tick;
 
ball.setWSPosnode.getWSPos(t) );
 
node.setLocalPostDzVec30,0,-10 ) )
 
node.getXRotControl().setValuet, -90 );
 
node.getYRotControl().setValuet);
 
node.getZRotControl().setValuet);

 

Image Attachments
Jennie.jpgweapp.jpgspringtime.jpg
Profile
 
 
Posted: 05 November 2012 07:47 AM   [ Ignore ]   [ # 10 ]
Power Member
Avatar
RankRankRank
Total Posts:  1897
Joined  2006-01-19

DS4.5 is quite different from DS1,2,3

i think mcjCollider for DS4.5 is almost ready,

but i want to add functionality that will later make it usable for 3d painting

i used the following code and the setup shown so project a cyan ball onto Genesis

the second image is the view from the camera in the first image

node Scene.getPrimarySelection();
ball Scene.findNodeByLabel"sphere" );
node.activated();
processEvents()
ball.setWSPosnode.getWSPos() );
node.setLocalPosDzVec30,0,-10 ) )
node.getXRotControl().setValue( -90 );
node.getYRotControl().setValue);
node.getZRotControl().setValue); 

 

Image Attachments
crosshair.pngcrosshair2.png
Profile
 
 
Posted: 05 November 2012 05:06 PM   [ Ignore ]   [ # 11 ]
Active Member
Avatar
RankRank
Total Posts:  294
Joined  2003-10-10

Looking good…

 Signature 

As Always B3D
..........................
My radio Station…
http://www.pandora.com/?sc=qm81447313#/
.........................
http://www.foleypromagic.com
http://www.michaelhershman.com
http://www.artwanted.com/foleypro
http://foleypro.deviantart.com/
http://home.comcast.net/~foleypro

Profile
 
 
Posted: 05 November 2012 07:30 PM   [ Ignore ]   [ # 12 ]
Power Member
Avatar
RankRankRank
Total Posts:  1158
Joined  2005-07-29

Could it possibly eventually be used to create a mesh deformation brush or a displacement brush as well?

(Zbrush like capabilities inside DAZ Studio? The mind boggles.)

 Signature 

<End of transmission from Oz>
TUTORIAL - Creating a Genesis/G2F/G2M Full Body Morph for DAZ Studio Pro 4.6 by RKane_1
TUTORIAL - Creating a Genesis Partial Body Morph in DAZ Studio Pro 4 Using the DForm Tool by RKane_1
TUTORIAL - Applying Shaders by RKane_1 (as stolen blatantly from Jaderail)

Profile
 
 
Posted: 06 November 2012 01:20 AM   [ Ignore ]   [ # 13 ]
Power Member
Avatar
RankRankRank
Total Posts:  1897
Joined  2006-01-19
RKane_1 - 05 November 2012 07:30 PM

Could it possibly eventually be used to create a mesh deformation brush or a displacement brush as well?

(Zbrush like capabilities inside DAZ Studio? The mind boggles.)

i made a plugin like that named mcjWarp for DS3
http://sites.google.com/site/mcasualsdazscripts/mcjwarp-plugin-for-ds3-pc

i will possibly make the DS4.5 version this winter

and hopefully, add ‘undo’ functionality to it

 

Image Attachments
clamped.jpg
Profile
 
 
Posted: 07 November 2012 11:34 AM   [ Ignore ]   [ # 14 ]
Power Member
Avatar
RankRankRank
Total Posts:  1897
Joined  2006-01-19

as some script-writers may know,
we currently cant get the DzFacet’s values ( indexes to vertices, normals, UVs ) using a script

So the mcjCollider node will include a function to do just this

example of the script to get facet[3] of the cached geometry for the node named sphere

the primary selection is the collider note

collider Scene.getPrimarySelection();
node Scene.findNodeByLabel"sphere" );
obj node.getObject()
mesh obj.getCachedGeom()
debugcollider.getFacetmesh) ); 

the result is of the form
m_faceGroupIdx, m_materialIdx, m_vertIdx[0], m_uvwIdx[0], m_normIdx[0], m_vertIdx[1], m_uvwIdx[1], m_normIdx[1] . . .

0 0 4 4 4 19 19 19 20 20 20 5 5 5 


which will make possible the upgrade-to-DS4.5 of some really neat scripts like, for instance, mcjSpikey

Image Attachments
spkdemo4.jpg
Profile
 
 
Posted: 08 November 2012 12:13 AM   [ Ignore ]   [ # 15 ]
Power Member
Avatar
RankRankRank
Total Posts:  1897
Joined  2006-01-19

i had to study barycentric coordinates

The collision detection uses the Moller-Trumbore algorithm

Fast Minimum Storage RayTriangle Intersection

... and the new version of mcjCollider ( for DS3 and DS4.5 ) will report the UV coordinate of the hit point

so this fall or winter i’ll probably write a script or a plugin to do 3D painting!

in the image below, i painted a cross in Paintshop, at the UV coordinate reported by mcjCollider

and it fits !

Image Attachments
mcjPaint.jpg
Profile
 
 
   
1 of 4
1