Jump to content

Help!


Recommended Posts

Ah, a slight problem has occurred. As I have previously mentioned elsewhere, I've simulated hairs on a creature's body. This is done by using an Object Merge to bring in the deforming geometry, using a Scatter SOP to generate template points for the hairs, using the AttribTransfer SOP to transfer normals from the geo to the points, then copying a NURBS curve to each point and adding a Spring SOP to simulate dynamics. (That's a very simple version, but you get the idea!). This all works fine if I render individual frames from the character's animation, or non-animated sequences.

The moment I try and render the sequence, however, the simulation goes crazy, and the hair starts reacting completely randomly on a frame-by-frame basis. This started happening a while ago but I thought it was fixed. Now it looks like the problem never went away. Images of what I'm talking about are over at this topic.

I have an inkling that the problem is occuring due to the Scatter SOP. With non-deforming geometry, it will generate the same points for a given random seed. However, if the geometry deforms, it'll generate a whole new set of points in different locations with different numbers. I'm guessing that this is the problem, because the amount of weirdness seems to correlate with the amount of the geo that is being deformed. Basically it leads to the `root' of each hair in the simulation being arbitrarily translated every frame. Obviously for a single frame, it would just cook the particle simulation based on the locations of the points on that frame alone.

Assuming this is the case, I guess I'll need to create all of these points before any deformations occur, group them and then get them deformed as well? Is there any way I can do this, given that I've already set up my capture regions, set up a MTM (blendshapes) system for facial animation, and begun to animate? Or do I have to go back to square one a fortnight before deadline? :blink:

Link to comment
Share on other sites

hey hey

yeah deadlines,

what about using the geom u have post and pre the deform and just the scatter node points that is sourced on the original geom (not the deformed), then connecting them all into a lattice sop, make sure its set to points,and decrease the radius of the kernel function,

then mergin that node to the deformed geom, that should transfer the animation of the deformation onto the scatter points.

its a risky one, because u'll fine that its gonna be a bit slow, but theres a solution. :-)

all the best

aracid :blink:

Link to comment
Share on other sites

Okay, you could try this.

Caputure your critter. Create your scatterSOP point information and use the auto grouping function. Append a DeleteSOP and a make sure you only have the scatterPt group coming out, then append an attribTransferSOP to transfer the capture information onto the scatterSOP's points. (For faster interaction you should always lock you captured geometry before you input it into a deformSOP). When you do the transfer you can set the attribTransfer so the conditions are using a Uniform Model. If you increase the sample count you will get a blend result of N times samples of surrounding points. You can try other methods if you wish. Then append a second deformSOP and deform your points with the skin.

Now some would say you don't need the attribTransferSOP as the scatterSOP adds geometry to the existing and you could just capture it with the rest. I think this is method is better and will produce a better result and be easier to tweak your weighting on the critter.

This should give a locked scatter solution with deformation matching your character.

-k

Ah, a slight problem has occurred.  As I have previously mentioned elsewhere, I've simulated hairs on a creature's body.  This is done by using an Object Merge to bring in the deforming geometry, using a Scatter SOP to generate template points for the hairs, using the AttribTransfer SOP to transfer normals from the geo to the points, then copying a NURBS curve to each point and adding a Spring SOP to simulate dynamics.  (That's a very simple version, but you get the idea!).  This all works fine if I render individual frames from the character's animation, or non-animated sequences.

The moment I try and render the sequence, however, the simulation goes crazy, and the hair starts reacting completely randomly on a frame-by-frame basis.  This started happening a while ago but I thought it was fixed.  Now it looks like the problem never went away.  Images of what I'm talking about are over at this topic.

I have an inkling that the problem is occuring due to the Scatter SOP.  With non-deforming geometry, it will generate the same points for a given random seed.  However, if the geometry deforms, it'll generate a whole new set of points in different locations with different numbers.  I'm guessing that this is the problem, because the amount of weirdness seems to correlate with the amount of the geo that is being deformed.  Basically it leads to the `root' of each hair in the simulation being arbitrarily translated every frame.  Obviously for a single frame, it would just cook the particle simulation based on the locations of the points on that frame alone.

Assuming this is the case, I guess I'll need to create all of these points before any deformations occur, group them and then get them deformed as well?  Is there any way I can do this, given that I've already set up my capture regions, set up a MTM (blendshapes) system for facial animation, and begun to animate?  Or do I have to go back to square one a fortnight before deadline?  :blink:

17999[/snapback]

Link to comment
Share on other sites

i know this isn't much help now, but for future reference.. a great way to handle the scatter sop is to take advantage of the 'alternate attribute' param.. this way you can create your attrib up the chain..modify your attrib however (i like painting it directly on my model) and then use it as a basis for the scatter.

Link to comment
Share on other sites

i know this isn't much help now, but for future reference.. a great way to handle the scatter sop is to take advantage of the 'alternate attribute' param.. this way you can create your attrib up the chain..modify your attrib however (i like painting it directly on my model) and then use it as a basis for the scatter.

18011[/snapback]

I think this would be a better method than deforming several hundred thousand points. I haven't had time to try it yet but simply transferring that many capture attributes is going to eat memory. So I'm trying this method right now. I assume that if I just create a float point attribute and use this to scatter, it'll work ok after deforming?

EDIT: It works just fine now, thanks! Also, it was scattering based on primitive area that caused the problem, since the area of each prim was changing due to deformation. Any ideas how to set and lock the new scatter point attribute based on the prim areas at the rest position?

Link to comment
Share on other sites

Any ideas how to set and lock the new scatter point attribute based on the prim areas at the rest position?

Make sure you put the Measure SOP calcualting primitive area BEFORE you deform the geometry. The Scatter SOP works very well making sure the point "sticks" to the surface.

Tested it yesterday and works very well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...