Digital Art Zone

 
   
5 of 6
5
mcjTransport, model/animate spline based tubes - Version 1 is out !!
Posted: 19 September 2012 06:15 PM   [ Ignore ]   [ # 61 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4545
Joined  2007-09-13
Kendall Sears - 19 September 2012 05:43 PM

Is the plugin coded so that an extension could be written to use SVG files for path input?

Kendall

Shhhh!!!!!! 

We want him to finish it up sometime in the near future (although that would be a great feature to have…)

 Signature 

1432 old posts

My ShareCG gallery.

Just because something costs a lot, doesn’t mean it’s the best…

It just means it’s expensive.

Profile
 
 
Posted: 19 September 2012 06:19 PM   [ Ignore ]   [ # 62 ]
Power Member
Avatar
RankRankRank
Total Posts:  2090
Joined  2006-01-19
Kendall Sears - 19 September 2012 05:43 PM

Is the plugin coded so that an extension could be written to use SVG files for path input?

Kendall

it’s a script, so someone could write a curve importer, though that someone would probably be me

another solution is to write a script that converts svg to the text format i use (shown below )

and have the ability to select one curve from the many in the svg file

i didn’t know about svg, but if i guess it would be a good choice ... someday someday smile

 

type mcjLathe
vrsn 2009.11.25
twld false
bwld false
clsd false
nsds 8
nsgs 1
v 0.5 0.5
-0.45 0.5
.
.
.
v 0.27 0.508
v 0.5 0.50
v3d 0 0 45.59
v3d 
-42.1 0 45.59
.
.
.
v3d 0 0.00 -46.2 
Profile
 
 
Posted: 19 September 2012 06:26 PM   [ Ignore ]   [ # 63 ]
Power Member
Avatar
RankRankRank
Total Posts:  1866
Joined  2006-02-17
Casual - 19 September 2012 06:19 PM
Kendall Sears - 19 September 2012 05:43 PM

Is the plugin coded so that an extension could be written to use SVG files for path input?

Kendall

it’s a script, so someone could write a curve importer, though that someone would probably be me

another solution is to write a script that converts svg to the text format i use (shown below )

and have the ability to select one curve from the many in the svg file

i didn’t know about svg, but if i guess it would be a good choice ... someday someday smile

 

type mcjLathe
vrsn 2009.11.25
twld false
bwld false
clsd false
nsds 8
nsgs 1
v 0.5 0.5
-0.45 0.5
.
.
.
v 0.27 0.508
v 0.5 0.50
v3d 0 0 45.59
v3d 
-42.1 0 45.59
.
.
.
v3d 0 0.00 -46.2 

I was just wondering if someone like me could write an import routine.  Is there any docs on your import data?  Is there a way to set the diameter of the line in the txt file?  Can it handle complex paths?  Multiple paths?  If no on the multiple paths, is there a set reference point so that multiple runs could create colocated tubes?

EDIT:  There are *many* projects that I could use this for if only I could get a SVG file into it.

Kendall

 Signature 

Any opinions expressed in this post are those of Kendall Sears and may, or may not, be more, or less, valid than any other opinion.

The contents of this post are intended for the DAZ forum only, do not re-post any portion to any other forum without his permission.

Profile
 
 
Posted: 19 September 2012 06:58 PM   [ Ignore ]   [ # 64 ]
Power Member
Avatar
RankRankRank
Total Posts:  2090
Joined  2006-01-19
Kendall Sears - 19 September 2012 06:26 PM

I was just wondering if someone like me could write an import routine.  Is there any docs on your import data?  Is there a way to set the diameter of the line in the txt file?  Can it handle complex paths?  Multiple paths?  If no on the multiple paths, is there a set reference point so that multiple runs could create colocated tubes?

EDIT:  There are *many* projects that I could use this for if only I could get a SVG file into it.

Kendall

the format was established when i wrote mcjLathe

a few named parameters, followed by a list of vertices, the x coordinates range from -0.5 to 0.5 the y coordinates range from 0 to 1

if you run mcjLathe ( https://sites.google.com/site/mcasualsdazscripts/mcjlathe ) or mcjSuperLathe ( https://sites.google.com/site/mcasualsdazscripts/mcjlathe ) you can save the curves you create to disk and inspect them

indeed there’s only 1 curve per file

i was thinking .... maybe i could write a dxf importer since eons ago i wrote one. and i would think there’ svg-to-dxf converters floating around the internet

the index for my web site is https://sites.google.com/site/mcasualsdazscripts2

here is a complete 4-points curve from ncjSuperLathe

type mcjLathe
vrsn 2009.11.25
twld false
bwld false
clsd false
nsds 8
nsgs 2
note vertex coordinates
first column is x second is y
note X must remain in the [
-0.5,0.5] range
note Y must remain in the [0.0
,1.0] range
v 0.5 0
v 0.15 0.15
v 0 0.5
v 0.15 0.85
v 0.5 1 

the new upcoming script, mcjTransport involves 3D curves,
so i append the 3D coordinates using the new token “v3d”

type mcjLathe
vrsn 2009.11.25
twld false
bwld false
clsd false
nsds 8
nsgs 2
note vertex coordinates
first column is x second is y
note X must remain in the [
-0.5,0.5] range
note Y must remain in the [0.0
,1.0] range
v 0.5 0
v 0.15 0.15
v 0 0.5
v 0.15 0.85
v 0.5 1
v3d 0.5 0 0
v3d 0.15 0 0.15
v3d 0 0 0.5
v3d 0.15 0 0.85
v3d 0.5 0 1 

 

Profile
 
 
Posted: 20 September 2012 11:47 AM   [ Ignore ]   [ # 65 ]
Power Member
Avatar
RankRankRank
Total Posts:  2090
Joined  2006-01-19

i’m giving it another go today, remember the ‘monotone’ feature, which removed “kinks” from the tube’s path,
well it’s not an integral part of the mcjTransport yet.
There’s that and not much more left to do.
So hopes are high ... as a kite.
nah hopes are up in a lemon tree

and today’s song is http://www.youtube.com/watch?v=IsP8r3X_VfY
( the original being http://www.youtube.com/watch?v=phEnpdDusss )

Image Attachments
kink.jpg
Profile
 
 
Posted: 20 September 2012 09:48 PM   [ Ignore ]   [ # 66 ]
Power Member
Avatar
RankRankRank
Total Posts:  2090
Joined  2006-01-19

news

Catmull-Rom splines ( http://en.wikipedia.org/wiki/Cubic_Hermite_spline ) will be used instead of Studio’s animation curves

this, to make neat looking loops ( closed paths )

shown below: a 30 frames long, 4-keyframes closed path


other news is, the path monotonizer function is now part of mcjTransport


 

 

Image Attachments
kink2.jpg
Profile
 
 
Posted: 21 September 2012 03:36 PM   [ Ignore ]   [ # 67 ]
Power Member
Avatar
RankRankRank
Total Posts:  2090
Joined  2006-01-19

news from the coding front

the part of the script that ensures clean looping paths was tested some more and corrected

and i’m thinking about adding SecondLife Sculpties export

here you see a 4-keyframes path ( the tube on the ground ) using the Catmull-Rom spline
( the head of Disney/Pixar http://en.wikipedia.org/wiki/Edwin_Catmull
is a computer scientist/mathematician and he developped that spline,
which is a variant of Hermite Splines )

Image Attachments
rintintin.jpgwiki.jpg
Profile
 
 
Posted: 22 September 2012 02:16 PM   [ Ignore ]   [ # 68 ]
Power Member
Avatar
RankRankRank
Total Posts:  2090
Joined  2006-01-19

that’s the test scene for

- the functions that let mcjTransport export animated-marker-paths as 2D and 3D curves

those 2d curves can then be re-used by mcjTransport, mcjLathe and mcjSuperlathe

- the functions that let mcjTranslate use 2D curves created by mcjTransport, mcjLathe and mcjSuperlathe

—-

not sure when it will all be ready, so i wont give deadlines smile

 

Image Attachments
loadsave2d.jpgseesaw.pngclearsky.jpg
Profile
 
 
Posted: 23 September 2012 01:08 PM   [ Ignore ]   [ # 69 ]
Power Member
Avatar
RankRankRank
Total Posts:  2090
Joined  2006-01-19

that’s a 368-segments path, created with the help of the mcjCollider plugin ( for DS3 only )
the collider was colliding against the torso nodes of the mcjA3Maillot figure
the collider was parented to a camera which was parented to a null, which was going up down up while rotating 4320 degrees
the null’s animation was linearized using my setInterpolation script

i selected the collider node and ran this script shown below

for each frame, the script moves the collider back to the camera and points it straight ahead at the figure
then it fires the collider which moves to the surface of the figure

one could use this method and mcjRibbons, mcjTracePath  ( or soon mcjTransport ) as a base for creating clothes

or to lay roads on an uneven terrain

note that since her movements are not hindered this does not count as bondage, so there

the second image, the animated gif, was done by animating the “vertical tile offset” parameter of the surface material. using the matAnim script

// DAZ Studio version 3.1  filetype DAZ Script

var tick Scene.getTimeStep();
var 
node Scene.getPrimarySelection()
var 
range Scene.getPlayRange()
var 
startFr range.start tick;
var 
endFr range.end tick;
var 
zeropos DzVec300);
var 
xr node.getXRotControl()
var 
yr node.getYRotControl()
var 
zr node.getZRotControl()

for( var 
startFr<= endFri++ )
{
 Scene
.setFrame);
 
processEvents();
 
node.setLocalPoszeropos );
 
xr.setValue(-90)
 
yr.setValue(0)
 
zr.setValue(0)
 
node.activated();
Image Attachments
wraparound.jpgblip.gif
Profile
 
 
Posted: 23 September 2012 02:35 PM   [ Ignore ]   [ # 70 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4545
Joined  2007-09-13
Casual - 23 September 2012 01:08 PM

the second image, the animated gif, was done by animating the “vertical tile offset” parameter of the surface material. using the matAnim script

If you animated the Ambient, you could make it look like she’s wearing blinking lights…

 Signature 

1432 old posts

My ShareCG gallery.

Just because something costs a lot, doesn’t mean it’s the best…

It just means it’s expensive.

Profile
 
 
Posted: 23 September 2012 03:28 PM   [ Ignore ]   [ # 71 ]
Power Member
Avatar
RankRankRank
Total Posts:  2090
Joined  2006-01-19
mjc1016 - 23 September 2012 02:35 PM
Casual - 23 September 2012 01:08 PM

the second image, the animated gif, was done by animating the “vertical tile offset” parameter of the surface material. using the matAnim script

If you animated the Ambient, you could make it look like she’s wearing blinking lights…

with randomized tiling offsets and noise we get glitter

( this post’s music background is http://www.youtube.com/watch?v=dCIMqI39DCI )

 

Image Attachments
glitter.gif
Profile
 
 
Posted: 23 September 2012 03:55 PM   [ Ignore ]   [ # 72 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4545
Joined  2007-09-13

Looks like a fun way to do a Christmas tree…

Extrude a tube around the tree…use matAnim to animate a color pattern…make an animated gif…presto, blinking lights on the tree!

 Signature 

1432 old posts

My ShareCG gallery.

Just because something costs a lot, doesn’t mean it’s the best…

It just means it’s expensive.

Profile
 
 
Posted: 23 September 2012 04:35 PM   [ Ignore ]   [ # 73 ]
Power Member
Avatar
RankRankRank
Total Posts:  2090
Joined  2006-01-19

~ breaking mcjTransport news ~ ~ breaking mcjTransport news ~ ~ breaking mcjTransport news ~

i will be posting the first version of mcjTransport this evening ( it’s now 6:32 pm )

and i’ll complete the user manual

so, you’ll have to keep an eye on this thread to get the finished manual and possibly re-download the script

Image Attachments
tonite.jpg
Profile
 
 
Posted: 23 September 2012 07:38 PM   [ Ignore ]   [ # 74 ]
Power Member
Avatar
RankRankRank
Total Posts:  2090
Joined  2006-01-19

- Release—Release—Release—Release—Release—Release -

https://sites.google.com/site/mcasualsdazscripts2/mcjtransport

Here’s version 1 of mcjTransport

it was developed on Daz Studio 3.1 advanced, so that’s where it was the most tested

i did some tests on Daz Studio 4.5 and will do more tonight.

i included a version for Daz Studio 1 and 2 but did not test it at all yet

so, stay tuned to this thread for new versions of the script and the manual


—-

fig. 1 : a 7-keygrame path, with a 10-turn twist added

 

Image Attachments
eoeoe.jpg
Profile
 
 
Posted: 24 September 2012 07:28 PM   [ Ignore ]   [ # 75 ]
Power Member
Avatar
RankRankRank
Total Posts:  2090
Joined  2006-01-19

~ update ~~ update ~~ update ~~ update ~

the version for Daz Studio 1 and 2 now works

the version for DS3, 4, 4.5 had a tiny change to prevent accidental creation of monster tubes encompassing the known universe

the manual was improved


__________________________________
version history
__________________________________
sept 24 9 pm Version for DS1 and DS2
sept 24 early morn. Version 3 limited the maximum segments to 4096 to prevent accidents
sept 23 9:15pm Version 2
sept 23 9pm Version 1

 

Profile
 
 
   
5 of 6
5