ICE - worms crawling in skeleton

Discussions about SOFTIMAGEs© Interactive Creative Environment©
imding
Posts: 15
Joined: 24 Jun 2009, 22:21

ICE - worms crawling in skeleton

Post by imding » 11 Nov 2014, 14:14

hi dear SI community, i'm trying to make a creature that is a pile of bones being held together by tentacles (or big worms). I could just sculpt them in and have them static but i'm really digging the idea of giving a slow turbulent animation to the worms in the final (and possibly dripping goo as well), to make it more believable.

ofc i turned to ICE but being a nood as i am i have no idea where to start, if you've seen similar stuff or know how this can by approached please point me in the right direction. thanks a bunch.

-Siuling

User avatar
owei
Administrator
Posts: 840
Joined: 03 Jun 2009, 15:25
Location: Siegen/Germany

Re: ICE - worms crawling in skeleton

Post by owei » 11 Nov 2014, 15:28

Hey and welcome!
Interesting challenge...but, to say more, can you post an image of you model or a sketch? And describe a little more on how the movement should be?? By now, i can´t really imagine, how it should look and move ..

cheers,
oli

User avatar
FXDude
Posts: 1145
Joined: 19 Jun 2012, 19:59

Re: ICE - worms crawling in skeleton

Post by FXDude » 11 Nov 2014, 21:38

What if you had a really long curve or a few curves squiglling around the skeleton that you could weight to your rig like a regular mesh and have wormy models deformed by curve to them which you could animate back and forth unevenly in accordion along their lengths?

You could also use a model of the general shape of your char as a reference to position your worm curves and adjust the worm thickness in different areas.

imding
Posts: 15
Joined: 24 Jun 2009, 22:21

Re: ICE - worms crawling in skeleton

Post by imding » 11 Nov 2014, 21:45

hi owei, thanks for the swift reply.

i've uploaded 2 screenshots, 1st is the rough sketch, the worms go inside and wraps around the skeleton (only the extremities of some bones are exposed) , acting like muscles holding the bones together, the concept here is that the creature is really just the worms, without the bones those worms still live and will latch on to other things that can serve as a transportation tool.

the 2nd one is me trying to break up each individual bone so i can rig and have each bone move w/o stretching. here you can see the structure of the bones.

i want an animated idle pose with the worms kind of moving, and dripping some fluids. so it doesn't have to be a full ICE simulation or anything crazy. i just don't want to model hundreds of tubes and rig them to hundreds of curves and then hand animate each one (too much tedious work).

-Siuling
You do not have the required permissions to view the files attached to this post.

imding
Posts: 15
Joined: 24 Jun 2009, 22:21

Re: ICE - worms crawling in skeleton

Post by imding » 11 Nov 2014, 21:55

FXDude wrote:What if you had a really long curve or a few curves squiglling around the skeleton that you could weight to your rig like a regular mesh and have wormy models deformed by curve to them which you could animate back and forth unevenly in accordion along their lengths?

You could also use a model of the general shape of your char as a reference to position your worm curves and adjust the worm thickness in different areas.
hi FXDude, that's an amazing idea, this could be my solution for a concept piece! thank you!

but i would still like to figure out an ICEy way so that i can later make the worms really thin like on Venom, and have them "swim" along a path around the body, to give it more life.

User avatar
FXDude
Posts: 1145
Joined: 19 Jun 2012, 19:59

Re: ICE - worms crawling in skeleton

Post by FXDude » 12 Nov 2014, 02:06

If the worms would be small, last year we worked on a tick with things sliding on it.

And I think this is what helped us if I recall.

https://groups.google.com/forum/#!topic ... o9OnZ0Kb-w

there is also a scene in there compliments of Sven.


But I could try and recreate it if necessary,
but otherwise, your off with a great start with your bones! and let us know how it goes!

User avatar
FXDude
Posts: 1145
Joined: 19 Jun 2012, 19:59

Re: ICE - worms crawling in skeleton

Post by FXDude » 12 Nov 2014, 18:44

FXDude wrote: there is also a scene in there compliments of Sven.
Sorry, compliments of Steven Caron :]

I recall it to be not immediately obvious having your particles be emmitted and then move around while keeping their position on a deformed model.

Though I can't recall exactly what made it work, I do recall the 'trick' being very simple (like most of everything is soft):)

User avatar
FXDude
Posts: 1145
Joined: 19 Jun 2012, 19:59

Re: ICE - worms crawling in skeleton

Post by FXDude » 12 Nov 2014, 19:08

If you want to try in Maya, here are typical ways to deal with particles.

(Sticking based on UV's)

But Maybe Bifrost would make things easier (-maybe- in half a decade)
How do I make surface emitted particles stick to their surface?

Kept thinking I was over-engineering this and a lot would/should happen automatically, apparently not. You need to emit from surface (obviously), make the same surface a goal, add all relevant goal and parentUV properties, then set a creation expression linking it all together.

emit particles from surface
check emitter is in surface mode (often defaults back to omni), check 'need parent uvs'
add general particle attributes goalU goalV parentU parentV goalPP
set goal weight to 1
set creation expression goalU = parentU; goalV = parentV;

See? Simple! Kinda. I wondered if there was an advantage to using this rather than just goalU = rand(1); goalV = rand(1);. Turns out there is; if your uv's aren't laid out evenly you'll get particles clustering on the edges of your uv borders. The 'proper' emit method above avoids this.

________________________________________
Make particle instances orient to surface normal

An extension of the above trick. Once you have your goal object defined, go into the 'goal weights' section of the particleshape, and click 'create goal world position 0 PP'. Create the shape(s) you wish to instance (remember the should point down the x-axis), create your instancer node, and set aim direction to goalWorldNormal0PP. This has the advantage of being quite fast, and will update if you deform or transform your goal object. Here's an example scene:

normal_orient_instances.ma: normal_orient_instances.ma

How do I uninstance particle objects ?
Unfortunately you can't simply duplicate the instancer to retrieve the mesh. Fortunately there are plugins & scripts around.

http://www.creativecrash.com/.../scripts-plugins/dynamics/c/duplicateparticleinstancefinal


-- MattBernadat - 25 Nov 2011

________________________________________
How do I have some particles stick to a collision surface and some collide?
goalPP and modulus are your friends.

In creation:

// red particles will stick, black will bounce
if (particleShape1.particleId %2 == 0)
particleShape1.rgbPP = <<1, 0, 0>>;
else
particleShape1.rgbPP = <<0, 0, 0>>;

// initial goalPP setting, no attraction
particleShape1.goalPP = 0;

________________________________________
In runtime: (all the collision PP attrs need to be added first for this to work)

if (particleShape1.particleId %2 == 0)
{

if (particleShape1.collisionTime != -1)
{
particleShape1.goalU = particleShape1.collisionU;
particleShape1.goalV = particleShape1.collisionV;
particleShape1.goalPP = 1;
}
}

-- KevinMannens - 17 Sep 2008

________________________________________
How do I control ratio of particle instanced objects?
(adapted from a thread on highend)

First, have a look at the bottom of this page for info about the modulus (%) operator.

Based on this information, you should be able to understand the following MEL:

// loop through an array of 10
for ($x = 0; $x <= 10; $x++)
{
// if the remainder is 0
// i.e. if $x is dividable by 10, print "One"
if ( $x % 10 == 0 )
{
print ("One\n");
}

// If the remainder is smaller or equal to
// 2 AND if the remainder of $x is bigger then 0,
// then print 2
else if ($x % 10 <= 2 && $x % 10 > 0 )
{
print ("Two\n");
}

// if the remainder is bigger then 2,
// print Three
else
{
print ("Three\n");
}

}
________________________________________

You could then write an expression to control the relative ration (e.g. 1-2-7) of particle instances:

if ( particleShape1.particleId % 10 == 0 )
particleShape1.indexPP = 0;

else if ( particleShape1.particleId % 10 <= 2 && particleShape1.particleId % 10 > 0 )
particleShape1.indexPP = 1;

else
particleShape1.indexPP = 2;

-- KevinMannens - 17 Sep 2008

________________________________________
How do I get particles to collide with only one side of a collision object?
(added by kmannens)

Brain teaser from cgtalk:

By default, particles in maya collide with connected surfaces on both sides not taking into account face normals or double-sided attribute. Is there a way or a node able to solve the one-sided particle-object collision?

Answer: You could do some fancy vector math, or you could be lazy and assign a white texture to one side of the object and black to the other side. Then use colorAtPoint and traceDepthPP. Like so:

//upon collision
if (particleShape1.collisionU != -1 )

{
// get collisionU
float $colU = particleShape1.collisionU;
//get collisionV
float $colV = particleShape1.collisionV;
// get the color at the UV
vector $colRGB = `colorAtPoint -o RGB -u $colU -v $colV ramp1`;

if ($colRGB != <<1, 1, 1>>)
{
//line below to fix collision evaluation problem
particleShape1.velocity = particleShape1.collisionIncomingVelocity;
particleShape1.traceDepthPP = 0;
}
else
particleShape1.traceDepthPP = 10;

}

________________________________________
How do I get (and use) the exact location of a particle collision?
(added by kmannens)

collisionWorldPosition is your friend. It's a PP attr that is a bit hidden, and I couldn't find any docs on it - but it does the trick. It does however, need another PP attr to work: collisionTime. So, set up your collisions as your normally would and then add collisionTime and collisionWorldPosition.

Say you want to create a locator at the point of collision.

In runtime, add something like this:

//get the collision position
vector $collPos = particleShape1.collisionWorldPosition;
// get collision frame
float $collFrame = (particleShape1.collisionTime*24);

//if there is a collision...
if (particleShape1.collisionTime != -1)

{ //verbose
print ("particle ID " + particleShape1.particleId + " colliding at frame " + $collFrame + ".\n");
print ("Creating locator at: " + ($collPos.x) +" , " + ($collPos.y) + " , " + ($collPos.z) + ".\n");

//create locator
string $loc[] = `spaceLocator`;
// center pivot on locator
xform -cp $loc[0];

// move locator to collision position
setAttr ($loc[0]+".translateX") ($collPos.x);
setAttr ($loc[0]+".translateY") ($collPos.y);
setAttr ($loc[0]+".translateZ") ($collPos.z);


}

________________________________________
How do I place an annotation at the point of collision?
Say I want to have an annotation per collision that tells me the exact position in xyz of the collision. This turned out to be a bit trickier then expected. Thanks to Chris Armsden for helping me out with the syntax. The trick was not try and do it all in one go in the annotation command. Rather then using the built in -text and -position flags, I created a "naked" annotation first and then adjusted that node using setAttr. Like this:

vector $collPos = particleShape1.collisionWorldPosition;
float $collFrame = (particleShape1.collisionTime*24);

if (particleShape1.collisionTime != -1)
{
//########### locator stuff #################

string $loc[] = `spaceLocator`;
xform -cp $loc[0];

setAttr ($loc[0]+".translateX") ($collPos.x);
setAttr ($loc[0]+".translateY") ($collPos.y);
setAttr ($loc[0]+".translateZ") ($collPos.z);

//########### annotation stuff #################

// create annotation with dummy text and pos
string $annotator = `annotate -tx "THIS SUCKS" -p 0 0 0`; //this returns a shape
// get transform of annotation node, because command returns shape
string $annTrans[] = `listRelatives -p $annotator`;

// position annotation at collision
setAttr ($annTrans[0]+ ".translateX") ($collPos.x);
setAttr ($annTrans[0]+ ".translateY") ($collPos.y+5);
setAttr ($annTrans[0]+ ".translateZ") ($collPos.z);

// cut of fractional part of collPos by re-declaring as int
int $annX = $collPos.x;
int $annY = $collPos.y;
int $annZ = $collPos.z;

// set the text and pos of annotation
setAttr -type "string" ($annotator + ".text") ($annX + "|" + $annY + "|" + $annZ) ;
// parent annotation under locator
parent $annTrans[0] $loc[0];

}


imding
Posts: 15
Joined: 24 Jun 2009, 22:21

Re: ICE - worms crawling in skeleton

Post by imding » 13 Nov 2014, 11:43

thanks FXDude, i've barely touched Maya and i think maybe this isn't the best place to start, perhaps i'll do some modelling with it on my next character.

so here's what i've done so far with the factory ICE nodes, did some searching around and found some free compounds like emTools and LKFabrics, i'm still playing around with those to see if i can use them to produce better results.



so in this scene there's an emitter and goal, some obstacles inbetween. particles travel to goal and Rotate Velocity around surface of obstacle mesh plus a Generate Strand Trails node. problems here are (1)the particles makes a sharp change of direction upon colliding with obstacle mesh, this produces sharp edges on trails. (2)and also the intersections of trails. (3)the trails all have the same length, so they end up not attaching to both emitter and goal like muscles do.

for the trail length i guess i can calculate distance travelled by each particle to build an array, work out the number of segments each trail needs to bridge both ends.

but to solve the first 2 problems i need to manipulate each trail segment on the strands, but didn't manage to figure it out, any ideas? i'm pretty sure i should use the Linear Interpolate node.

User avatar
FXDude
Posts: 1145
Joined: 19 Jun 2012, 19:59

Re: ICE - worms crawling in skeleton

Post by FXDude » 14 Nov 2014, 19:52

What if you combined both tricks?

Like big(ger) worms deformed by curve (with easy artistic direction),
and an ICE smaller worm layer moving over the few big worms. (?)

The back and forth motion of the big snakes could also be ICE driven, like just a simple: get vertex pos-> turbulence in y -> set vertex pos
Last edited by FXDude on 14 Nov 2014, 20:03, edited 1 time in total.