Jump to content
anbt

How to dynamically toggle 'invert sign' of static object in DOPs?

Recommended Posts

I tried with a volume wrangle and multiply by -1 the name of my volume (collision), it didn't work

if ($F>178) {
    @collision *= -1;
    }

Any idea?

Thank you

Share this post


Link to post
Share on other sites

I think this sould work as it is, except for the frame query. Try instead:

 

if(@Frame>178)

{

.....

 

Ahoi!

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks for your answer, I tried but it doesn't change anything.

Is my attribute wrangle placed correctly? I tried 'run over points' and primitive in the wrangle)

Where can I see the sign value in the geometry spreadsheet of my static object VDB collider, so I can see if anything changes?

Cheers :)

 

image.png.afe99ec76496eac944949be5aba4a64a.pngimage.png.847264e353ca72ac6011e2c9defa6fc4.png

Edited by anbt

Share this post


Link to post
Share on other sites

I am silly, I have to use a volume wrangle, but in the end, it doesn't do what I expected so whatever, this is not the way :(

Share this post


Link to post
Share on other sites

Hmm strange, I guess this could be a quick workaround...

I will take a closer look in the evening

 

 

sdfinvert.JPG

Share this post


Link to post
Share on other sites

Here is the full description of my issue with the hip file.

I am generating a flip sim within a hollow VDB collider. That same VDB opens up at the top (ideally, I'd like the liquid to overflow from the top at some point), but for some unknown reason (possibly this VDB sign), the sim starts to get slow, and it stops filling up.

https://www.sidefx.com/forum/topic/80058/?page=1#post-343937

I am baffled by this issue. And couldn't get any clue as to what's not working so far.

Share this post


Link to post
Share on other sites
Posted (edited)
@collision *= -1;

I'm guessing at least part of your problem is that this is happening every frame? I imagine you want to flip it once, not invert itself on every cook.

Edited by Dweeble

Share this post


Link to post
Share on other sites

@Dweeble yes indeed, just once, and potentially later again at another frame. 

But I have no clue if this is gonna fix my problem, this is just an idea to try

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

×