No More Textures


#1

A number of shapes can be made without using relatively expensive textures. I thought it be useful to get a thread going showcasing various examples.



#2

didn’t make these two myself, but I also don’t remember where I found them so can’t credit the artist.


#3

The essential collection of 2D shape functions:
http://www.iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm

But “relatively inexpensive” is very… relative :smile: ALUs are cheaper than texture reads, that’s right, but usually you need more than 1 shape :wink: Procedural shapes’ upside is that they scale well. Always sharp, no compression artifacts. And they are much easier to animate. Filtering can be a problem though, for a big frequency/small area.

Distance field-based procedurals also have interesting properties when you lerp between them. Basically you blend distorted UV spaces, only then run the threshold function to finalize a shape. I tried it here:


#4

Hello, I understand what you are showing, but can you give us an example of when you would use this over another option.

In other words, would you use this in menu animations or some other 2d plane?


#5

Hexagon.

You can also use a custom node with step(x,y); instead of the if statement.


#6

one more example of material without textures


#7

Building off that. You can bevel the edge a gradient using the remap node.


#8

Here’s a few different ways to make squares.