Jump to content

curve from particle without rail sop ? <SOLVED>


br1

Recommended Posts

Hi,

 

I'm looking for a fast and cheap way to add curves behind my particles.  My biggest issue is that I've got around 200 000 of them and they evolve for 1600 frames which makes the trail sop solution really slow.

 

As they dont move too much I don't need the curves to be really detailed and I was wondering how I could clone the points form my particles first at birth time, then when normalised age is at 0.25, the 0,75.  I would then use and add sop to connect the particle to it's first "child" until the second one is born and inserted in the add sop, and so on.

 

Does anyone has advice on how to do that ?

Thanks

Bruno

Edited by br1
Link to comment
Share on other sites

Have you tried this?

 

In pops create PopReplicate with Shape set to Point and disable inheriting velocity. Then in sops create Add SOP, and in Polygons/By Group set Add to By Attribute which name may be sourceptnum (I think popreplicate create this attribute).

Link to comment
Share on other sites

@Edward : my trail sop is not connecting the points, just computing the trail.  Still, it has to go through all the cached files from frame 1 to frame 1600 to compute the final trail and I think reading all those caches can be extremely slow and  painful..

@ Jutar : didn't try that yet, I I fear that I'll end up with huge cached files .. I'm already over 53 GB of data with the normal cache, I cannot imagine waht it'll be with each oint replicated over 1600 frames ! I'll give it a try...

Link to comment
Share on other sites

if i had to create trail on 20000 pop i think i would simply

- emit my 20000 pop sim with a unique @id

- then use a sop solver to merge previous point

- i would also add @frame to keep memory of the creation frame in the sop solver

- then make a connect by @id with the add sop

- then postproces the stuff in vop to create the trail and delete what i don't need

but maybe it's not adapted to what you want ?

Edited by sebkaine
Link to comment
Share on other sites

as an alternative to cache every frame you could just cache the last frame with the complete trail of lines, and use life stored on points to process your geometry after.

 

EDIT

i realised that you are probably already doing that.

if you can distribute the work on more machines you could:

-cache the particle sim

-partition using a delete node

-trace each partition on a different machine, on a different file

 

 

even if it's slow and painful, once you have the final cache (last frame) there's a lot of things you can do on it after.

You can work with less particles to test and tweak to make the lookdev faster.

In the trail sop you can change the step size, so you can cache once every 2 frames for example...

Edited by MENOZ
Link to comment
Share on other sites

Thanks to all for the suggestions. I still have to try a few of the advises given in this thread.  

i was also thinking of generating all the curves once, the use a carve sop to trim them all based on the current frame.  

Haven't tried it yet !

Link to comment
Share on other sites

here is a quick test, it's not the most efficient way cause i create lot of useless point, but it's easy to do.

for best perf i think i would try to use an attribute wrangle and create point in vex.

 

 

edit :

i post a dumb trail it's fast and it's stupid ... so maybe it will be good enough ...

trail.hipnc

dumb_trail.hipnc

Edited by sebkaine
Link to comment
Share on other sites

Hey sebkaine,

your dumb_trail is similar to the method I was using before, it's quite fast expect that in my case the curves have to live forever and be drawn from frame one to frame 1600 which forces Houdini to read all the caches... With 50GB of caches it's getting slow ! Maybe I should cache everything on a ssd or something similar.

I still have to try a few other worflows...

Link to comment
Share on other sites

well i have no time to test extensively , but if you have some time i would try to play with 

addpoint(geoself(),p);

Command in VEX. creating some past reference position with it would be very fast i think.

Try to check the doc to see if they give an exemple scene.

Link to comment
Share on other sites

Getting there, 

This is probably what I ended up as the best solution for speed, close to what Andrea suggested.

so I just compute the curves on the last frame of my sim, save them as bgeo, then us a wrangle to delete points by age.

It seems to be working fine for particles born at the first frame, I still have to find a way to add the birthtime to it, because it's not really cutting the curves correctly for frames born later during the sim...

 

 

odforce_grow_curve_particles_br1.hip

Link to comment
Share on other sites

Ok,

I got it working. I just had to play with some age attributes to end up with a nice growth.

File attached, thanks for all the suggestions.  It spared around 8-10 GB of memory when computing compared to a trail/add sop over 16000 frames !

 

 

Thanks for all the comments and suggestions !

There's probably a way with fewer nodes but it fits my needs for the moment.

Bruno

 

 

ps : how do I rename a topic to solved ?

odforce__solved_grow_curve_particles_br0.hip

Edited by br1
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...