|
From: | Cyril 'Hulud' Corvazier |
Subject: | Re: [Nel] multipart meshes, deforming, adding |
Date: | Fri, 19 Mar 2004 19:20:27 +0100 |
We use a old version of Character Studio, so i'm
not sure to see exactly what it is. Anyway, we can simulate variety of 3dsmax
animation tracks (see max_animation_support.txt), but no IK solver is provided.
We recommand to use a biped skeleton. Use the Biped IK. NeL exporter will
oversample the animation. If you have some memory trouble with this method (too
much memory used by your animations), use our "anim_builder" animation
compressor. It works pretty well.
For each of your character mesh materials, you have
to force the material blend mode to true and set a valid blend function. Don't
forget to set the character as a transparency object else it will not be sorted
correctly.
uint i;
for (i=0; i<instance->getNumMaterials();
i++)
{
UInstanceMaterial &material = instance->getMaterial(i);
material.setOpacity(opacity); // set
the alpha value of the material
material.setBlend(true);
// set the material as blendable
material.setBlendFunc(NL3D::UInstanceMaterial::srcalpha,
NL3D::UInstanceMaterial::invsrcalpha); // set the blend
function to use : here it is "normal alpha blending"
material.setZWrite(false); // Don't
write to the zbuffer
}
instance->setTransparency(true); // Tell the mesh to
belong to the transparent render list
instance->setOpacity(false); //
Tell the mesh to not belong to the non transparent render
list
Yes, use blend shape (or morphing) for this. Copy
your object in 3dsmax for each morph target you want. Deform them. Add a "morph"
modifier to your main object. Load your morph targets into it. Animate the
sliders. It should work in the NeL viewer. You can dynamically play with this
sliders in your game using the method UInstance::setBlendShapeFactor (). Blend
shapes are compatible with skinning and MRM.
You can duplicate your texture for each color and
change them in the instance material at runtime using the NeL instance
interface:
uint i;
for (i=0; i<instance->getNumMaterials();
i++)
{
UInstanceMaterial &material = instance->getMaterial(i);
material.setTextureFileName("black_"+material.getTextureFileName());
// Choose the black texture version
}
|
[Prev in Thread] | Current Thread | [Next in Thread] |