Optimising performance with POP net and copy to points

   1631   2   1
User Avatar
Member
2 posts
Joined: May 2020
Offline
I've created a mini solar system containing an asteroid belt with unique asteroids. To create unique asteroid geometries, I've plugged transforms into a copy to points node within a for-each loop (as suggested in the SideFX docs). I've set up a simple POP net to apply an attract node to the central star as well as initial velocity for the asteroids so they orbit the star.

This resulted in a performance bottleneck which I initially thought was due to the number of polygons. However when a poly-reduce only made matters worse, I discovered the real problem is that the transforms (mountain in particular) are being rerun every frame.

I'm guessing that this pattern for copying unique geos to points wasn't intended to be used in conjunction with DOPs?

Can anyone suggest a better way to go about this? The only other idea I had was to create a bunch of different asteroid geos and saving them to file, then adding a @piecenum attribute to the points to randomise loading. However I'm not sure how to do this without hitting a similar issue where the file is reloaded every frame instead of just at the beginning.

Attachments:
nodes.JPG (43.6 KB)

User Avatar
Member
9415 posts
Joined: July 2007
Offline
there is plenty of ways to optimize copying performance in case you needed it live

but in your particular case it's probably best to just copy on the static points and then use Transform pieces to update transforms with the animated ones

- so timeshift your particles to start frame so that they become static
- copy your geo on them, make sure you pack before copying
- then append Transform Pieces and connect animated points to second input and static points to 3rd
Edited by tamte - Feb. 8, 2021 14:09:54
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
2 posts
Joined: May 2020
Offline
Thank you Tamte! That's an excellent solution that I can see being very handy for many projects. I've attached an image of the resulting network in case it's of use to anyone else.

Attachments:
nodes1.JPG (43.6 KB)

  • Quick Links