Jump to content

Transfer Low to high sim - vellum


philpappas

Recommended Posts

1 hour ago, davpe said:

i don't think you can do that with vellum.

however, what usualy does work for me is point deform SOP where lowpoly sim works as a deformer for hipoly geometry.

cheers.

then maybe i could use another solver? i dont need the emitted primitives to be soft body but they have to collide with vellum geo.

Link to comment
Share on other sites

it depends really on what exactly are you doing but for example mutual rbd collisions with vellum didn't work well for me. using really stiff vellum objects instead turned out to be much better solution. if you just need one way interaction, combining rbd solver with vellum should work fine.

having said that I'm not that versed with simulations so don't take my word for granted.

Link to comment
Share on other sites

13 minutes ago, Noobini said:

example file is great...except why the 'messy' code in DOP ?

fit(($FF+12)%15 - 13,0,1,0,1)

I used $F%15==1...does the job ?

obviously OP was aware of the messy expression as he pointed it out, however any suggestions to improvement would be more useful directly in that thread rather than here where most people finding that example would not see it, also for equivalent expression it would be $F%15==2

Edited by anim
Link to comment
Share on other sites

On 4/23/2020 at 9:11 AM, anim said:

Vellum is fine for that, there is many ways how to approach it, but if you are emitting always the same geo, you can use something like this

 

yes this works! but its a bit overkill for me since my geometry is not deforming. the emitted objects are practically rigid

there should be a way to extract the oriented bounding box of each emitted object then take the transform matrix of this bbox and apply it to the high res. sounds simple

Also the dop import has this wonderfull drop menu with an option " transform input geometry". it would be so straight forward if that actually worked for vellum. i ve seen some old tutorials but i was used with rbd.

 

Link to comment
Share on other sites

10 minutes ago, philpappas said:

my geometry is not deforming. the emitted objects are practically rigid

there should be a way to extract the oriented bounding box of each emitted object then take the transform matrix of this bbox and apply it to the high res. sounds simple

use Extract Transform SOP in that case, which will give you instance points you can copy your hi res onto

but personally since you are using vellum and you wil get some tiny bit of deformation, it can look nice if it bends a bit, since plastic toy soldiers in real life can bend too

Link to comment
Share on other sites

36 minutes ago, anim said:

use Extract Transform SOP in that case, which will give you instance points you can copy your hi res onto

but personally since you are using vellum and you wil get some tiny bit of deformation, it can look nice if it bends a bit, since plastic toy soldiers in real life can bend too

i tried that but it spits out a warning " reference and target geometry have different point counts",  which is exactly the point of this

i could go with the proposed thechnique, its already working, but i would like to know how to do this because it seems fundamental - swaping low res with high or any other object

Edited by philpappas
Link to comment
Share on other sites

50 minutes ago, philpappas said:

i tried that but it spits out a warning " reference and target geometry have different point counts",  which is exactly the point of this

they have to be the same topology

you can do it withn the same Forloop for example, here is modified file from the above linked post

vellumsim_uprez_example_mod.hipnc

EDIT: of course if you weren't emitting and the amount would be the same all the way through you don't need For Loop and you can use Piece attribute on the Extract Tranform to generate point per piece and then use those points in Transform Pieces SOP to transform hi res, but wit emission you either have to copy the same number of hires and do the same or just use for loop which does both at the same time

Edited by anim
  • Thanks 1
Link to comment
Share on other sites

10 hours ago, anim said:

EDIT: of course if you weren't emitting and the amount would be the same all the way through you don't need For Loop and you can use Piece attribute on the Extract Tranform to generate point per piece and then use those points in Transform Pieces SOP to transform hi res, but wit emission you either have to copy the same number of hires and do the same or just use for loop which does both at the same time

ohh i see, so reference and target were referring to the same object, thanks!

if you had thousands of objects though, that foreach loop would get really slow.

at least the extract transform method when compiled is 20 times faster compared to the pointdeform compiled version

Link to comment
Share on other sites

5 hours ago, philpappas said:

if you had thousands of objects though, that foreach loop would get really slow.

you can compile it

and as I said if you were not emitting you can do without, but since you are emitting you need to create corresponding amount of copies each frame, and in that case foreach is as good as any other method of replicating them

you can in theory create maximum number of copies and then delete the excess amount every frame just to transform the rest, hard to say at this point if it's worth it I guess it depends on the case

Link to comment
Share on other sites

On 4/26/2020 at 6:05 PM, anim said:

you can compile it

and as I said if you were not emitting you can do without, but since you are emitting you need to create corresponding amount of copies each frame, and in that case foreach is as good as any other method of replicating them

you can in theory create maximum number of copies and then delete the excess amount every frame just to transform the rest, hard to say at this point if it's worth it I guess it depends on the case

following up on your advice i've been trying to make the simple version work where i am not emitting but i have all objects present from frame 1, but the copy to points isnt working as expected.

the extract transform takes the rest geometry and the sim and computes the transforms for each piece. There is something i didnt understand obviously, take a look at the help file i've uploaded

 

extract_transform.hip

Link to comment
Share on other sites

On 5/3/2020 at 8:26 PM, anim said:

here is fixed file with explanation inside

extract_transform_fix.hip

thank you very much for the example file! its pretty clear now that you must have the high res version copied to match the low res copies and then transform them, avoiding generating every frame new geo.

One thing though, you are using the template points from the transform SOP to copy the high res, but i dont have that in my real scene,

i just have the low res sim cached and loading from disk


i ve made some minor adjustments to my hip file in order to access the template points and got it working

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...