Ramp TOP into Circle SOP?

I am trying to apply gradient colors into the circle SOP (it is a triangle in my file) with the Ramp TOP. It is sort of working but it is not perfect if you can see my file. For example, if I increase Divisions in Circle SOP, the gradient color gets layered. Is there a better way to implement this? Should I convert the circle SOP into TOP? Thank you.

myShape_med2.toe (13.8 KB)

You are applying color tot he point attributes, so the colors are interpolated across the points/faces and you will see those artifact with a low poly geometry. If you apply the ramp as a texture, it will be applied smooth as the texture is.

Thank you @ben Do you mean by using the texture3 SOP like my image below? If so, can you please let me know how to connect the select1 CHOP or the ramp1 TOP with the texture SOP? Sorry if I am completely misunderstood. Thank you.

You can use textures ie. TOPs or your Ramp TOP, directly by applying them to the Color Map parameter of the Constant MAT. You can then use the Texture SOP you just added to control the position and scale of the texture, so its good to leave there and experiment with.

Hey @uforange,

@ben’s recommendation is the most practical one: use the Ramp TOP in radial mode as the Color Map for your geometry.

Just for completeness though, let’s say you really need every point of your circle to receive it’s own color and interpolate between them. One way to achieve this would be using a separate Circle SOP with the Arc Type parameter set to “Sliced Arc”.

This will add an additional point in the center of the circle which you can assign a color to as well.
The additional Circle SOP needs to be followed up with a Facet SOP with the Parameter Consolidate set to “Consolidate Points Fast” for the reason that the Sliced Arc Circle Type creates an additional point where the circle comes back together (it’s essentially an open arc type and the consolidation of points merges them where possible).
The color that needs to be assigned is the average of your ramp because in the center, all colors of the circle blend together.
The point in the center will be the first point so the additional color needs to be prepended to the CHOP you are fetching the colors from.

To do this, first add a Analyze CHOP after the Switch CHOP and then use a Join SOP to prepend the average color to the colors of the ramp.

This Circle SOP needs to be separate from the Circle SOP you are using to render the outline but you can reference the Divisions parameters of both SOPs with each other through expressions or Binding.
Similarly to be ultra correct, the horizontal resolution of your Ramp TOP should be the same as the number of divisions of your circle.

But as I said - Ben’s solution is the much more practical and performant one :slight_smile:


1 Like

Now I figured out how it works. Thank you @ben

Thank you @snaut I will try this out too!