March 18, 2017 - Comments Off on Mantra


Been investigating Mantra a bit more now. It's a very capable renderer. At first it was a bit daunting, but the flexibility of creating your own shaders using VOP's is amazing.

Here are two renders of car parts. Kit bashed from various models I've collected over the years. I did some UV'ing and modelling tweaks in Houdini. All the shaders are Principle core, and then expanded with some of my own creations.

Using my rounded edges shader as a base, I made a one that adds edge dents. Helps give the objects a worn look. You just calculate the edges once, then use that as a mask to drive the color, spec etc. It uses raycast below and above the surface an returns changes in angle it finds.

February 18, 2017 - Comments Off on Mantra Rounded Edges shader

Mantra Rounded Edges shader

Here's my latest attempt at shader writing in Mantra. Using a white paper from MentalImages, I took the same concept and applied my own recipe. The shader adds micro fillets or rounded edges without changing the geo. Unfortunately Mantra has no access to specific geometry once it's started. So you can't call primatives or edges etc. So in this case you need to use a brute force Raytrace approach.

In short, for every pixel sample or rayhit from the eye/camera. Mantra traces 6 or more rays above the below the surface. Perpendicular is the key. The hits are weighted by distance and averaged. Hit normals are also collected and averaged. Then the normals are bent using the resulting solution.

As with anything there is a catch. Small bevels are fine, large ones start to become a bit more flaky, as you are not adding geo, so the effect is limiting a high radius. Also sharp corners of a cube are challenging. You get better results with more samples, but it slows the render down.


Any way, it was a fun exercise, and hopefully I can re-purpose the technique for other things.




November 22, 2016 - Comments Off on Tetley Drone Concepts

Tetley Drone Concepts

November 22, 2016 - Comments Off on Tetley Architecture Concepts

Tetley Architecture Concepts

November 22, 2016 - Comments Off on Tetley Super Teas

Tetley Super Teas

Here's one I worked on earlier. Slightly different role for me that usual. For this one I was more of a concept artist as the budget wouldn't stretch to a real one. I spent the first few weeks designing the main space, then I moved onto the drone designs. In the end most of the CG work got cut out, in favour of more dialogue.

Once the designs were complete, and signed off, I modeled, textures, and lit the main opening space. So at least I had a hand in the actual production.

October 2, 2016 - Comments Off on Houdini Occlusion Shader

Houdini Occlusion Shader


Digital Asset: TW_Occlusion.hdalc

After fiddling with SOP based Occlusion, I wondered whether I could port it over to the shader context, and thanks to Houdini, it was pretty easy. A few little changes, and there we have it. Just plug this in clr, and away you go. Admittedly there already an occlusion shader, and it does run faster than mine, 60 seconds for mine, and 40 seconds for SideFX one. I wasn't expecting it to be faster, as I'm not much of a programmer, but.....mine can trace inside the mesh too, giving an awesome SSS/thickness map look, and you can change the distribution using DistMin and DistMax. The closer to zero the closer to the normal direction.

Here are the settings:


It works in a similar way to the Mesh based SOP version I made earlier, so refer to that for specific guidance. I have also made the help in the tool tips.

If you want to trace internally, use Invert, and then increase the Bias to 0.05. For standard AO you can lower this to 0.001.

October 2, 2016 - Comments Off on Houdini Curvature SOP

Houdini Curvature SOP


Digital Asset: TW_Curvature.hdalc

After finally finding the curvature hidden away in the Measure SOP, I was a little disappointed in how limited the features where. So Here's one I cobbled together using some bits I found off the forum.

The settings are pretty simple again, and I've added the smooth function again to help.


October 2, 2016 - Comments Off on Houdini Concave and Convex Mesh Approximation

Houdini Concave and Convex Mesh Approximation


Digital Asset: TW_Convex.hdalc

A quick HDA for convex and concave mesh approximation SOP. Settings are pretty obvious. It works by iterating over points in a radius from the current point, and averaging the normal divergence.


The more points the more accurate the average will be. Play with the contrast to bring out the detail. Use the toggle to switch to Concave and back.

October 1, 2016 - Comments Off on Houdini Mesh Occlusion

Houdini Mesh Occlusion


Demo File: Demo Scene

Digital Asset: TW_Occlusion.hdalc

So, it's been a while since I last posted anything. XSi is dead and buried, so I've been getting into Houdini. I've dabbled a little over the years, but now I'm starting to use it in production at work.

So here's my first Digital Asset, a mesh based occlusion SOP. I was trying to think of a way of masking things like point scatter without using maps or baking things out. I also wanted to get to grips with VOP loops, an area that still confused me.

After doing this I have a much better handle on VOP based shenanigans, and hope to expand this a little more.

It's not the fastest thing to evaluate, obviously very high poly's like the dragon above take about a min to process on my old i7 machine.
A small explanation:

RaySamples. In short this SOP will trace a number of rays from each point (RaySamples), and return a black and white value (Cd). This will give you a simple occlusion but based on point attributes, rather than at rendertime. Below is 12, 32, 64, and 128 ray samples.


The first ray cast by all points is the normal direction. So at RaySamples 1, you will get a very rough look, a simple shadow look of sorts.

RayLength is multiplier on the N length of the mesh. Smaller values mean a tighter AO, and larger values will trace to further details.

SurfaceOffset, this pushes the raycast origin away from the mesh ever so slightly, this stops any weird errors.

Distribution. The sample grid can be narrowed or widened, this is distribution. A value of 0 DistributionMin, and 1 DistributionMax will give a complete sample range in a 180 degree hemisphere. Bring down the Max value and the rays will start to converge on the normal direction, giving a tighter spread of rays. The wider the hemisphere, the more rays will be needed to remove noise.


SmoothPoints. Then, as these points are raw, and un-sampled, which the renderer would be doing, there is a blur attribute, to try and smooth the noise out. Below is 128 rays smoothed.


Invert. You can flip the trace angle, and trace inside the object to get a thickness map of sorts, which is fun. NOTE: to do this you may need to increase the mesh offset. It seems, much like XSI raycast, if you cast a ray from the exact point position, then it hits itself. You need to position to start a little off the mesh.

Unfortunately, it makes it very slow, as optimizing it becomes redundant. Pretty much anywhere you trace, a ray will hit. Looks cool though, and might be handy for a fake SSS.


Optimization. Lastly this is my half arsed way to cull the rays. If after tracing a specified number of rays MinimumRays, you've only hit a certain number of times MinimumHits, then abort the remaining rays.

Attributes. In the geometry spreadsheet, two attributes are shared to make optimzation a bit easier.


Total num of hits will show how many times a ray has hit geo, and the total number of rays cast for each point. Soooo, if you are getting lots of zero hits on 6 SampleRays, then have the minimum hits at 1 and the minimum rays lower than the SampleRays, say 3. Then those points will only send out 3 rays, rather than 6. Saving you milliseconds of processing time!

NOTE: This feature doesn't save much cook time, but was fun to work out. It'll save more time the more rays and the high point count the mesh is. It can also be a little aggressive, leaving a mottled look to the final Cd.

Inputs. Input 1 is the mesh to add the occlusion to, Input 2-4 are the meshes which are causing the occlusion. If you want to self occlude, plug the same geo into the1 and 2.


July 22, 2016 - Comments Off on Zombie attack..

Zombie attack..