Getting point data from instanced geo - possible?

Hey all,

Quick question, is it possible to get the vert/ point coordinates from instanced geo after all instance xforms have been applied?

I’m doing this via transforms and sops right now, it works fine with small numbers but I was hoping for a a solution that could scale much further with out a big fps hit

Any thoughts?

Thanks!
Lucas

As far as I know, it is not. I think that what makes instancing efficient is that it doesn’t have to make accommodations for having that data leave the GPU, it just has to occur within that area.
That said, there is a ton of work that you can do with CHOPs related to that sort of thing when you’re preparing your instancing data. Check out the Transform CHOP. I also often end up doing things like having a series of SOPs, which then dump point positions to a CHOP, then doing more complex stuff with the CHOP and using it for instancing. It allows you to get some of the benefits of working with geometry, while still being able do do simpler work with CHOPs, and avoids having to use a Copy SOP to copy some complex shape to a bunch of points.

Tetkin,

Thanks for the reply!
I was afraid that was the case, the chop stuff sounds wonderful but I don’t think it can work in my case (but hopefully I’m wrong?) Let me throw out a little more detail on my situation:

I have a single SOP, whose point location and order represents relative coordinates for an led panel.

I then branch that out to several sop transform nodes to “place” or map the panel SOP’s, then merge that back together. That works fine now but as I add panels it will bog down I imagine and I wanted to find a more procedural approach for managing the translates / rotates/ and scales of all the panels. (as they will be animated )

  • Geo instancing works beautifully in the sense that it does exactly that, I can feed it a chop full of translates, rotates, and scales and it updates with the length of the chop etc. (except I can’t get that point data back)

I want to do something similar with SOP’s because doing the transformation there takes care of all the hellish matrix mathematics and lets me get world space coordinates for each vert/point from the merged sop quite easily.

[url]http://www.enviral-design.com/blog/wp-content/uploads/2015/02/sopCopy_Capture.jpg[/url]

Above, I’ve managed to do what I need with position, using the points of another sop as coordinates for a Copy SOP.

My problem with that is how do I set rotations, and perhaps scales too? So far I haven’t found a way to influence the rotation of the copied sops with direct per copy control.

Found a pretty good work around! - I really underestimated chops…

Went down the chop path as you suggested, I just didn’t realize just how straight forward wiring that with chops was when you break down a complicated expression like matrix math into step by step chunks.

Since my source SOP was centered around 0,0 to start, I applied my rotation matrix first (which is less steps than if it’s off center), then added translate matrix (just random offsets for visualizing) after that, then converted it all back to SOP to preview.

Even with 300 “instances” of 100 samples each (30,000 samples!) the network still sailed happily along at 60 fps.

Incredible.

With a bit more work scale matrix could be added to the chop network as well, probably anywhere before translate.

Also : Noise chops were used to simulate movement, but I noticed that with higher counts it bogged down a bit there, using noise TOP and converting to CHOP quite a lot faster and achieved the same result (gpu ftw!)

It’s funny, you can toss data around like it’s nothing as long as you use the right nodes and workflows… I tried this first with an evaluate dat before I did the chop way, and 3-4 “instances” ate up a good 16 ms.
rotationTranslate_matrix_Chops.tox (4.16 KB)

1 Like

What if u turn off time slicing on your noise so it only renders noise once?