Can I use pack and instancing in this scenario?

   1120   2   1
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
Hello,
I'm building a digital asset where the user controls and modifies a bar graph, that can have up to 100k bars (the reference image is showing just a basic example).
Each bar is built upon a point whose f@value attribute drives the height of the bar.
The system is already pretty responsive, with almost zero lag, but in order to squeeze even more performance and efficiency, I was wondering if I somehow can pack and instance the bars of the graph?
1) As far as I understand, I cannot use the pscale attribute to scale a primitive only in one dimension, right?
2) So I was wondering if I can pack and instance each bar as full-length primitive and then using some coloring or texturing trick to simulate different heights? Do you have any idea how to accomplish this?


Thanks for any help

Attachments:
simple_graph_example.JPG (59.1 KB)

User Avatar
Member
47 posts
Joined: April 2016
Offline
Hello,
you can use v@scale for non-uniform scale instances. And yes, you can pack your bar and it should work. In a copy to point SOP there is check box Pack and Instance, in case if you haven't known it yet.
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
thanks a lot!
  • Quick Links