Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache results objects for complex shapes? #91

Open
DennisSmolek opened this issue Nov 3, 2022 · 1 comment
Open

Cache results objects for complex shapes? #91

DennisSmolek opened this issue Nov 3, 2022 · 1 comment
Milestone

Comments

@DennisSmolek
Copy link

Right now the Operations groups/hierarchy etc have to be completely rerun for for the entire stack each time it’s evaluated.

so really big objects end up having to include all previous brushes/mesh data and be processed each time.

one idea:

let’s say there are 10 operation steps, and you are transforming step #7.
You could run a truncated steps 1-6, and save the result. Then use that result each subsequent pass.
I think if all something like addition you could also run steps 8-10 and generate a brush for that section as well.
This would make a transformation of any size just 3 brushes instead of 10.

plus the results discard unused geometry data so hypothetically run much faster.

Another idea would be to cache by hierarchy.

so for a body for example, a arm/leg etc would cache the results.

This might not be something for the library to do directly persay,
But would be a good example on how to use it in production

I’m going to try to make some tests

@gkjohnson
Copy link
Owner

Yeah ideally when running Evaluator.evaluateHierarchy we'd only rerun nodes that needed it - that was the intent behind that function, anyway, when I first made a pass at it. But it needs to be revisited. And even then we should only need to run nodes where bounding overlap has meaningfully changed.

I have a tendency to start too many projects so I haven't been putting any time into CSG, at the moment. I have some work I need to do on the pathtracer and then maybe I'll take a look at this project again. But of course help is always appreciated if you want to look into any of this!

@gkjohnson gkjohnson added this to the v0.0.x milestone Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants