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

Instancing without attribute callbacks #3

Open
BigRoy opened this issue Mar 6, 2016 · 2 comments
Open

Instancing without attribute callbacks #3

BigRoy opened this issue Mar 6, 2016 · 2 comments

Comments

@BigRoy
Copy link

BigRoy commented Mar 6, 2016

Goal

Implement a way to perform the instancing in a way that doesn't require attribute callbacks

Description

Currently the instancer relies heavily on Attribute callbacks to update the instancers. In ROADMAP.md it is mentioned that removing this behavior would be optimal and describes three possible solutions with their possible downsides.

To discuss the possible options I'm starting this issue to see if we can get to a good solution.

@BigRoy
Copy link
Author

BigRoy commented Mar 6, 2016

The Maya instancer can be connected without using particles by connecting the correct data to its instancer.inputPoints attribute. By outputting the correct type you get the full instancing support for position, rotations, scales, object indices.

Using this instancer works very well since it's often also renderable with third party renderers (like built-in geometry). Also from an instancer many scripts are already written or available to bake those to actual geometry if needed.

By simplifying the main along curve plug-in to output that data it doesn't rely at all on attribute callbacks. From there on out we can define an additional plug-in that only takes that data to do the attribute callbacks to preserve the backwards compatible behavior. Basically separating that behavior onto itself. Theoretically once could then also use that exact same "custom plug-in" to work with regular particles.

This might also make the main along curve implementation a lot simpler.

@mmerchante
Copy link
Owner

Hi BigRoy!

Yeah, I've been thinking about this a little bit more, and I think that reimplementing the plugin with the instancer should get nice results. I did some tests when writing the roadmap text, and got to something semi-usable (had some problems with object pivots); I'll see if I can begin working on it in a few days. But overall it should make the code more robust and compatible with renderers as you say.

It would also help optimize the compute logic, as a lot of computations can be reused because there would be one big loop only instead of three (pos, rot, scale).

I think that the tools to bake to geometry should be well thought out, however: not just returning a big chunk of geometry, but a well defined hierarchy of objects with their animation curves, etc. I feel that offering the flexibility to use the tool as an animator or a modeler adds value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants