Version 1.0, Updated August 2023 using Octane 2021.1.1 R6 for Cinema 4D 2023.2.1
About This Guide
Procedurally generated textures are a great way to get customizable materials that look good at any size or scale while taking up very little VRAM. Octane has a number of nodes to do this, and this guide will showcase them all and give a quick overview of how to use the more complex ones.
This is the Cinema 4D file that contains the 100 materials used to generate all the illustrations in this guide.
This is the ORBX export that should work in any implementation of Octane (tested in Octane Standalone 2022).
This guide is also available in PDF format here.
Part I: Where to Find Stuff
Octane has a number of procedural shaders for creating patterned textures. The ones we’ll be looking at in this guide are mostly colored green in the Cinema 4D plugin, which means they’re procedurally generated.
There are a few top-level ones (directly in the node list in node view, or right under the c4doctane menu if using the Material Manager) like Checks, Sine Wave, Marble, Ridged Fractal and Turbulence.
Most of the patterns we’re going to explore are located in the Custom Pattern node group which is a collection of OSL scripts implemented into native nodes to make them easier to work with. If we click the Custom Pattern entry on the left hand side (also green, but further down the list), there’s a flyout with all the various Types. Each type is its own unique shader, and any of these can be changed to any of the others in the Type dropdown.
Under Custom Pattern, there’s a Type called Procedural Effects - this has another 20 or so shaders that we’ll also show off in the next section.
The Gradient Generator is the only non-green node we’ll be covering. This medium blue node located in the Custom Texture category.
There are the OSL scripts in blue OSL nodes toward the bottom. This is kind of a playground at the moment, and great for those who want to dig more into the code. Many of these have been implemented into the green Custom Pattern nodes, but there are a few that we’re not going to cover that are still aren’t full implemented, but may be of interest.
Octane can also make use of Cinema 4D’s built-in shaders, but they need the extra step of being baked down into bitmap textures which means more work when trying to get a look right or reuse the textures. It also consumes more VRAM than procedural textures. Typically it’s best to avoid these if there’s an Octane-native alternative.
Part II: Octane Procedural Shaders
Checks (top-level node) just creates an alternating checkerboard pattern that can be stretched or rotated using a Transform node, or colorized by being run through an Octane Gradient. Prior to the Stripes node, stretching this texture on X was a great way to get regularly spaced stripes, but rotation and alignment became an issue, and it was difficult to get pinstripes or both horizontal and vertical ones. At this point, we’d just Stripes instead.
Stripes is a Custom Pattern type about halfway down the list. This generates horizontal (U) and vertical stripes (V), both of which are on by default. To only use one direction of stripes, we just need to make the Thickness of the unwanted direction 0. Some interesting patterns can be made by varying the thicknesses, blurring, and rotating via a Transform node, as well as running gradients into any of the color inputs.
Moire Mosiac is also a Custom Pattern type, and creates a controllable black and white offset pattern of circles, rectangles (squares really), rings, or frames. This is the best way to get a polka dot pattern. Every mode has a set of controls, but only some controls affect some modes.
Rectangle mode uses the Size and Shift parameters for the tile size and how much every other row is offset.
Circles mode uses Size and Shift, but also allows for blurring, which is useful for bump maps.
Rings mode uses Size, but not Shift - instead it uses Ring Spacing.x and Ring Spacing.y, which operate in kind of a strange way - best to just slide them around to see what they do. The blur slider controls the ring thickness and blur to some extent. The Time slider allows for a sinewave type animation where the tiles get larger and smaller by about 50% or so.
Frames mode is the ring equivalent of rectangles. Corner Radius works in this mode, as does Iterations (which reduces the number of tiles). This mode does not work well with Cinema 4D’s Material Tag tiling, so we’ll want to do all the transformation in the material using a Transform node instead.
Tile Patterns is also under Custom Pattern. This node has six modes which all share common controls, though the implementation is different in each. The controls are Tile Color 1, Tile Color 2, Line Color and Line Width. Line color and width are self explanatory, but how each pattern handles tile colors are different.
Voronoi only uses Tile Color 1, and there’s no seed or cell size/variation/randomization - it’s pretty limited, and there are better ways to get Voronoi patterns using Noise4D or Octane Noise.
Fancy Tiles and Scales use the colors in specific locations - in Fancy Tiles, color 1 is for the main tiles, and color 2 is for the accent squares. In Scales, the rows alternate between color 1 and color 2.
Hexagons produces three colors in its pattern - color 1, color 2, and a third which is a 50/50 mix of colors 1+2.
Triangles and Bricks also use a blend between color 1 and color 2, but more variations that are seemingly randomly distributed (though there’s no concept of random seed, so it’s a set pattern).
The best way to handle colorizing Tile Patterns is to set color 1 to black, color 2 to white, and then use an Octane Gradient after the node to assign colors based on the grays the Tile Patterns node generates. This works particularly well for Triangles and Bricks, but Hexagons will still only generate 3 grays (which means mapping to only 3 colors in the gradient), Scales and Fancy Tiles only have two, and Voronoi still only has one.
Some of the built-in patterns are meant for surface channels (Bump/Normal/Displacement) in addition to, or instead of Albedo. Flakes and Color Squares both use Normal Map coloring so that they work properly when fed into the Normal channel. Scratches, Hagelslag, Rain Bump, Chainmail and many of the other black and white patterns are good for Bump or Displacement.
Since procedural patterns are always generated at 32-bit, there’s no issue with crunchiness in displacement or normal maps, which is pretty great.
Gradients can be difficult to understand in the 3D world mainly because of color spaces and how the eye perceives values. Without going too much into science and color theory, some gradients look like smoother transitions to us, and some are more mathematically correct.
There are four different nodes that come up when we search for “gradient” in the node editor. The magenta Octane Gradient is a remapping tool which we’ll cover a little more in part III. It’s meant to recolor other nodes or crush levels, but not to create visible gradient texture data. We can safely ignore the dark blue gradient.osl node unless we’re coders and want to muck with the OSL behind it. The burgundy Gradient is C4D’s native gradient shader - this doesn’t work super well, and needs to be baked to play nicely with texture tags.
The medium blue Gradient Generator (found in Custom Textures) and the green Sine Wave nodes are our clear winners for building materials. Gradient Generator has a gamma input (set to 2.2) which produces - to our eyes and monitors - a very even, smooth transition of grays between black and white. The Sine Wave node set to Saw Wave, on the other hand, shows what happens when the gradient is perfectly mathematically linear. It works much better for linear bump and displacement channel ramps, but when we’re building a visual gradient, it looks like it’s just a sliver of darks on the left, a ton of similar medium gray in the middle and a sliver of light grays on the right. If we’re after a nice gradient for our Albedo channel, we should probably stick with the Gradient Generator and keep the gamma at 2.2 (it actually can be set to 1 to produce a linear gradient as well).
Fractal patterns are always pretty interesting and can be used to overlay noise or otherwise break up textures. Octane comes with several different ones that have various parameters to play with. Noises are essentially fractal patterns as well, and can make for some interesting effects. Cell Noise (shown above) makes random squares that can be recolored, but all of C4D’s native noises are available as well in the Noise4D node.
If it’s one thing us 3D nerds love, it’s space. There are several shaders meant to be used for planetary surfaces and starfields. Some of these have a time parameter which allow the textures themselves to animate.
If it’s another thing us 3D nerds love, it’s apparently 60s drug culture? There are several built-in trippy textures for all those head shop signs, kaftans, and acid jazz posters we need to make.
And then there are the very specific use case textures. If we ever need a portal, a candle flame, or an animated fireball, this is where we’d look.
Iridescent is particularly interesting because it’s camera-angle/geometry curvature-dependent and sort of simulates a Thin Film shader. The Digits shader can be customized pretty nicely with colors, which number it’s displaying and how many decimal points there are, and it can be animated to make an alarm, stopwatch, or doomsday clock. Skinner would probably be great if we’re remaking Doom. Fan Spiral seems interesting at first glance, but Gradient Generator does the same thing with more control.
Part III: Octane Gradient and Chaos Nodes
As mentioned before, recoloring and controlling the color distribution is what the Octane Gradient is mainly used for. The Octane Gradient has no Transform or Projection inputs, making it a bad choice for generating a visual texture - for best results, we want to start with a Gradient Generator to make gray values in various patterns, and then colorize them using the Octane Gradient.
Simply running a texture into this node allows us to map whatever colors the texture is using to new ones depending on the placement of our gradient knots. If we want more of one color, or a broader blend of two colors, we can space the knots further away. If we’d rather have it be mostly one color, we can scrunch the knots together and move them until the second or third colors appear in a specific spot.
Gradient knots have what’s known as an interpolation value. This controls how sharp the transition is from one knot to another (and therefore how many intermediate colors will appear in our final texture). C4D has its own per-knot interpolation, but Octane doesn’t respect this. In order to change the interpolation in Octane, we need to use the Interpolation dropdown in the shader, and that will affect all knots. Linear interpolation is a smooth blend. Constant is a sharp falloff like C4D’s Step interpolation.
The node itself is linear, so running a linear texture through like the Sine Wave or Gradient Generator set to Gamma=1 will make it easy to control the colors. Gamma set to 2.2 means we’ll have to fool around with the knots a bit more to get the look we’re after.
The Chaos node is a very interesting recent addition. This node will chaotically cut a texture up, scale it and twist it around, and then blend it back together to randomize it. Since it’s procedural, it’s perfect for applying to something like a grass or dirt pattern and then spread it out across a large plane without getting that weird repeating tiling effect that sometimes happens. It’s also great for just making interesting patterns. If the Coverage is set to zero, the pattern becomes more of a tiling effect rather than pure craziness.
Bonus: OSL Textures
Well, we said we were going to avoid OSL, but there are some that haven’t been implemented into Octane native nodes yet that are of some interest. Bleepy Blocks, MA Ripples and Pixelflow all produce interesting patterns that can be animated. MA Woodgrain and Quasi Crystal could have some specific applications. Sky and Light Vec are both dependent on the curvature of the geo but may be good for special effects.
These textures would likely need to be baked if any kind of transform or projection is needed.
OG35 Procedural Textures in Octane Render, version 1.0, Last modified August 2023.
This guide originally appeared on https://be.net/scottbenson and https://help.otoy.com/hc/en-us/articles/212549326-OctaneRender-for-CINEMA-4D-Cheatsheet
All rights reserved.
The written guide may be distributed freely and can be used for personal or professional training, but not modified or sold. The assets distributed within this guide are either generated specifically for this guide and released as cc0, or sourced from cc0 sites, so they may be used for any reason, personal or commercial.