MM_ShaderTools

MM ShaderTools is a plugin which helps you to batch replace, create or modify shaders in all your materials at once. This can save huge amounts of time, especially in later stages of a project. You can select multiple materials or lights and run the plugin to modify your render trees with three different operations:

  • mmshadertools_interfaceReplace shaders: will replace all instances of the same shader by a new one. You have options which will help you to keep all connections in and out of the shaders intact. Additionally you can set parameters in the newly created shader, either directly or based on parameter values of the old shader.
  • Insert shader: insert a new shader between a specified connection. Similar to replace shaders you have options to keep all connections intact and additionally set parameters in the new shader. You can also use this to simply import and connect a shader without inserting it into an existing connection.
  • Set Shader Parameters: allows you to set parameters of all kinds in a target shader.


The first version of my Mia Material Advanced shader used to be a compound. But soon I found out about an annoying  softimage bug which caused a massive slowdown prior to rendering when using shader compounds with a lot of exposed parameters. So I developed a new version which packed all the functionality into one shader phenomena. Unfortunately we had used the compound already in several projects and assets which we had to reuse later on. So I created the initial version of the script, which I used to replace all the Mia Advanced compounds in a scene with the new shader phenomena, while keeping all connections intact. I really liked the performance of the script and so I decided to massively extend it in my spare time, to make it work in all kinds of  possible situations.

So why use this? It’s maybe not the most user friendly way to work with materials, but there are many cases I can think of where this plugin could prove extremely useful. As described above, Replace Shaders can easily update shaders to a newer or better version. Another nice possibility would be to quickly convert entire scenes to work with different render engines like VRay or Arnold. A combination of Replace Shaders and Insert Shader could be used to create complex render channel setups you might not have thought of before creating your materials. And Set Shader Parameters can of course become handy in all sorts of situations. Enable Elliptical filtering or change texture repeats in all your image nodes. Or increase sampling values in all your illumination shaders at once…

Here is a quick use case example of how I converted a production scene from Mental Ray to Arnold with the help of MM_Shadertools:

Below are some (uncomped) test renderings of the soccer stadium I’ve created during the production of our Grundig spot. The rendering was done in mental ray and I used my Mia Material Advanced for almost all the materials (about 100 different Materials) in this scene.

First I replaced the Mia Material with Arnolds Standard Material,with reconnect local bump map connections to material option on. This took about 2minutes for all 100 materials. Then I replaced all Mia Material Wrappers by a color Pass trough shader since they weren’t required anymore.

Next I replaced all bump map shaders with arnolds own bump map shader, inverted all scalar change range nodes (since I knew I used them a lot to texture the glossiness which is the inverse in Arnold’s Standard Material) and replaced the Mental Ray rayswitches by Arnold switches. These conversions all took only a couple of seconds.

Next up where the various lights in the scene and finally the environment (which I quickly updated by hand).

I had to manually tweak a few lights and exchange 2 or 3 other mental ray shaders. But after about 20 minutes of tweaking I ended up with the renderings below. They’re not perfect and require another fair amount of tweaking, but I think they’re a very good starting point, and it took me about half an hour to get there. Which isn’t bad in my opinion considering that this was a full production scene.


Here is a small help page I’ve set up to describe in detail the various functions of the plugin. You can also call this help page directly from the plugins help button:

MM ShaderTools HELP


Download MM_ShaderTools

The archive contains the plugin, plus some presets I’ve been using so far. One more word of advice: since the plugin can massively change or even remove stuff from your materials it’s heavily recommended to save your scene before running the script. And since it proved very complex to handle all possible exceptions (especially concerning shader compounds) there might very well be some bugs left. So use it at your own risk and in case you encounter any problems don’t hesitate to email me and I will see what I can do.

Have fun and let me know if you like the plugin!

Some useful ICE compounds

Finally I’ve found some time to cleanup and polish some of my ICE compounds to share them.  Here they are, I hope you like them!

Cluster to Weightmap

As the name implies it converts clusters to weightmaps. Whats nice though is that it accept all types of clusters (point,polygon,edge) and adds the ability to grow and/or smooth the resulting weightmap.
Remember that you have to create the weightmap before you create the Icetree to make this work.

Download Cluster to Weightmap

Create Copies along Curve

I don’t think there is an easy way to do this with the build-in topology compounds plus it has some other nice features:

  • supports both open and closed curves
  • nice controls to interactively position, scale and rotate your copies on the curve
  • copies will be evenly spaced along the curve
  • the copies nicely align to the curve, you shouldn’t run into any problems with flipping normals on s-shaped curves.
  • transfers UV’s

The compound isn’t terribly fast, but that’s more due to the lack of speed of ICE topology in general. But I still think it’s very useful for a lot of modeling tasks. Like extracting a curve from a railing and quickly distribute posts for example. For everything else I would try to stick with instances…

Download Create Copies along Curve

Neural Net

Another take on motiongraphics currently most popular effect: emits particles and connects them with strands. This one is

  • pretty fast
  • works both in a simulated and non-simulated environment
  • two modes of stand creation: closest points & random
  • turbulice and grow the strands

Here is a quick viewport capture of  750 particles being emited per second, each growing 30 connections to its neighbours:

Most of the detail gets lost in compression unfortunately, so you can’t really see the individual connections growing. But its still a good example what you can do with the compound.

Download Neural Net

Emit from Polygons

This compound is thought to be used in a non-simulated environment and the emitter mesh should ideally consist of quads only. The idea behind this compound was to quickly create coral like structures by emitting instances from polygon centers and scaling them according to the polygon they’ve been emited from. This helps to prevent instances from penetrating each other, and also results in a more natural, organic look.

Since some of the parameters are not as obvious as in the other compounds i will explain them quickly:

Scale XZ by polygon size affects how much the instances will be squeezed based on the emiter polygon. A value of 1 means the particles are completely squeezed, 0 means no squeezing happens.

Note that we’re not actually skewing the particles, since that’s not possible. We’re only scaling them according to the distance between the two opposite edges of a quad.

Y Min/Max specify the range the next two operations work in. If they’re set to zero, the particles Y scale will be set to min+max/2.

Scale Y by polygon size does the same thing as the XZ feature. The higher the value, the smaller in Y will instances emited from small polygons become.

Scale Y by Curvature additionally scales Y by taking the curvature of the mesh into account. Instances lying on concave surfaces will scale down, while convex ones scale up.

The instancing part allows you to directly pick a group of different meshes to instantiate. You can then finetune which instance will appear via a turbulence. Bigger turbulence means bigger fields of the same instance will appear. You need to specify the correct number of different instances to make it work.

Download Emit from Polygons

Quantize Values

This one is a bit techy, but proved useful to me. It takes a set or array of scalar values and spits out quantized values based on a quantization step. An image (hopefully) explains more than thousand words :)

You could use this to create stepped gradient effects or stop-motion like animation.

Download Quantize Values

MM_FilterSelection Plugin

During our last production I had to deal a lot with importing/exporting stuff out of complex models. And I missed a certain little feature quite often. I’m still not sure if there isn’t some build in method to this, but I asked a few other Softimage users and they didn’t knew a one click way to do this either: simply select everything in the current selection based on a filter preset. Most common use would be to branch select a model and select all polygon meshes inside. There is a “Deselect All Using Filter” command in the select menu which does the exact opposite (no idea when you would need that) and a “Select All Using Filter” but no “Select all using Filter, based on the current selection”.  I used to activate the filter and rectangle select in the viewport or the schematic, but in complex scenes it happens frequently that you accidentally select stuff you don’t want to.

So I decided to quickly write a small script which does the job: you can either select or branch select objects in your scene, run the command, and it will keep all VISIBLE objects in your selection which fit the currently selected filter. If you hold down shift, it will also select HIDDEN objects which match the filter.

Installation:

Put the script into Application\plugins of your user or workgroup folder. Hit “Update All” in the plugin manager or restart softimage. The script will register a new command called MM_FilterSelection at the bottom of your “Select” menu in the upper right corner

Download MM_FilterSelection

Another bugfix for Mia_Material_Advanced

The guys over at SI-community found out that Photons weren’t working. I’ve uploaded a new version which should fix the problem.

Grundig Cube

Finally my first soccer commercial, I really enjoyed this one! I created the CG stadium and crowds from start to finish in all shots. For the crowds I used filmed footage mapped on sprites, which worked surprisingly well. I modeled the stadium from scratch and also did the shading and most of the lighting. Rendering was done in mental ray this time.
I think we might produce a longer directors cut version in the coming weeks. Hopefully I will find some time to upload some making of pics as well.

Grundig Cube

Small bugfix on Mia_Material_Advanced

I’ve uploaded a new Version which fixes a small bug where shadows lost their transparency and color when using the rayswitch.

Mia_Material_Advanced

Mia_Material_Advanced is a shader phenomena which should solve most of your issues with the standard Softimage implementation of the Architectural Material, facilitate working with channels, plus add few additional nice features. Since I’ve spend quite some time investigating the whole topic, I thought it might be a good idea to describe the whole process on why I ended up writing my own spdl for the shader. But feel free to skip all that and just download the .xsiaddon at the bottom of the post.

So why would you need yet another version of the Architectural Material?

Initially I’ve been searching for a working solution to use Softimage Framebuffers/Channels in conjunction with the Architectural Material. So what’s the problem with the build-in channels?

At first glance everything works fine:

So far so good. But let’s try something more difficult. I love “Enhance XSI” procedural textures a lot and I use them very frequently. So what happens if we pipe an Enhance Procedural into the Architectural Material.

The image looks good, but rendertime went from about 10 seconds to more than two and a half minutes!!! The funny thing is, this even happens if you pipe the shader into ports like refraction color, which shouldn’t be evaluated at all. Obviously this is a bug with the Enhance shaders, because other procedurals like the standard fractal or the the Binary Alchemy Fractal work fine. And actually it’s got nothing to do with the Architectural Material as well. If you look at the code of the Architectural shader, you will discover that it’s actually a shader phenomena. It contains the Architectural_Multi-Out Shader, plus some “Store Color in Channel” shaders to store the output of the Mia into the standard Softimage channels. If we use the Architectural_Multi-out shader directly, everything renders fast again, but of course our channels are now empty. And if we try to store the output into channels in the rendertree, rendering slows down again. So obviously there is some problem  with the “Store Color in Channel”  shader and the enhance shaders. I reported the issue already some time ago, but so far it hasn’t been fixed.

So if you want to use the Enhance procedurals in conjunction with channels there is no way to make use of the usual “Store Color in Channel” shader. That’s also the reason why Guillaume Laforge’s mia_x_RenderChannels Compound won’t work very well in this case (actually there is another reason why you should stay away from shader compounds completely, as you can read below).

The solution: the excellent Mia Material Wrapper by Jarno Gruppen, which stores the channels of the Architectural Material directly on a shader level.

Like this everything, including channels, works fine, even with Enhance procedurals. Another advantage over the build-in channels are additional channels like the raw components and the corresponding level masks or AO and opacity channels. Since I wanted to add a few other features to the shader, I initially build a shader compound which exposed all the parameters. But I encountered another nasty Softimage bug, which (to my knowledge) hasn’t been fixed yet. If you expose a lot of parameters out of a shader compound, as soon as you draw a region, Softimage freezes for a certain time before it even starts to render. This delay grows with the number of exposed parameters and instances of the shader itself. And since the Architectural Material has more than 50 parameters it sometimes took minutes until the rendering started for more complex scenes, which made tweaking parameters unbearable. That’s why I decided to build a shader phenomena via spdl in the end.

Features of the shader:

Please note: I ended up including two 3rd party shaders directly in the addon. I didn’t code any of these shaders, so all credit goes to their original authors!

  • Additional Tab to add or remove channels directly in the shader: simple check-boxes to add all the available channels of the Architectural_Multi-Out Material in a way that they work together with the wrapper. Please note: this doesn’t activate or deactivate storing render channels for individual shader instances in you scene. It just globally adds channels to the scene and corresponding framebuffers to the current pass.
  • Avanced rayswitch functionallity: I recompiled the excellent RRayType shader by Reinhard Claus for 64bit systems and included it in the phenomena. An additional rayswich tab gives you the possibility to control secondary and tertiary generation rays for both reflection and refraction. This can be very useful to optimize performance as well as for artistic purposes ( for example by changing the color values).
  • Solves anisotropic highlight problem: since forever the default Architectural Material distorts highlights on objects with UV’s (even if you don’t use anisotropic reflections) unless you type “none” or something else into the anisotropic texture space. You can see the effect in the topmost picture: the left sphere shows the Architectural Material with default values and stretched highlight, the right sphere the same material with “none” typed into texture space.  Actually the original design of the MIA Material by mental ray allows both vector and numeric inputs. My guess is that since that’s not possible inside Softimage, they decided to implement only the vector input. But the problem is that you will very rarely need vector map inputs for your anisotropic reflections while on the other hand it’s very annoying to type something into the texture space, each and every time you use the shader. So I decided to go with the numeric input which gives you the following options. From the mental images arch&design docs:

    anisotropy channel can also have the following “special” values:
     -1: the base rotation follows the local object coordinate system.
     -2: the base rotation follows the bump basis vectors
     -3: the base rotation follows the surface derivatives

    In the very rare case you need to create an effect like this, you can still use the normal Architectural_Multi-out material.
  • Clamp for HDR rendering: a small utility in the optimization tab. Since we are rendering to 32bit hdr files most of the times these days, we often encounter problems with super bright highlights. Since traditional specular highlights are a remnant from the beginnings of computer graphics, they often don’t work well when rendering to hdr files. For very reflective surfaces the specular’s intensity can grow to very unrealistic values, up to hundred times brighter than white. This can lead to flickering, especially when those specular’s are seen by other reflective surfaces. To a certain extend it can help to clamp all values above a certain level, and that’s exactly what the parameters does.

Here is a video with the shader in action:

Usage:

The xsiaddon will install the spdl of the shader phenomena plus the mia_material_wrapper and the RRaytype shaders. Everything x64 only, sorry!

For some reason you will have to restart softimage after installing the .xsiaddon or the interface of the shader won’t load fine in some cases.

You should then find a shader preset in your Illumination category inside the render tree. This will drop the shader and the wrapper already connected into your tree, which is how the shader should be used. Unfortunately I wasn’t able to include the wrapper directly into the phenomena (any hints on how to do this would be much appreciated).

Additionally you will find a category called Mia_Material_Advanced which contains the three separate shaders if you need them.

Download:

Mia_Material_Advanced

Let me know if you encounter any problems.

Cheers!

MM_c4d_MultipassImporter

This is a script for After Effects I finished already a while ago. It enables you to import all your c4d multipass renderings at once and automatically layers them back together in the correct way.
Here is a small video to show what the script does:

Back then I realised that many of our compositing artists either didn’t know, didn’t care or simply didn’t have the time, to add all the passes back together in the correct way. Often they preferred to add them together in a way they liked, which in worst cases led to poorer results than the original renderings (or at least very different results than the 3d artist had in mind). So I think it’s always a good idea to start with a correctly layered composition which looks exactly like the rgba and start to tweak things from there.
Furthermore you can use the script as quite a powerful tool to import your renderings. Just for fun I tried to import the whole folder structure of quite a big project of ours, with thousands of textures, project files, pdf’s and what not. The script imported only the cinema renderings of all 27 shots without a problem and nicely distributed them into correctly named folders and compositions. The renderings do not even have to be in the same folder. For example, in our pipeline all the passes are automatically distributed into their own separate folders, because it’s much clearer this way.
So why not simply use cinema aec’s to import correctly layered compositions? Since aec’s are searching for the footage exactly in the place you have rendered your files, they wouldn’t work in our (and I think a lot of other) cases. Furthermore you would lose the script’s ability to simply select one folder and automatically import all your renderings.

Installation: Simply drop the .jsx file into your After Effects\Support Files\Scripts folder and restart AE. Tested only with CS5!

To be honest, I had no chance to test the script in production a lot, because I didn’t use cinema at all on the last couple of projects. So there might very well be some bugs I haven’t discovered yet. Feel free to email me if you have any problems and I will see what I can do. I hope this is useful to some of you, enjoy!

MM_MultipassImport.rar

Coop Underwater World

Last month we finished these two spots for the swiss bank Coop. They are a follow up to the older Coop Evolution spot which you can watch here. This time I created almost all of the environments in Softimage. All the stones, plants and reefs you see are made of folded banknotes, just like the animals. And almost everything was created and deformed procedurally through ICE. So theoretically it would have been possible to create a much denser environment. But due to the noisy texture of the banknotes it was difficult to find the right balance in detail for each shot. The pictures got uneasy pretty fast and so we tried to keep most of the shots rather simple in terms of geometric detail.
I also animated some of the camera movements and was responsible for lighting & rendering of almost half of the shots. I hope you like the result!

COOP Underwater world 40 sec


COOP Underwater world 25 sec

Lamborghini Aventador

Our newest spot: another VFX-heavy, 3-minute movie for the new Lamborghini Aventador. Me and another artist did all the sequences with stones crashing out of the ground. Although the timespan was very short I really enjoyed working on this, since it was my first bigger spot done with softimage and a lot of ICE. Hopefully I can post a making of soon. Enjoy!

Return top