djpeanut Posted May 6, 2005 Share Posted May 6, 2005 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? Quote Link to comment Share on other sites More sharing options...
aracid Posted May 6, 2005 Share Posted May 6, 2005 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 Quote Link to comment Share on other sites More sharing options...
sibarrick Posted May 6, 2005 Share Posted May 6, 2005 Don't have time to try this, but can't you scatter based on an attribute? If so that attribute could be the rest position? Quote Link to comment Share on other sites More sharing options...
thekenny Posted May 6, 2005 Share Posted May 6, 2005 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? 17999[/snapback] Quote Link to comment Share on other sites More sharing options...
djpeanut Posted May 6, 2005 Author Share Posted May 6, 2005 Thanks for all the help guys. I'm going to try thekenny's solution today. Will post later with the results of it. Thanks again - phew!! Quote Link to comment Share on other sites More sharing options...
doc Posted May 6, 2005 Share Posted May 6, 2005 have you turned off "scatter based on primitive area" in your scatter sop? I've notice that the points in the scatter sop tend to jump when this is turned on. Quote Link to comment Share on other sites More sharing options...
deecue Posted May 6, 2005 Share Posted May 6, 2005 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. Quote Link to comment Share on other sites More sharing options...
djpeanut Posted May 7, 2005 Author Share Posted May 7, 2005 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? Quote Link to comment Share on other sites More sharing options...
old school Posted May 7, 2005 Share Posted May 7, 2005 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.