Cave Troll painted using Perlin Noise Generator

Cave Troll using basic textures with Perlin Noise Generator.

This is the Model as it appears in Sketchup, it is not texture-mapped - instead I wrote a ruby script generate the splotchy hide, using a perlin noise generator to create the shading using offsets into very basic textures.

There are only 8 textured materials in this model, there are a few non-textured materials for minor detailing such as the eyes. I originally developed this ruby script for painting my Centaurs.

linearGradient
The gradient textures are not quite using linear interpolation, this is a Sine function which had a better final result.

Each texture image is between 1 and 4 colours, with linear gradient used to blend the 4 points smoothly together. Colour gradients in the vertical direction (in the material) are used to blend between different materials. Colour gradients in the horizontal direction are used for patterning via a Perlin Noise generator.
The Perlin noise generator creates ‘noise’ based on the positions of each face vertex.

In the Troll model, I have used a horizontal gradient for shading between light and dark areas of noise, and a vertical gradient for areas of lighter and darker skin. The lighter and darker skin also has its own horizontal gradient for noise.

The ruby script determines the colour to paint each face based on the component name, and then determines the material texture y-coordinate based on the distance to the next components with the required name. This is a distance determination from the current point to every edge of the adjacent component, which can take a while, but the edges are determined and stored first, which helps with execution times.

The x-coordinate is generated by a perlin noise generator, which was code converted from C# into Ruby.

The linear gradient images are created externally to Sketchup, a bit of C# was involved (OK, quite a lot, I created a nice user interface for it, as I had planned to upgrade all my Centaurs eventually). In the attached screen-shot of my application, you can see how I display the gradients for human skin, to horse hide (two colours) and then back to a single colour for the hair. Droplists are for quickly selecting skin tone, horse hide and hair colours.
For the ‘texture’ image creation, the HSV colour picker took the longest time to write, as I wanted something easier to use than the Sketchup HSV colour wheel, and I hate having to enter in RGB codes (Which is how the application started out).

application
I’ve added a four pixel wide border around each gradient texture, because Sketchup will wrap the texture, not ‘clamp’, when you zoom out on the image, so adding the border improves the appearance.

Another technology used in the Troll is the chain-mail ‘loin-cloth’ which was created using a separate ruby script.

I hope you like the model!

Download the model

8 Likes

Very nice! About 20-25 years ago I wrote an implementation of Perlin solid textures for a ray tracer I had created. Perlin’s concept for solid texture (based on his noise idea) as a way to determine how a surface would appear is elegantly simple, I loved experimenting with it. In my ray tracer I applied it for surface coloration and for surface normals (to get the effect of procedural bump-mapping).