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

Per-instance attributes support #42

Open
kubo-von opened this issue Jan 28, 2020 · 3 comments
Open

Per-instance attributes support #42

kubo-von opened this issue Jan 28, 2020 · 3 comments

Comments

@kubo-von
Copy link
Contributor

Hi @boberfly
not sure if Cycles can do this atm, but here's and example scene.
Screenshot from 2020-01-28 14-59-50
(arnold render)
Cube is being instances onto points which float attribute, that attribute is then passed as per-instance attribute by the instancer.
arnold and cycles scenes + source usd with the points is here:
https://drive.google.com/drive/folders/1_7KhFIbD1h2ZWoOSPuKeCQgC-xPUuYYX?usp=sharing
Hope that helps

Cheers!

@boberfly
Copy link
Owner

Hi @kubo-von

This is partially supported, however it is a limitation of Cycles only having a few available constant values to use. I briefly mentioned them in the second post of this ticket: #6

The other one for colour tint is "Cs", so if you promote these primvars from a pointcloud to the instancer as an attribute with those exact names, they should come up but using I think the object_info shader node for color, and particle_info for the other ones.

I believe the Cycles devs have talked and prototyped a patch but I think it's not exact to what I would imagine to be a more robust solution, they work with the constraints of Blender most likely which only has a handful of needs for constant values per-instance without reverting to copies. You're free to commandeer the ones supplied by particle_info and work a solution from it. There's also the potential to figure out what dupli-verts is (I believe it's a vec2 offset into a UV atlas, which could potentially give you more constant values via that maybe with a ramp). Hope this helps for now.

@kubo-von
Copy link
Contributor Author

Hey @boberfly !
Using particle_info values works and it should give enough values to work with. Thanks for the tips !
Maybe if "Everything nodes" project continues well they will have to remove this limitation from cycles eventually.

@boberfly
Copy link
Owner

You might get a crash if you go crazy with edits in IPR mode and setting those attributes in particle_info, I think Cycles isn't too thread-friendly when modifying these (I could be wrong and it's perfectly fine now as I am making sure to set the mutex lock in the right spot).

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