Hi Guys,
There was (and is) a great interest about how to work with volumetric LEDs in Montréal and Tommy (RayTk) and Pete did a great job of showcasing raytk and their beautifully made DYI “dragons”.
I’m also developing my home brew version of working with those using different techniques and looking forward learning ray_tk, btw. (after failing to contact LedPulse btw, but that’s another story
)
But one of the thing I was looking into, is the filling the hollow volumes coming from animation packages in alembic or FBX formats (FBX can import as POPs). I experimented with a lot of ‘native’ implementations. Please open my .toe (that must hurt!), it’s extensively commented and I tried 3 techniques (without the obvious ones - like COPY with scale that can only work on some basic geometry).
Volumetric Sampling - 3D LED - POPs - 0.1.toe (209.4 KB)
(W11x64, TD 31553, 3080Ti)
I was especially looking into famous Ray Casting Technique (I knew from 2D world) which casts a ray from a tested point in random direction and counts the number of intersection. If the count is odd, the point is inside the volume, if even - it’s outside (black magic!). We can optimize further optimize it with quick test of bounding box, but it looks like the best chance to create a truly universal and high speed system. Because of wip documentation, I failed to setup a shader to do that with the new GLSL Pop pipeline. I feel like with pops we have better chances to accomplish this.
-
Is GLSL POP and GLSL Adv are the same thing? I need more inputs for GLSL Advanced to bring the data in POPs. Other answers might eliminate this need, but just trying to understand.
[Volumetric Sampling - 3D LED - POPs - 0.1.toe|attachment]
-
When right-click on a POP, there’s centroid, size and bounding box informations which seem to be already calculated. Is it available in any shape or form as python op attribute (as it was with SOPs) or in GLSL shader as a built-in uniform or information (via uTDInfo kind of mechanism as for GLSL Top) ? Can be quite handy. For now, I’m using Analyze to get min/max then passe it as 1 point attributes and extract it in GLSL Adv. Seems like double duty as it exists somewhere already.
-
The algorithme demands to cycle through all the primitives of the hollow geometry and I didn’t find the way to accomplish purely in GLSL as I cannot access some attributes of the primitives of another input available only as Globals indicated in documentation. I guess we can do it the old fashioned way with a lot of conversion and bring it to the shader via sampling. It’s a pitty though, as this data exists already in POPs. Is there a way to access it via GLSL? Like primitives vertices point indices, number of vertices (to test if it’s a triangle or quad)…
I’m also putting a small video of manufacturer they sent: they are using TouchDesigner for geometry playback and then intro Madrix to do just that: feeling hollow spaces.
If some wizards can point in the right direction (Vincent, comment ça va?). I feel like raytk and T3D from Tommy and Josef would be great for most of the stuff, but sometimes it must be art-directed and modeled or even captured (for interaction)…
Thanks!
Salut Shandor, ça va bien merci 
Cool toe, you got pretty close, the Ray POP can output the number of collisions, so you can do a modulo of that to know if it’s even or odd and know if a point is inside or outside
Added a few POPs to your toe
Volumetric Sampling - 3D LED - POPs - 0.1.21.toe (198.8 KB)
Fred came up with it first hehe POP Ray Observation : Color Sample
Otherwise was actually talking to Pete about that, as you found out indeed the sprinkle POP volume is using some of that logic (but doing a closest distance to sample attribute instead of a ray direction) and it would make to be able to specify sample points.
That being said, currently the Ray POP is not very well optimized, so the 3d texture route (voxelizing geo/turning into an SDF with jumpflooding and sampling that) might currently be faster.
Since there is a lot of interest for that, maybe an easy to use volume sample POP or something like that that could use different techniques under the hood would make sense.
We’re also planning to bring some optimizations to the Ray POP, there has been a lot of research on accelerating raytracing done.
Otherwise regarding your specific questions
- GLSL Advanced POP allows working with point, prims and vert attributes at the same time, and allows access to the primitives, (GLSL POP only allows working with one class of attributes/elements) so that would be the one to use in your case. There’s no reason it’s limited to 3 inputs currently so will update it to multi input. it’s currently a bit behind otherwise on some features compared to the GLSL POP, we’re still deciding what goes where in term of GLSL access
Some doc here Notion – The all-in-one workspace for your notes, tasks, wikis, and databases. and sample toe here
GlslAdvanced.toe (5.4 KB)
-
see 1. and sample toe I think that answers it
-
there is a .computeBounds python member, see Notion – The all-in-one workspace for your notes, tasks, wikis, and databases. python section, though for use in the GLSL POPs you can also bring them as other inputs from the analyze POP - which will be faster/no latency since you won’t be downloading the data from the GPU to send it back but it will stay there.
I agree it would be convenient to have access to them as uniforms in the shader, I’ll add that as an RFE.
I hope that answers everything, stay tuned for more exciting features coming to POPs!
Salut Vincent!
Merci beaucoup for taking your time and look through my efforts to find solutions of problems we didn’t know we had! Paraphrasing the Spiderman quote: with great technologies, come great headaches!
Thanks for the deep dive into Ray POP. I intuited as much about some work under the hood, but still getting used to the attributes workflow. That’s where it shines!
Also, unless I’m mistaking, the undocumented feature (it’s a small thing) that in the Math you can put the digit directly into all the A…B thingy. I thought I needed to create a new attribute with a value before to work with that workflow and I actually did what you did, but for some reason I couldn’t figure out the group thing. I know, stupid me.
Yeah, we talked with Pete too (you have the privilege of proximity) and the Sprinkle POP was the first one I tried.
Not sure about 3d texture route and jumpflooding. Need to research it. Any routes?
And thank you for pointing out GLSL examples and docs. Will dive into it right away.
Best
sH
You’re welcome, good to see you here!
oh yeah, it might be hiding in some of the examples, can’t remember, unfortunately still a lot of moving things to start ironing documentation though that will come
if you create an attribute on the New page, and delete it on the delete page, it acts as a uniform (no memory allocated), it’s true it’s a few more clicks but you can animate those - also something a bit hidden, we’ll make it more explicit
Oh I haven’t tried T3D myself but remembered seeing this Josef Pelz on Instagram: "WIP: FBX to T3D with 60fps real-time in @TouchDesigner. Get the T3D Toolkit on my Patreon to work with 3D Textures like never before!" so I’m assuming there’s an OP to convert a mesh to 3d texture
In POPs you can then use the Lookup Tex POP to sample it
Thinking more about it Ray TK is only about procedural shapes, so yeah not quite relevant here (except the concept of sampling the generated shape in space)
Otherwise I think turning a mesh into a SDF with JFA is used in that setup TouchDesigner_Shared/Starters/boids at master · DBraun/TouchDesigner_Shared · GitHub
Otherwise I will have to dig up some old files of mine, or it might eventually show up in POPs hehe
You’re a gem, Vincent! Thank you so much.
I was always watching, the problem is the lack of time (as I’m sure you know, especially now, I’ve heard about your parenthood. Congrats!). *
Good tips about attributes and maths, it’s definetly burried under a lot of information and examples. I complained about the docs to the poor overworked Markus 
About T3D, funny thing is that I spoke to Josef because he did the latest version of LedPulse patch, and I have T3D, but I didn’t asked about that whole thing. Need a month to get into T3D and RayTK, I hear it’s addictive.
Thanks for the infos. It’s definetely not deep seeded desire to do the modeling elsewhere and playing back in here, but in commercial work it is almost mandatory. Brands want their assets. It’s a good tool in the palette. To create a full show only with abstract shapes is fun, don’t get me wrong, but not in 100% of cases.
I will post my progress and research here.
Cheers!
Thank you! I do know hehe.
And stay tuned for a smooth/easy/fast workflow with POPs!
1 Like
T3D has a Sop to texture3dField component that does the trick together with RayTK volumetric sampling gives this result: Winfred Nak on Instagram: "Solid volumetric rendering thanks to @josefpelz #t3d and @t3kt Tommy Etkin #raytk in Galaxy3D-V3 #touchdesigner #workhardplayharder #keeponlearning #archilicht" the geometry is completely filled. It only lacks 3D textures in order to color the geometry. Would be great to move this to POP’s
1 Like
Ray POP is pretty heavy on my Mac M1 with even not that many points 10x10x60
During startup I always get this message
But it will open the alpha version
When trying to open examples Neighbor container it crashes
Hi Winfred,
I don’t know about Macs, on our 4090 POP Ray is turning decently well with 12 modules of 10x10x61.
Cheers
sh
1 Like
Hi Winfred, it’s still on our list to optimize the Ray POP, and simplify workflows involving volumes, hopefully we’ll get to it soon!
1 Like
it’s kind of next big thing and slowly popping up everywhere 