Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 22 Nov 2010
Offline Last Active Jan 25 2016 04:48 PM

Topics I've Started

What is a rig?

26 December 2014 - 07:43 AM



I am looking at animating with Maya as I would like to understand the animators workflow, but am being confused by what I am finding online.


I always thought a rig was a basic skeleton + additional information such as joint constraints/IK solver parameters/etc. When I search for rigs for Maya though I am finding what look like complete characters - they even come with hair and multiple outfits.

I am similarly confused by half the goals for this Kickstarter: https://www.kickstarter.com/projects/cgmonks/morpheus-rig-v20 (i.e. why such a tool would need to come with its own props?)


What is the purpose of these 'complete' rigs that are more like characters than rigs? Are the artists meant to use them as an asset in their game or render? Or are they just to be used by the animator, and then the modeller will take the skeleton and skin the actual character mesh?


What is the term for what I thought was a rig?








How would I retrieve the 'inner surface' of an arbitrary mesh?

23 April 2012 - 05:25 AM

In my project I am working on a 'subset' of cloth simulation in which I attempt to fit one mesh over another. My solution involves deforming a 'physical mesh' based on depth fields and using it to control the deformation of the complex, detailed mesh.

I have seen impressive mesh optimization methods, but I don't want to optimize the mesh so much as extract part of it. What I want is a way to approximate the 'inside surface' of a mesh, since in the 'real world' this is what would interact physically with mesh being deformed with.

Take the images below; the second mesh contains no overlapping polygons - the lapels, shoulder straps and buttons are gone - it is a single surface consisting of the points closest to the character.

Attached File  jck.jpg   263.73KB   47 downloads

(Checking for and removing overlapping polygons would be one way I suppose, but how to decide which are the 'outer' and which are the 'inner' bearing in mind the normals of the semantically inside polys won't necessarily emanate from the geometric centre of the mesh)

Does anyone know of an existing implementation that does something like this?

Could someone explain how this equation to calculate weights for control points works?

20 April 2012 - 10:05 AM

In my project, I want to deform a complex mesh based on a much simpler proxy mesh. For this, I need to skin my complex mesh so that each vertex is affected by one or more control points on the proxy mesh and will transform linearly with them.

This paper - http://ivizlab.sfu.c...PEG-4 Faces.pdf - Feature Point Based Deformation for MPEG-4 Facial Animation, describes on pages 4 and 5 how to do what I want, I believe.

If I am understanding it right, that algorithm finds the closest control point for a vertex, then the two that flank that vertex. The weight for each control point (Feature Point in the paper) is proportional to the distance to each of these points, relative to the others.
Therefore, the weights sum should be 1 and the vertex will move with the plane defined by the control points.

There are a couple of things I do not understand though:

1. In equation (2), what are d12 and d13, these are not defined in figure (1). Are they equivalent to d2 and d3? Or d1 - d2, d1 - d3?

2. When you have the inverted proportional distance, what is the purpose of taking the Sine of it? (Equation (4))

Finally, in equation (5) on page (6), why is the deformation of the vertex calculated in that way? Why is the displacement not simply:

SUM( controlpoint_0_displacement * controlpoint_0_weight, ..., controlpoint_n_displacement * controlpoint_n_weight )

Could anyone who knows whats going on explain? Thanks!

Producing a depth field (or volume) for cloth simulation?

11 April 2012 - 06:08 AM

In my project, I am working on a system which will deform a mesh so that it fits over an arbitrary convex mesh - specifically - fitting clothing items over characters.

To start with I used the depth/stencil contents to filter pixels where an intersection took place (since the the scope is narrowed down to clothing this is simplified because the 'item' mesh will completely occlude the 'hull' mesh), then iterated over the positions in the 'item' mesh and deformed each vertex so that it was positioned between the camera and the world position as retrieved from the depth buffer.
When it worked this was very effective, and even with deformations on the CPU was almost real-time, but it did not allow for deforming the mesh in a natural way which preserved its features.

My preferred idea was to filter the depth field to create a set of 'magnetic deformers' which could then be applied to the mesh (per vertex with weight based on euclidean distance*); deforming the mesh on the GPU (OpenCL) I think would allow me to have a reasonable amount of deformers.

The reason I liked the depth buffer for this is that the hull was allowed arbitrary complexity with (practically) no impact on performance, it also allowed me to use objects whose shaders did 'anything' with my system**; but I have spent days trying to cajole it into doing what I want, but am realising that I will probably spend more time (programmer + processing in the final system) trying to create a field in a suitable space rather than creating one for this application.

Cloth simulation systems seem a good resource for basing the collision detection on, since at this point their purpose is identical and they need to be fast, but everything I read seems to focus on realistic real-time simulation of the cloth, I am only interested in the collision detection part.

Does anyone know of a good (fast) cloth simulation system that doesn't use 'geometric primitives' for its collision detection? I have read that some cloth simulation systems use depth fields and this seems like it would produce the best results when deforming against a mesh such as a character.

What about volumes such as voxel volumes? This I think would be ideal if it could be done quickly but I have not read much about creating volumes from from polygonal meshes, and nothing about the performance of testing points against these volumes.

*The best implementation from my POV would allow this to be done in real-time; since this is about fitting rather than cloth simulation I think I could get satisfactory performance by operating without a fully constrained cloth sim - its more important the features of the mesh are preserved.

**This is done with user generated content in mind so if it wasn't hard enough, no significant assumptions about the mesh can be made (if they could, this wouldn't be needed!)

What could be the cause of this specular highlight artifact?

26 March 2012 - 08:47 AM


I have a problem with specular highlights in my shader. It manifests itself as a 'rogue highlight' emanating from the point the light vector 'intersects' with the surface, on the opposite side from that which should show the highlight.

Here is an image from it, showing the underside of a box with a directional light pointing down onto the box. (Diffuse set to 0 so only the specular component is showing)

Attached File  Untitled.png   24.67KB   46 downloads

The excerpts from the shader which are relevant to the specular component are included below; I just cannot see what is going wrong.

This is a possible duplicate [http://www.gamedev.net/topic/459040-hlsl-cleaning-out-specular-artifacts-in-normal-maps/] but as I cannot see the pictures I can't tell!

Has anyone seen this before!?


(If the code looks a little.. 'stilted' its because its being psuedo-procedurally generated)

-- Vertex Excerpts --
float4x4 globalTransform; //worldviewprojection
float4x4 worldTransform; //world

struct INPUT
float4 positionIn : POSITION0;
float4 normalIn : NORMAL0;

struct OUTPUT
float4 positionOut0 : POSITION0;
float3 normalOut : WORLD_NORMAL;
float4 positionOut1 : WORLD_POSITION;

void dfp_v_DoWVPmTransforms(in INPUT input, inout OUTPUT output)
float4 position = float4( input.positionIn.xyz, 1);
output.positionOut0 = mul( position, globalTransform );

void dfp_v_DoWorldTransforms(in INPUT input, inout OUTPUT output)
output.normalOut = normalize( mul( input.normalIn.xyz, (float3x3)worldTransform  ));
output.positionOut1 = mul( float4(input.positionIn.xyz,1), worldTransform);
output.positionOut1 = output.positionOut1 / output.positionOut1.w;

-- Pixel Excerpts --

float4 Ce;
float4 MAc;
float4 diffuseColour;
float4 specularColour;
float specularPower;
float4 eyePosition;

Texture2D lightingInfo;

struct INPUT
float4 positionOut0 : POSITION0;
float3 normalOut : WORLD_NORMAL;
float4 positionOut1 : WORLD_POSITION;

struct OUTPUT
float4 colourOut : COLOR0;

float4 diffuseSum : DiffuseSum;
float4 specularSum : SpecularSum;

[b]float4 CalculateSpecularComponent(float3 surface_normal, float3 lightColour, float3 surface_light_dir, float3 eyeDir)[/b]
[b]float3 H = normalize(-surface_light_dir + eyeDir);[/b]
[b]float intensity = saturate(dot(surface_normal,H));[/b]
[b]float specular = pow(intensity, specularPower);[/b]
[b]return saturate(float4( specularColour * lightColour * specular, 0 ));[/b]

void dfp_p_ComputeDirectionalLights(in INPUT input, inout OUTPUT output, inout INTERNAL internal)

float3 worldNormal = input.normalOut;
float3 eyeDir = normalize(eyePosition - input.positionOut1).xyz;

float4 lightInfo = lightingInfo.Load(int3(1,0,0));
for(int i = 0; i < lightInfo.y; i++)
float lightoffset = lightInfo.x + (i * 4);

float4 lightcolourpower = lightingInfo.Load(int3(lightoffset,0,0));
float4 lightpositionambienteffect = lightingInfo.Load(int3(lightoffset+1,0,0));
float4 lightdirectcone = lightingInfo.Load(int3(lightoffset+2,0,0)); //the direction of the light will be in xyz

internal.diffuseSum += CalculateDiffuseComponent( worldNormal, lightcolourpower.xyz, lightdirectcone.xyz );
internal.specularSum += CalculateSpecularComponent( worldNormal, lightcolourpower.xyz, lightdirectcone.xyz, eyeDir);