RFE - Threshold POP, Expression POP, Recasting vec3's and proximity POP control

Some of these may already be on the roadmap but from my experiments this week…

Threshold POP

I went to delete points by a colour threshold and my immediate thought was to look for a threshold POP only to realize it wasn’t there. I then scouted around the POPs for a bit and eventually went for a delete POP and found that you can delete by a threshold. Not immediately obvious but got there in about 3 mins. A simple threshold POP would be pretty neat though I think, even though the delete has the functionality. Working with colours in POP’s is a little tedious at the moment.

Another example would be wanting to adjust the levels in your POPs colour. Maybe this isn’t a POP as such but a little palette component that takes a POP, converts it to a TOP and then outputs back out as a merged POP that lets you do TOP operations easily. If that were to be the case then it’d be great if the TOP to POP could merge attributes in like the CHOP to SOP does.
Edit: I’ve actually made a little component that does this workflow…I guess it’s not so bad this way…
Dropbox\XOPs\Richard\Tools\base_topedit_pop.tox

Expression POP

I’m really missing a VEX style attribute wrangle in POPs. It’s a big one but it’d be great if we could use expressions on POPs. I know it’s all GPU based and will be problematic in that sense but even if it just had some simple support like P(0) = Cd(0)/2 or something like that would be mega.

Attribute or Attribute Convert modification

Being able to cast down from vec4 to vec3 easily or vec2 to float etc would be cool. Perhaps I’m missing a key bit of info as to how to do this but nonetheless it stumped me for a bit.

I’ve taken some notes as to what prompted this need…

I had an optical flow controlling particles. I used an attribute combine to take the flow colours and apply them to a new attribute called flow. The particle system expects a vec3, not a vec4. My instinct was to type “Color(0) Color(1) Color(2)” into the attribute combine to downscale my vec4 to a vec3 and then re-cast that to the Flow attribute. This didn’t work.

After the above I now need to find a way to convert my vec4 Flow attribute to a vec3 - I instinctively reach for an attribute convert but that doesn’t do it. I look at the delete POP which also doesn’t seem to do it. Convert…nope… I end up creating an attribute called Flow3 and then use a math which does nothing except input Flow and output Flow3. The Math POP just gives a warning rather than an error but it does ignore the final component. This works and I get my vec3 but it’s pretty messy.

Proximity POP addition

  • I’m using the proximity POP with particles and only want to have a set number of particles affected by it. Using the delete POP to delete particles creates a bit of jitteryness as it just deletes them randomly. Notch has a “particle use amount” parameter where you can set only 10% of points to be affected by the proximity. I think this would be a neat feature to have. Maybe be able to affect only a group? That’d give the same flexibility and is more “touchdesignery”

Hello @Ennui
Thank you for the suggestions.

Expression POP

Do you have a use case in mind that can’t be done with the Math POPs?

Attribute or Attribute Convert modification

I’m adding a RFE task for converting attribute types with the Attribute Convert POP.

Proximity POP addition

Some upcoming features might be useful for what you are currently building. Proximity will be able to check neighbors in a seconds input. You could, for example, delete points randomly (new feature for Delete POP) and check the proximity with the remaining elements in the second input.

For the expression it’s more about ease of use than it is necessarily about extra features, it’s sometimes faster to just type in the formula you want rather than dig around in the POPs.

For example you could easily set a new attribute based on something like the following pseudocode:

isBright = 1 if input1.Color(0) > 0.5 or input1.Color(0) < 0.1 and input2.P(0) > 5 else 0

With the Math POPs being as complicated as they are I’d probably prefer to just type an expression rather than trying to go through each POP figuring out how to achieve that.

The above example is do-able with a math mix and this is how I approached it (forgive me if theres a much easier way) but the expression was much quicker to figure out.

Add a mathmix

  1. create four new constant attributes on the new page, set them to 0.1, 0.5, 5 and 1 (for the invert)
  2. go onto the combine page and do an A > B > C to get 0.5 > input1.Color(0) > 0.1 and set that to the isBright attribute
  3. Next we invert that with a A-B set to 1-isBright
  4. We can now do an A > B on our P(0) to give us that side of the conditional and set that to abovePlane attribute
  5. Now we can just multiply isBright and abovePlane together
  6. We now delete our attributes

That took me a good ten minutes to figure out (and I’m not even sure it works) but I did learn a couple of shortcomings from that. It’d be great to have a constant value as well as A B C so we don’t need to create extra attributes to compare to. Also I’m not sure if I could’ve used 1/x for the inverse rather than A-B (I’m not really the brightest mathematician)… if not then 1-A would be neat to have in operations.

Let me know if I’m going completely mad and if there’s a much easier way than this workflow.

Hi Richard,

Thanks for the suggestions, I thought I would chime in as well.
Yeah there’s always a tension between more generic and complex OP vs simple ones that do simple things - as things get built out more we’ll aim to have more dedicated POPs for simple things.

otherwise, the math mix can use constants directly

I also would like an expression POP, but right now it’s either Math Mix or GLSL
I would argue GLSL is pretty straightforward for expressions like purpose once you get used to it

otherwise vec4 to vec3, math POP is the intended way, to get rid of warning input should have 3 components see


but yeah not very discoverable (and override output type to cast to int)

EnnuiSamples.1.toe (4.0 KB)

1 Like

Another way to create your expression in your example with Math Mix and constants


MathMixConditionExample.toe (3.9 KB)

I think I was getting confused around constants as another error in the POP was making me think it was because of a constant I had typed in…that makes sense then…Sorry, it’s easy to get thrown off at the moment digging in.

Whilst we’re talking about the math mix. Another cool feature would be to be able to move the operations on the combine page up or down the order to re-order them.

When drag and dropping, a context menu should appear and give you the option to move the block.

Is this what you are looking for?

1 Like

That’s exactly what I meant! It’s a little hidden isn’t it. It might be more obvious for beginners and more consistent with the input OP dialog below if it was just a little up arrow next to the number…then again maybe they should be drag and drop!