Hi Pop Family.
I want share a scene that i recently done but it was missing some features so i share to the group some problems i have seen.
It’s a scene for create voxel with the POP Ray, as you can see on my instagram post :
I was amazed when I realized that POP Ray can sample the color of the points, so I tried to use a texture or gradient with it but it created some artefacts. like on this marvellous duck. Maybe it’s a POP Ray that have a strange behavior when sampling gradient or do you have an idea ??
Can we create point + vertex in POPcreate ? i had to use point gen intead to be calculate by the POP Ray.
A Value of 1 uint in the Geo Instance parameter create 0 , i had to convert it to float. Is it a bug or i don t understand what is a ‘uint’ ?
Hello @anodin
Thank you for taking the time to report this.
It looks like there’s a bug with attribute interpolation in the Ray POP shader. We will look into this.
You can add vertices by creating primitives with the Create POP. With Add Points enabled, you can create Points primitives in the Primitives section or you can simply select Turn Into Point Primitives for the Unused Points parameter in the Post section.
unit means unsigned integer. The GEO comp expects a floating point attribute for the scaling and the Inside attribute values are interpreted as so. The resulting scaling is zero. There should be an error or a warning when an integer attribute is used.
Thank you Guillaume for all this explanation.
What is the best practice to change from unit to float ?
It was the POP Ray Collision attributes that create unit, so i change it by create a new float attribute then multiply unit and float with POP Math Mix.
With POP Math i can’t override the attribute type with >>
POP Math Series let me do it but we need to change name to remove the warning.
Another question.
How can i reorder attributes ?
Like Color = Color(0),Color(1),Color(2),Color(3) become Color = Color(1),Color(1),Color(3),Color(0)
All the POPs processing attributes can cast a type to another type, using the >> and override as you pointed out, not sure why you’re not able to override in Math POP?
Also similarly they can all shuffle attributes components, you can write
Color(0) Color(1) Color(2) Color(3) in input scope (or just Color in that case since you’re using all the components in order, it gets expanded)
and Color(1) Color(1) Color(3) Color(0) in output scope, and leave parameters the default so values aren’t changed but only copied over.
Also it’s UInt, probably the autocorrect acting up, meaning Unsigned Integer - one has to be careful substracting with UInt, values are going to wrap to really big numbers since they can’t be negative. The only advantage over Int is it can hold a bigger number up to 4 294 967 295 - Int is half of the range for positive values and half for negative values.
Maybe we should allow users to choose the attribute type in general, since Ints/UInt are a little less well supported currently and can lead to rounding error (some POPs convert to float internally and back)
I’m adding another sample for converting UInt to float attribute with a single Math Mix. MathMixUintToFloat.toe (3.7 KB)
In this example, the UInt attribute is renamed, a new float attribute is added, a combine operation copies the UInt values to the float attribute and finally the UInt renamed attribute is deleted.
I’ve also hit some strange (or at least non-intuitive) casting issues, even after taking some time to try to figure them out. It might be overkill, but for the situations where these sorts of casting operations really matter, perhaps some sort of Cast POP with some helpful functions would make sense? Or maybe a submenu in the the Function POP, where certain operations are explicitly typed for In and Out.
Ok i undertood, it was just because i didn’t rename the attribute, so it stay grey… after the >>
Thank you Vincent for the explanation of Uint vs Int with number it made it more clear !
But for the reorder, it is not working like i I thought.
Normally if we write in Output Attributes Scope : Color(0) Color(0) Color(0) Color(0)
It must result of gray colors ?
Oops not enough coffee this morning, it works the other way around!
So gray scale would be Color(0) in input scope and Color in outputscope, which would be the same as Color(0) Color(0) Color(0) Color(0) in inputscope and Color(0) Color(1) Color(2) Color(3) in outputscope which is more verbose
It flows from top to bottom, each component in the input scope is pushed to one component in output scope, going through the operations (for math POP) in between, it’s not the output scope pulling
not sure if there is a toe in the alpha release package to explain all the attribute routing, if not there def should be one, going to take a look!
Also on a side note the Ray POP color sampling has been fixed in 2023.31533. there were also some changes to Field POP parameters (size for sphere is now radius amongst other things) if your tox looks strange at first.
Another note regarding your setup, instead of scaling the instances to 0 you could also delete all the points with delete POP by attribute inside == 0, which is more efficient since a lot less instances have to be rendered.
The limiting factor is the ray POP though, which is not greatly optimized yet.
Swapping components of an attribute is shown in the /math component in Overview.toe. Have a look.
Dealing with attributes created as int (signed integer) and uint (unsigned integer) is quite the hassle in POPs now as some POPs expect floats (like scaling) and passing it 0 or 1 as unsigned doesn’t work.
We need to do something about this… convert on-the-spot, warning … etc, so you don’t have to think about things and add converting tricks. And no wraparound to huge numbers.