2
$\begingroup$

I want to create alternative to Agama Materials polygon procedural shape in Blender. enter image description here

It should have any number of side and explode, and it should be able to explode. I tried a lot of technics, radial shape works, but I can't straighten sides of a figure, unfortunately. Thank you for your attention.

$\endgroup$
1
  • 1
    $\begingroup$ @MartyFouts I belive you didn't understand, I want it as a procedural texture $\endgroup$ Oct 15 '21 at 16:59
2
$\begingroup$

The maths in this answer is a combination of this answer, and this remark. Those examples demonstrate: a) how to make a polygon-shader, and b) how to make a stripe of constant thickness about a vector.

Here, the angle theta for any given shading point is given by a radial gradient, Ping-Ponged to divide it into spokes.

In this case, a spoke-stripe is made using sin(theta)*radius > a constant: half the stripe's thickness. The remaining bit of trig. in the tree increases the size of the polygon by just the right amount, so, when it's masked by stripes of a given thickness, the segments remain the same size, and it appears to explode. That section is coloured green.

enter image description here

The input parameters are:

  • Sides, the number of sides of the polygon
  • Size, the distance from the centre to a flat side of the polygon
  • Explode, the half-thickness of the stripe mask across the polygon: half the radial gap between the segments.

enter image description here

You could add some nodes to tweak the inputs before grouping the tree, to suit your purposes. Rotation could be done in the Mapping node. I'm not sure what your reference's 'Gradient' means.. if you need that, call back.

$\endgroup$
1
  • 1
    $\begingroup$ You are amazing, Thank you a lot $\endgroup$ Oct 16 '21 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.