Here are the answers to some of your questions.
>> For instance:
>> - The model must have only one material, and the UVs must all be laid
>> out within a single map in the 1-to-1 space. (Is this fully accurate?)
>
Yes and no.
You're UV maps can be outside of 0-1.... you're texture will be inside the
UV 0-1 range though. You can setup the "repeat" features if necessary, it's
not a restriction of X3D, so I'm not sure exactly what you're asking there.
Multiple UV maps are supported for meshes through the X3D
MultiTextureCoordinate
node. There is also limited support for MultiTextures.
X3D does not have the capability to support multiple Material nodes per
Appearance node.
This means that any Polygon within a mesh that is assigned to more than
one Shader will not
export correctly. I can't remember exactly what happens if someone
attempts that, I think it
exports an empty material field for the Appearance node.
Rough node equivilents:
Maya: ShaderEngine -> X3D: Appearance
Maya: Shader (all types currently) -> X3D: Material
However, you may have multiple Shader nodes attached to a Maya mesh, as
long as the
assigned Polygons do not overlap shaders. If you have two shaders
assigned to a Maya
mesh node, 1/2 of the mesh is assigned to shader A and 1/2 to shader B,
then RawKee
will export the following:
<Transform>
<Group>
<Shape>
<Appearance>
<Material DEF='shaderA' />
</Appearance>
<IndexedFaceSet>
<!-- Mesh Data for first half of the Maya Mesh Node -->
</IndexedFaceSet>
</Shape>
<Shape>
<Appearance>
<Material DEF='shaderB' />
</Appearance>
<IndexedFaceSet>
<!-- Mesh Data for second half of the Maya Mesh node -->
</IndexedFaceSet>
</Shape>
</Group>
</Transform>
instead of the typical single shader mesh X3D export:
<Transform>
<Shape>
<Appearance>
<Material />
</Appearance>
<IndexedFaceSet>
<!-- Mesh Data of the Maya Mesh Node -->
</IndexedFaceSet>
</Shape>
</Transform>
In otherwords, only use one shader node per ShadingEngine node.
Currently, there are a limited set of Maya Shaders that are supported
for export to Material nodes:
They are: Blinn, Phong, PhongE, and Lambert - LayeredShader is not
supported at this time.
MultiTexture is supported in several ways
1) I can't remember or not if the LayeredTexture is supported, if it
is, well, who knows
what you'll actually get out of it.
2) A Texture2D node that has its "outColor" attribute attached to a
shader node's "color"
attribute will get exported as standard Texture. "outAlpha" is
ignored. Alpha values in X3D are
completely dependent on the texture file. Obviously, a gif file
is either 0 or 1, jpg's are always 0,
and png can offer a range from 0 to 1.
3) A Texture2D node that has its "outColor" attribute attached to
the shader's "specularColor"
attribute will be exported as a light map within an X3D
MultiTexture node.
4) Maya bump maps aren't supported
5) A Texture2D node that has its color attribute attached to the
shader's "normalCamera" attribute
will be exported as a normal map within an X3D MultiTexture node
using DOTPRODUCT3
6) If your shader has inputs from texture files to two or more of
these attributes: color, specularColor,
or normalCamera - the plugin will automatically create
MulitTexture nodes for that mesh's
Appearance node once exported to X3D.
7) Should you just have just a single texture attached to the color
attribute, you may designate
that texture as a MultiTexture node within Attribute Editor the
Texture2D (and some other texture types).
The MultiTexture feature is buggy, as I never was able to get any user
to provide feedback on the different
settings and/or provide bug reports on this feature. It works as well as
it needs to for NDSU ATL projects.
Sorry, there are no handy dandy tutorials for any of this, never had the
funding available that
would allow me to make them.
>> While reviewing the "Character Rigging and Animation" tutorial
>
<snip>
>> 1) Under "Important Items to Remember", item #1 states:
>> "Your root joint must be a child of a transform node. From now on I
>> will refer to this transform node as the "avatar node". This avatar
>> node should have no additional children except for the children that
>> are placed within it by the X3D Character Editor."
>>
>> I simply want to clarify that this avatar node is created in Maya (or
>> other 3D package) and the skeletal system is parented to this node all
>> *before* utilizing the X3D Character Editor. If I have misunderstood,
>> I'd appreciate elucidation.
>
Alright here's how it works. You have you typical Mesh node in Maya that
you wish to use as your skin:
Transform (node name "SkinTrans" or whatever)
|_ Mesh
Then you have the typical rig as it is created in Maya:
Joint (node name "Root" or whatever)
|_Joint
|_Joint
What you need to do, is create another Transform node in Maya (let's give
it the node name of "NewTrans" or whatever) that is in the same local space
as the "SkinTrans" node. Prefereably both Transform nodes would be
siblings at the top of the DAG.
So what you would have is:
Transform (SkinTrans) Joint (Root) Transform (NewTrans)
|_Mesh |_Joint
|_Joint
Ensure that all the attributes of NewTrans are the same as SkinTrans. Do not
connect the corresponding attributes to do so, unless you break all of these
connections BEFORE you start animating.
Then make the Root joint node a child of NewTrans; then you'll have:
Transform (SkinTrans) Transform (NewTrans)
|_Mesh |_Joint (Root)
|_Joint
|_Joint
Ensure that all joint "Rotate" (xyz) attributes are set 0 on the 0
frame. Lock
this in, it's important. If you don't do this, your character animations
will be messed up.
Once you have done this, you can bind the skin to the skeleton.
Yes, I know all of this is cumbersome, hopefully, I'll be able to
address the
issue of Character Rig export in the not too distant future, but for now,
until further funding, it's the way its gotta be.
And by the way, the scenegraph for Character Rigs looks nothing like it
does in Maya after export due to HAnim spec. You would find it difficult
to recognize the nodes by reading through the file.
>> However, I have a couple of questions that were not answered in that
>> tutorial.
>>
>> 1) Is there a minimum/maximum/optimum number of bones allowed?
>
As far as I know, get as crazy as you want where bones are concerned. I've
never gone hog-wild on bone creation, so min max whatever, nothing has
ever been tested. I assume that anything your imagination can come up with
will generally export... AS LONG AS THE RULES ARE FOLLOWED!
>> 2) Are blend shapes supported for facial rigs, or is a bone-driven
>> system a better option?
>
Yes and No. The concepts of "Blend Shapes" is not supported by X3D.
HOWEVER, you can get a similar effect by using an X3D
CoordinateInterpolator and CoordinateInterpolator2D (for the texturemap),
but doing so will create a MASSIVE AMOUNT OF DATA!!!
Actually, now that I think about it, I didn't implement a
CoordinateInterpolator2D
node in RawKee... I can't remember why, but I guess that would be handy.
But if you want to try it, simply create an x3dCoordinateInterpolator
node in
maya:
MEL command:
createNode x3dCoordinateInterpolator
Connect the x3dCoordsOut attribute of the Mesh node to the x3dCoordsIn
attribute of the x3dCoordinateInterpolator node. You'll also need to setup
all the X3D TimeSensor stuff as well as the X3D routing and animation
triggers.
Of course, don't change the number of verticies in your mesh during the
blend shape, or your texture map will get screwed up. It seems to me
that I did make it possible to animate the texture coordinates too. I think
connecting the x3dTexCoordsOut attribute of a Mesh node too the
x3dCoordsIn attribute of the x3dCoordinateInterpolator node will
animat the data where the typical xyz values would be u value for the
x, the v value for the y, and a 0 value for the z. But this all gets rather
complex and is beyond what I have time to explain here.
>> 3) How is file referencing handled with the exporter? The method I use
>> for creating an animation rig involves several levels of file
>> referencing in order to keep the main rig file to a manageable size.
>> Is this method supported by RawKee?
>
Referenced files are ignored except as they are used by the x3dInline nodes
in Maya, and that won't work for you.
Yes, I know it would be handy to have them work, and I'd be more than
happy to
explore this area, but funding never existed to implement Referenced
file export.
Theoretically, I could add the X3D Import/Export feature for X3D Inline
nodes to
RawKee, and something could be done with it... but it wouldn't be available
anytime soon.
Now that I think about it though, I vaguely remember IMI asking for some
sort of
Reference file feature that I threw together... but it's been so long, I
really can't
remember much about how it's handled. Avoid it if possible.
I hope this is of some help.
Aaron
>>
>> Many thanks,
>> --
>> Telene Johnston
>> 3D Character Artist
>> http://vulpinedesign.com/ <http://vulpinedesign.com/>
>> telene@... <mailto:telene%40vulpinedesign.com>
>> 415.515.0204
>