Figure Symmetry Plugin

I’ve made a start on a plugin that can perform simple symmetrical operations on figures.  This can be used to switch a whole pose from left to right or copy the pose from one side to the other.  Select the figure’s parent group or hip then choose Edit > Sparrowhawke3D > Figure Symmetry from the top menu in the assemble room.

In the default mode the whole figure pose will swap from left to right.  The plugin works by searching for bones with matching names with the following prefixes; l,left,r,right,L,Left,R,Right.  For example Left Thigh and Right Thigh or rShldr and lShldr.  When the All Bones option is ticked body parts that do not have a matching prefix will be reversed – so if the figure is leaning to the left they will lean to the right after the symmetrical operation.

When the All Bones option is un-ticked the head, torso and hip of the figure will not be changed.  The eyes will swap from left to right though.

The operation can be limited when partial selections are made.  To swap or copy the pose from one hand to the other select the Right Hand and Left Hand in the Scene hierarchy.

This first version does not feature undo and redo and only applies to the current frame.  Symmetry is always about the X axis.  Future versions will try to add improvements such as reversing and matching key frames and being able to undo and redo.

Pose Export

The Pose Export plugin allows for the saving of Daz Studio .duf format pose files from within Carrara.  The Pose Export is a scene command.  There is no drag and drop support within the browser.  The plugin has limited function.

Select the figure Actor, or parent group of the figure, then choose Edit > Sparrowhawke3D > Pose Export from the top menu to save a full body pose.

Expand the figure tree and choose a body part to save a partial pose, such as either or both hands, by using the Ctrl key to select the other body part.  The plugin will save the rotation, position and scaling information for each selection.  Be sure only to select from a single figure for best results.

Windows PC users can select from the list of detected runtime content folders then click the Ok button to proceed with the Pose Export.  For Macintosh users the runtime detection and selection will not work and for the first pose of a session the content folder will have to be manually located.  This may be under your user name or for shared users.  The Select Folder dialog can be used to find the appropriate pose folder and confirm the file name for the pose.  If you hit OK in the Pose Export dialog without selecting a content folder the previous folder location will be used.

If you choose to save the thumbnail (default option) there may be a short delay while the .png file is rendered – especially for the first pose.  Change the quality of the preview thumbnail for a slightly faster saving operation or for a slower thumbnail with more detail.  Low quality does not use transparency, shadows or aliasing.  The current rendering camera view of the scene is used with the thumbnail.

Tick the Current Frame Only option to save a stationary pose at the current frame and time.  Otherwise if there are key frames an animation pose will be saved using all of the key frames in the time line.

Exported .duf Files are not compressed.

After saving the pose you will need to update the folder in the Carrara browser to see the new pose.

The plugin does not save pose controls so the figure may need to have their pose zeroed before using the saved Pose Export files – but only if pose controls have been used.  If the pose comes out looking wrong zero the figure and try the pose file again.  Pose files could be tidied for more compatibility up by applying them in DAZ Studio and then re-saving them with correctly reset pose controls there.

Skies and Backgrounds 2

The other simple plugin now in the Laboratory is the Sky Gradient.  The default settings for the Realistic Sky don’t look like any sky I’ve ever seen except perhaps through sunglasses and tinted windows.  This wide angle camera shows the transition from the sky overhead to the horizon.

Default Sky Settings

The Sky Color Control can easily be adjusted of course but the gradient from the zenith down to the horizon doesn’t look right for a clear day even with the Haze turned right down.  What I had been using was a Bi Gradient to add more blue into the mix but lately it struck me that the transition was still not right and the sky should be bolder bluer lower down.  A formula could be used but it would be pretty cumbersome compared to a plugin with colour chips and a slider made off a template.  By taking the Zentith as 1 and the Horizon as 0 then putting the background value to a power of function (or exponent) the response is 1 when linear and the same as the Bi Gradient.  Values less than 1 will push the bolder blue Zenith colour down toward the horizon and values greater than 1 will push the paler Horizon colour up into the sky.  I found that values of 0.5-0.75 were best but I need to make more observations when the weather is perfectly clear.  Any points below the horizon return as black.

Sky Gradient


Skies and Backgrounds 1

I’ve uploaded 2 plugins to the Laboratory; an old one I’d forgotten to upload, the Rotation Map, and a simple new one the Sky Gradient.  The Rotation Map had a bug in it anyway which I only found now with more thorough testing.

Firstly the Rotation Map was made specifically for help with creating night skies.  Finding a good  full 360º star map and a view of the Milky Way this could be projected onto the inside of a giant sphere but it wouldn’t interact well with the Realistic Sky.  Note that any colour in the Background is added to the Realistic Sky when it is rendered.

The rotation controls allow for adjustments to how the sky map appears.  With a few tricks it’s possible to properly animate the path of the stars in the night sky.  A sky map will need to be altered so that the Celestial Poles are aligned with the X-axis.  You’ll need to find the North Star in the image and the Southern Celestial Pole.  Finding the stars in that image was harder for me than in the real night sky.  If the original sky map is rotated around X it will be around whatever is in the middle of the image.

I’ve made the selection of Axis to be consistent with the Realistic Sky in Carrara where North is -X and East is +Y.

Corrections in 2D on the image can’t be made because the top and bottom have distorted and stretched out the stars so that these look fine when they are wrapped around a sphere but not once they are moved.  So the method is to put a Sphere primitive into the scene with it’s centre at the origin and apply the sky map image to its Color channel.  Rotate the sphere until the North Star lines up with the -X axis in the Right side view and the Southern Celestial Pole lines up with the +X axis in the Left side view.

It can help to make a copy of the image and then mark the Celestial poles with a cross in the 2D editor and use that first.  Set the scene Ambient to 100% with no other lights and do a spot render and little adjustments to get as close as possible in the orthogonal views.

Now put a Spherical Camera into the scene and set its position to Left then move it to the origin.  Render the image with the same resolution as the largest original dimension and with square proportions.  The spherical render will now take the undistorted stars and make a new distorted 2D spherical projection with different stars at the top and bottom and with the Milky Way wrapped around the map at an angle rather than in the middle.  Importantly the Southern Celestial Pole will be in the middle of the edge of the image on the left hand side.

Using the Rotation Map plugin as the Scene Background the new adjusted version of the sky map can be loaded.  When the 3D Rotation value for X is animated though 0-360º the stars will make a full revolution around to represent the passing of one day.  The X axis can also be adjusted for the correct time of night and year – this map was about right for an evening in April at 0º so with a 90º rotation is has the Southern Cross in the right place for January.

The 3D Rotation in the Y axis can be adjusted for the latitude of where the scene is supposed to be taking place.  At the Equator this will be zero and for the Southern Hemisphere, in say Sydney, this will be +33º   So for London this would be about 51º North and so use 309º according to the way the map is setup.

I’ll be improving this plugin by adding in freely set spin values for each of the axes for use with animations and full ±360º sliders.  Amateur Carrara Astronomers in the Northern Hemisphere please give feedback…

Rename Scene Command

This scene command can be used in a number of ways to rename the current selection in the scene hierarchy.

With a number of duplicates, for example Spheres, these can be renamed and given an index.  This will obviously be useful to save time if you have a large number of duplicates in the scene and want to rename them.  Use the Change All option to rename the entire selection. 







Untick the Add Index option to only change the names.  When the Auto Index option is ticked the index number will be the one given by Carrara to each object as it is inserted into the scene.

If the objects to rename are mixed in with other objects in the selection fill in the specific name to search for and be sure to uncheck the Change All option.



Terrain Intersection

While working on some larger scenes with Terrain objects and Clouds I made a few observations and conclusions.  On a woody hilltop the individual trees can still be made out up to at least 4 miles away, particularly along the ridges.  When making a scene in Carrara we can use the Surface Replicator to easily fill a Terrain object with plants, rocks, etc.  One limitation is that the replicator will only allow for 100,000 maximum objects.  When using real world scaled objects that means we can only use a 2 square mile Terrain object to fill out with a dense forest of mature plants and probably only a 1 square mile or less object for really dense growth and a full canopy.  Carrara can handle a large number of terrain objects filled with replicated trees and render them in good time with low quality GI Sky Light.

Then I saw there were going to be problems when using the replicator with some more complex scenes.  When we have a road over the terrain, a clearing or town, or want to put in a lake or river and bank we might be able to use a Terrain Layer or paint onto a texture map to solve these distribution issues but that there are real problems when Terrain objects overlap.  I always prefer to have a separate Terrain object for a landscape feature, use a Zero Edge Filter and emerge from the Infinite Plane or a larger base and especially to build a mountain range.  If Surface Replicators were used on those overlapping Terrains full of trees then tree tops are going to poke up out of the ground, intersect each other and make a mess.  I couldn’t think of any other solution for that and to help with the other issues above than with a new simple plugin.

The Terrain Intersection Shader can be used with the Surface Replica Shader Distribution to return black or white by itself or to Multiply against a more complex distribution Shader.  Give each Terrain object a list of other overlapping terrains and the plugin will check which is higher and give that the white value.  It can also be used to save time where there are other objects like a tower or town or to make a clearing without needing to paint a texture map for the terrain – especially if you change your mind and want to move things around.

I’ve had trouble in the past with Terrain objects and the Carrara SDK.  Which ever way I try the Rendering Quality Mesh can’t be used, only the Preview Quality Mesh is returned.  The Surface Replicator is able to use it so there must be a way but I’ve never got an answer.  The Terrain Primitive is not included in the SDK.  However since this new plugin is not optimized that isn’t a big issue.  The Preview Quality can be turned up a bit to get a better result but the Preview Quality will give a quicker distribution without me needing to write the extra code.

You can find this plugin in my Laboratory.  Mac version for Carrara 8 will be available soon or on request.

Puffy Clouds

Carrara’s own Volumetric Clouds render quickly and look great but they can only produce results for a limited range of realistic clouds.  Undeveloped flat based Cumulus and broken up Fractus clouds can be made with the Cumulus 1 and Cumulus 2 shapes.


The Big Cumulus shape is a bit more lumpy.  None of the existing cloud shapes can be used to make a really puffy Cumulus cloud with distinct rounded outlines on top.  Another limitation of the existing cloud types is that only the noise animates.

Carrara Big Cumulus

Using extreme values the secret of the cloud shape is revealed.bigcumulusblobs

It turns out that new cloud shape plugins can be made with the Carrara SDK.  So I set out to test and create my own new cloud shapes.  The idea was to make something that worked much like the existing shapes but to give them a bit more ‘purpose’ when they animate.  In real clouds the puffs appear to rise, grow, tumble and churn.  I would look for a way to get something in between a simulation and what looks real to find that purpose.  One of the challenges was to formulate cloud shapes so that they did not need to run a simulation and my solution was to follow random but cyclic paths and to evolve the cloud over time.  I favoured this approach rather than using a fountain or a particle effect.


With the added complexity my Cloud shape is much slower to render, especially when the first ray hit occurs and Carrara builds its lighting cache.  The amount of detail to generate smaller and smaller puffs can be controlled for a faster render, along with the normal volumetric cloud accuracy settings.  My Cloud has many extra parameters and I have placed up to 9 clouds in the one volume arranged into banks.


Murky Water Animation

To test the smooth transition from above to below the surface of the murky water this animation lowers the camera to sit on the water level and then lets the waves wash over it.  Once below the water the visibility has been increased to 30 ft to be able to see more.  In reality nothing would be seen more than a few feet in front of the camera at the surface and the light would rapidly be absorbed at any depth.



Not much effort went into modelling the carp or the animation.  To improve this it also needs some small scraps of stuff floating in the water and other small particles.  These should be given no gravity but will require some physics and collisions to suggest any current and movement of the fish if possible.

Murky Water

When you look into a body of dirty water objects fade into the murky depth.  As objects get deeper and deeper down they appear to become darker and take on the colour of the murk.  In this photograph the water is very murky from the clay, reducing the visibility to less than a foot depth.  The water, fallen branches, sticks and fish take on the dull colour of the clay.

Carp in the Lake

To create this effect inside Carrara we have Absorption and in-scattering in the Transparency shader channel.  Within the set Attenuation distance the transparency is gradually ‘turned off’ to return only a black colour from that depth – that is when the Absorption channel is a Value set to 100%.  Anything deeper in the water than the Attenuation distance returns black – thus adding nothing to the final shading result.   I’ve used a shader for the water following the old rule that color, transparency and reflection should have their total value add up to 100%.  The Fresnel effect will switch over between using more reflection at the shallow angle and more transparency when looking directly down.


This close up shows the same scene with the Absorption turned ON in the LEFT side and turned OFF on the RIGHT side.  Without the absorption the objects in the murk become clearly visible – including the shadows on the bottom of the lake.AbsorptionEffect

So next what if we want to put the camera under the water ?  We still get the ray-traced colour effect on the objects seen through the surface above the water but without using Distance Fog or changing the whole Scene Atmosphere it doesn’t look like we are under the murky water at all.MurkyUnderwaterNoEffect

If we change the Scene Atmosphere from the Realistic Sky to use Distance Fog then we’ll get something like the desired effect but in doing so loose the view of the sky and anything out of the water.  The effect of the underwater murk needs to stop at the surface of the water and interact with it for a better result.  Here is the same scene using Distance Fog but with a radius of 10ft rather than 1ft so we can still see what is going on.MurkyUnderwaterFogEffect

Problems will arise If we want to use the same scene in smooth animation.  We can key frame switch some of the effects but we can’t switch the between Distance Fog and Realistic Sky dynamically.  Layering effects, multi-layer rendering would offer some solutions with existing technology.

To achieve this and other effects I’ve been making the Murky Volume plugin.  This is a render of the same scene underwater using the plugin.  The effect is similar to the Distance Fog but it interacts with the surface.  Again the visibility has been extended to 10ft in order to see something.  Where the view is looking directly up through the water we can now see the sky and foliage clearly.MurkyUnderwaterPluginEffect


An old trick was to take a polygon hair prop with a higher transparency/alpha then make a duplicate, maybe scale it up a fraction, offset it bit and then you could get a thicker final mesh to render.  This gave me the idea to make a simple new plugin to Thicken out the results of the simulations.  It might also give a more realistic render and rely less upon painting in the layers of hair into the texture map.

For the Thicken beta version 0.1 I’ve allowed for a single additional layer with a surface offset, xyz displacement and a scaling factor.  I’ll probably be adding a second layer and second column of settings.  I don’t think I’ll add multiple layers because that will make for a very tricky UI.  I’ve also considered giving the layers their own shading domain but I’m not sure if that is safe yet – Carrara can cope with it when you add and remove them in the vertex modeller so it should be possible.

The Thicken plugin can of course be used to conveniently add a surface offset or indent a mesh by telling it to hide the original mesh.

I used it in the render of this cloth hair simulation.  There are only a few artefacts where the layers of hair went through each other, before the thickening was applied – you can see these on the left shoulder.  This next attempt at dynamic cloth hair used twice as many layers as the last one, with 5 down the side of the head and two more at the back.  The self collisions performed nearly perfectly but it took more than 12 hours to run when draping over the figure in a 5 second animation sequence.  I also improved the alpha map technique by using 2 pixel thick strokes to paint the tips of the hair.