Challenge #825 (12/04/19) Entries CLOSED

(Helge) #42

Thanks, always a pleasure. :slight_smile:

Actually, this is (and - from the day I started participating - has always been) true for me, as well.

1 Like

(Christophe Chaumet) #43

Amazing !
I am very new to Blender, can you share with us some tricks to create such image ?
Thank you

0 Likes

#44

It’s pretty complicated and not easy to explain for a beginner. However, I was considering showing some behind-the-scenes stuff anyway, so since you asked, here’s an overly verbose tutorial!

(Warning: Contains ~*math°~)

The goal is to use the node editor for the world/sky material in Cycles instead of 3D polygons. Usually this is just a solid color but you can also use background images or procedural materials.

To really understand this you need to know how the shaders work. A procedural texture such as the noise texture is actually a function that takes a 3D vector (x,y,z) as an input and outputs a color based on the input position.

With regular materials, the input to the shader is based on the 3D position of the surface at any given point. For the sky shader, it is based on the direction of the line facing away from the camera for any given pixel.

The input vector is normalized (length set to 1) which means it looks the same as if you had a sphere centered on the camera:

You can map this from a sphere to a plane with a bit of math. Here’s a diagram showing what I want to accomplish:
tutorial%202

For each direction, there is a corresponding point on a 2D plane projected from that point. It may look complicated, but the solution turns out to be really simple: Just take the X and Y coordinates and divide by the Z coordinate.


Now you have an infinitely repeating plane! You can do a lot of cool stuff with this. I used this technique to make the sky material for a previous weekend challenge entry, but this time I want to somehow make triangles.

The next part is a bit hard to explain, but basically I took a checkerboard pattern and overlaid it with a skewed version to get a diagonal pattern:

I sort of stumbled onto this solution but I realized that I could use a color ramp node to isolate black & white sections and get a repeating pattern of triangles (The dark and light areas become white and the middle brightness becomes black)

The last step is to transform this into equilateral triangles. If you add half of the Y coordinate to the X coordinate it will skew it to the side so the midpoints line up properly as Isosceles triangles. Multiplying the Y coordinate will scale the height up and down, and to get proper equilateral triangles you need to divide by the cosine of 30 degrees (texture inputs can be a bit confusing because it scales by the inverse value.)

From there it is a matter of using a bunch of color ramp nodes and overlaying different effects to get more interesting colors.


(If only I’d written all of this before the voting deadline. :wink: )

6 Likes

(Christophe Chaumet) #45

Thank you. It is exactly what I wanted.
Now, I will play with these concepts. (By the way, I love math)

0 Likes