Jump to content

Dynamically Adding Geo to Vellum solver


benttoenail

Recommended Posts

Is there a way to dynamically add geometry to a vellum solver?  

I have a situation where I'm generating new patches of geometry every ten frames.  The vellum solver is only solving for the first patch, but not picking up the rest.  The newly created geo is showing up in the vellum configure node, but not the solver. 

Any ideas?

Many thanks!

-max

 

image.thumb.png.182b84ecc7d658cfd3d6c60d18cf224a.png

 

 

Link to comment
Share on other sites

@tamagochy Thanks for the reply!  I tried this and it almost works.  There's a couple of problems I run into:

The geo is being added every frame, thus the geometry is being duplicated every frame.  I'm spawning the different patches every 10 frames, therefore the vellum source is making 10 copies for each patch.

I'm losing all dynamics - the solver stops working and the geo becomes static. 

Any idea on how to add geometry only on a single frame? 

Thanks again

Link to comment
Share on other sites

Okay, so I figured out how to add geo every specific frame through some vex wrangling.  Kinda hacky, but it works in the Vellum Source node by adding the geo every 10 frames. 

//Cycle every 10 frames
int prim = (@Frame*0.1)%9
i@p = prim;

i@n = 1;
if((@Frame * 0.1)%9==@p)
{
//turn n on and off
    @n = 0;
}

//Add to group ONLY every 10th frame
if(@n == 0){
    setprimgroup(0, "patchGrp", prim, 1, 'set');
}

 

Problem is, the geo that's added is not being solved!  Here's my node setup:

image.thumb.png.456addaa0519b35f812c671ac2f74f41.png

I'm throwing the patches directly into the solver, which (not surprisingly) isn't working.  

How do I solve for geo that's dynamically added to the vellum solver through the vellum source node?

  

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