Jump to content
Sign in to follow this  
marles

Pop orient from source geo each frame

Recommended Posts

Hi folks,
I'm stuck on a issue. I have a deformed geo that i have fractured in packed pieces. Then I want to use a popnetwork to drive my packed pieces. I would like to update the position and the rotation of my particles with the deformed geometry, but when i try to update the position with a pop wrangle like: @P = point(1, "P", @ptnum) with my geo source on the second input of the popnet, the orientation dosent fit of the original geo, the orientation is not updated.

So, how can i update properly (position and orientation) of my packed pieces with the source deformed geo in the popnetwork frame by frame ?

here is some video to show you, ths ! ;)

What i have, orient not updated:

orient.mp4

 

What i would like, fine deformation:
orientok.mp4

Share this post


Link to post
Share on other sites

it depends on whether your pieces are only transforming or actually deforming, for deforming ones you'll need to replace the geo every frame

for transforming you could use following (if you also bind input 0 to Myself)

matrix3 xform = primintrinsic(1, "transform", @primnum);
setprimintrinsic(0, "transform", @primnum, xform);
@P = point(1, "P", @ptnum);

you can also just use RBD Packed Object and Bullet Solver to bring your pieces in as Animated Static or Deforming Static Objects which will update them for you

 

or if your particles don't have packed prims attached, you can store it as orient

matrix3 xform = primintrinsic(1, "transform", @ptnum);
p@orient = quaternion(xform);
@P = point(1, "P", @ptnum);

it's a bit difficult to guess without a hip file

Share this post


Link to post
Share on other sites

Hi thomas ! 
Thanks for your answer, sorry i couldn't share the hip file, but i created a simple scene to show you what i want and my problem.

concerning your solutions : 

- Replace the geometry ecevry frame could be a nice solution but i 'm not sure how to do this.

- The geometry is a deformed geometry, not transformed. so the first solution using intrinsect doesn't work beacuase it doesn't take the deformation (orientation etc....).

- Using rbd packed object and bullet solver works well, but i wanted to use pop network beacause i don't need collision bertween pieces and it will be faster to compute with pop solver no ?

Basicaly what i want: i have the deformed fractured geometry, and make it progressively exploded (with a simple noise/pop force), at P.y >5 for exemple. But i want a smooth transition between the popforce and the geometry movement. so the packed pieces need to follow correctly the movement before starting to explode.

here is the hip file woith what i want, what ii try and where i failed 
Test_Pop_Orient.hipnc

 

Thx again for your help, very helpfull !

Share this post


Link to post
Share on other sites

Hu jdiazaeswd, i tried with rivet, but i didn't have luck with it. I'm not sure if i use it properly, but it dosn't seem to work. 

Share this post


Link to post
Share on other sites

Hi there,

I would do a frame record in the solver, basically set up a trigger attribute initializes from 0, and in certain condition turn to 1(in your case let's say if(@P.y>5)). And also record which frame it trigger, and name it something like trigger_frame. And no matter you are using rbd or pop, you can manipulate your force/vel/pos when @Frame >= trigger_frame.

You can do this separate in another solver sop or you can directly record in the current dopnet. 

This is normally how I would do something like character walking then shattering, basically if @Frame >= trigger_frame, the pieces will falling or exploding etc, if not then copy the intrinsic from the animation.

Here are some info about how to setup trigger attribute and record the trigger_frame.

 

 

Maybe there is a better way to do it, but I hope this would help.

Edited by jimeng20

Share this post


Link to post
Share on other sites

hey jimeng 20 tkax for your reply, your answer help me a lot, that's a good solution. thx

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×