How to control primitive position with glslPOP

Hi everyone,

i would like to work with primitives and POP. I have a system in glsl based on this : https://www.youtube.com/watch?v=hs68G8vpWtA

that i use here to simulate per primitive collision with flex :

https://www.patreon.com/posts/complex-physics-117383646

Is not clear to me how to address the center of each primitive but also each vertex like in the for loop of the geometry shader.
The trick here for what i have understood is that the pritive center is interpolated by default in the vertex shader so each vertex knows his center.
I do not understand how to create the same situation in POP.

I am planning a voronoi fracture system like blast from nvdia, of course not so advanced but we do have all the piecese of the puzzle here.

Can someone share a snippets or point me to the right information so to deal with primitives and glslPOP ?

The main goal is to have each primivite move by his own like in the two example i shared.

Thanks for your time and attention!!

I can’t see your locked file on your patreon but I threw this together from the peter sistrom examples in the overview.toe. It uses glsl advanced. I’m not sure these functions are offered in the regular glsl pop.

You can check out the notion site for other functions you may need

I shared accessing and writing to primitives in the regular glsl but I don’t actually know how to get that back out to the point attributes so that it would actually manipulate the points.
MANIPULATEPRIMS.toe (5.6 KB)

Ah sorry is anyway free…i do not charge for my patreon!! Sharingis caring!! you can just register. i ll drop it here as well! asap thanks for your time!!

I open the file and 2 of the shader have a warning, “This pop is WIP …”.
TD version 2020.32120 , amd cpu , 4090 Nvdia

yeah i think that’s default message from derivative. basically saying the format of the operator could change so dont expect code to be nontrivially compatible as versions change

Hello,

We’re currently working on changes on the GLSL POPs, feel free to experiment with them but the built-in functions (attribute access etc) will need to be updated for the next release.

We’re aiming to have a pretty stable API then (the WIP messages will be gone, though we’ll still aim to continue improving them.)

Best,
Vincent

dear ALL,

thanks for getting the time to reply. i got what i wanted!! here the file! Now i would like to get some how the edges where i break the geometry so to somehow emit the primitive that are missing like holeSOP i can also just put a grid there and omit the prim i do not need. anyway for now i am kind of happy with this result
MANIPULATEPRIMS.16.toe (11.4 KB)

Hi,
with the example from @davispolito i menage to create a very playful system.
here the link (link is from my private weTransfer no password) : Unique Download Link | WeTransfer .

In there geometry and texture are in locked op, this why is a bit heavy to post directly here.

In the file we treat primitive as particles using flex. The velocity patch is in TOP inside the solver.
A “point weight” from the palette is used as matte “bias” to choose what part of the geometry to affect .
This is marked with a note as “Effector”.
I try to do this with fields but the behavior in top (nearest pixel) is more what i need in here.
Can we please have a new version of the point weights COMP with the same functionality of the fieldPOP ?

What are the thoughts for visualize those field? i find them VERY powerful for interaction! But not very “plug and play”.

Reviewing the workflow i am really happy with the new family. I find the whole glsl part a bit confusing with the name… maybe adding a big comment with the principal stuff will be handy (like in the lister) so after a while you get used to it since you see it all the time :slight_smile: “Repetitio iuvant”

Thanks so far!!
Best,
Simo

tried to open it up and the locked transform didn’t have any data in it

Oh ok! looks like POPs a can not be saved in the project. Make sense being the gpu memory :slight_smile: . I am used with SOP to lock them so i do not need to think about where the file are. anyway here the link the 3d object. i put the original usd and the obj i used in the toe : Unique Download Link | WeTransfer.

hope now you can enjoy the result @davispolito !!!

Hey @Unveil_studio , weird coincidence, I had the same thought to convert Denis’ primitives tutorial to POPs, since it seemed so fitting. I too struggled to find the center of the Primitives, which brought me here.

Although, I’m having trouble converting this very, very cryptic old glsl syntax into the newer more readable version. Any chance you have updated this file?

Thanks,

EDIT:
managed to get the syntax updated, although not acting as properly

MANIPULATEPRIMS_NewAlpha.toe (11.5 KB)

Hi @electro666,

Not at my pc now but, to get the primitive center you can promote P from point to primitive. I usually make a copy of P and promote it. To make a copy of P , take mathMix , do (A) and give another name to P.

You can actually move the primitives just with nodes but is not very intuitive…

Be sure you have unique point per primitive :slight_smile:

You should NOT share POINT, in the set of vertices, building your prim… so you can move them freely.

I will post here an example file later today!
Best,
Simo

1 Like

Thanks for the advice @Unveil_studio. I had a feeling this was possible without the glsl pop, I will work on it.

Hello,

Indeed it’s possible to do without GLSL now using the map feature of the tranform POP and attribute convert for pivot, see attached

PerPrimTransformWithMap.1.toe (4.4 KB)

Otherwise the there is a simple up to date GLSL example in the GLSLPOPs_Update.toe (PerPrimTransform container) file in the examples package.

We’re keeping in mind to add a dedicated POP to simplify the process.

Otherwise fun setup @Unveil_studio, haven’t played with the bullet solver in a while but fun to do collisions with low res proxy and drive hi res geo with it.

2 Likes

many thanks @vincentDev

Yes I saw these GLSL_Update example talked about in another post, seems to make sense at that scale. Although, i’m having trouble putting it all together.

Something like D Brito’s Extrude example in POPsGuide, where the extruded-primitives move from destination A to destination B.

The closest example I found with a similar workflow was again D Brito’s GLSL_Advanced example with the weighted bunny, I rewrote the compute shader to move the bunny from position-a to position-b if it was weighted, although results not what I expected, the entire geometry is just moved, even though I thought I was working per-primitive in the shader.

I am obviously doing something wrong, I think it has to do something about which attributes need to be point, prim, or vertex.

MovePrimByPrim_NewAlpha.toe (14.5 KB)