Supershapes

Average Rating:  
X Rating Failed

Material Function library that uses the 'Superformula' to draw interesting shapes.

  • Supported Target Platforms
  • Supported Engine Versions
    4.20

Description


Johan Gielis came up with the 'Superformula' which is an extension of the circle formula (x^2 +y^2 = r^2) to represent many complex shapes and curves that are found in nature. I've converted this formula to run in a material shader and provide examples on how to use it with the linked sample project.


https://github.com/ryangadz/Supershapes_Samples


It can be used for so many things and is fun to use. If you're a programmer without an artist or external software, the supplied material functions can help you quickly create buttons or logos. If you're a artist it can be a great tool to make your textures and materials come to life, as everything can be dynamic at runtime.

Technical Details


Components:

  • SuperShapeMesh (experimental) - builds a mesh cutout using the same settings as the material to avoid the need for opacity channel.


Material Functions:

  •  DrawCircleSquare - draws a circle, a square, or anything in-between.
  •  DrawPolygon - draws a polygon with n-sides.
  •  RotateUVPoint - takes a UV coord and rotates it around a point. (useful for wheel bolts)
  • Supershapes - the full formula with every parameter draws line thickness, blur, and fill


Platform Performance: it can get a little heavy on the complexity, but you could also bake out the materials to textures if they don't need to be dynamic.


Documentation and Example Project: https://github.com/ryangadz/Supershapes_Samples

Live Support or Questions: https://discordapp.com/invite/w7xMBTc

Comments

!

Previous Next
  • Edit
  • Preview
  • Help
Enter
Login to comment
X Report this Comment
Report
X Attention


close
X Edit this Comment
  • Edit
  • Preview
  • Help
Update
X Remove this Comment

Are you sure you want to remove this comment?

Remove
X Attention