wilsonwing
28-02-2008 10:37:12
Hi, I am a newbie and I got some questions when using oFusion to export my 3DMAX model.
1st:
I have a girl model with hair attach to head(the part of skeleton) and skirt attached on skeleton also.
But when I export it. Only the girl was export.
2nd:
When setting the export AnimationPoperties.
There is an option "Save to External File(skeletal only)".
It's wrote on UserGuide that
You can set a skeletal animation to be exported to an external ".anim" file, this files can be added to the object or character in your application when needed
External animation files can contain a single or a group of animations, animations that select the same group will be exported in the same file (the filename of external animation file will be the group name plus ".anim")
But when I export with my parts grouped. Still only girl were exported.
3rd:
If I only set AmbientLight in my OGRE program.
My exported mesh file wouldn't show the texture made by me.(only can show the simple color , those default by 3DMAX)
And it doesn't matter if I put a light in the scence.
Sorry got so many questions and my poor English.
and Thank in advance for your help.
Lioric
28-02-2008 15:17:52
Ypu need to attach the objects for a single mesh, or you need to prepare the other parts if you want a character made of multiple parts, see the "Using multiple parts characters" article in the knowledgebase section
The external animation file support is a Pro version feature only
What Ambient light value are you using?
wilsonwing
29-02-2008 06:07:37
Ypu need to attach the objects for a single mesh, or you need to prepare the other parts if you want a character made of multiple parts, see the "Using multiple parts characters" article in the knowledgebase section
The external animation file support is a Pro version feature only
What Ambient light value are you using?
I use the setAmbientLight function and set the value to (1.0f,1.0f,1.0f)
But doesn't work for my model.(But works for the robot, ninja...etc).
If I wanna to see the texture( made by myself )on my model.
I most set other lights( spot light or dirrect light ,for example) to see those textures.
Thanks for helping.
PS. I can't find the "Using multiple parts characters" article in the UserGuide. Do I need to download it from somewhere?
wilsonwing
09-03-2008 06:33:32
Here's some code about my light setting:
mSceneMgr->setAmbientLight(ColourValue(1.0f, 1.0f, 1.0f));
// Create the entity
mEntity = mSceneMgr->createEntity("TestModel","TestModel.mesh");
// Create the scene node
mNode = mSceneMgr->getRootSceneNode()-> createChildSceneNode("TestModelNode", );
mNode->attachObject(mEntity);
Light *light;
light = mSceneMgr->createLight("Light1");
light->setType(Light::LT_DIRECTIONAL);
light->setDirection(Vector3( 0, -1, 1 ));
light->setDiffuseColour(ColourValue(1, 1, 0));
light->setSpecularColour(ColourValue(.25, .25, 0));
If only set the setAmbientLight part , those texture draw by myself would not show.
Most add
Light *light;
light = mSceneMgr->createLight("Light1");
light->setType(Light::LT_DIRECTIONAL);
light->setDirection(Vector3( 0, -1, 1 ));
light->setDiffuseColour(ColourValue(1, 1, 0));
light->setSpecularColour(ColourValue(.25, .25, 0));
Is there any way that I only use the setAmbientLight and the model can be shown?
Really needs help
Lioric
10-03-2008 00:47:21
wilsonwing
11-03-2008 02:37:49
wilsonwing
21-03-2008 06:06:35
The support article for using characters made of multiple parts is in the support center, at the link below:
Working with animated multiple parts characters
In your material, set the "Emissive" color to white and all of the objects using this material will be displayed without the need of a light in the scene
See this tutorial, it includes using the Emissive color in objects material
http://www.ofusiontechnologies.com/support/1299/support_1299_00.html
I just finished transfering these guide into my language.
Setting "Emissive" color works.
And the "Support article for using characters made of multiple parts" helps a lot.
And now I encounter a new question.
I have three 3ds model with 1 body and 2 different hair.
I want to use the programming way to make the hair.mesh connect to body.mesh, so user can change the hair style.
( for example, use Ogre programming functions ,maybe getHeadSkeleton, if there is one...... still searching. And then do
entHair= mSceneMgr->createEntity("hair", "hair.mesh");
snHair = BodyNode->getHeadSkeleton->createChildSceneNode("hairNode");
If my concept it right, I think it might work.
)
However I got a problem.
I can export the body.mesh (a mesh with skeleton) but can't export hairA.mesh, hairB.mesh.
I can only export these hair models(with out skeleton) as .material file.
Sorry for asking so many questions, and eager for help.
Lioric
22-03-2008 23:42:12
Could you provide the scene (or at least the objects that are not being produced), i will take a look at it asap
In your case, if the hair object(s) dont need to be animated by the skin modifier, in the sense of the vertices being animated by different (2 or more) bones, then you dont need to add an skeleton to the hair object(s)
You can positionate the hair object in the correct position when the object is in figure or pose mode, and then move the pivot point of the hair and align it to the head bone, and export this object as individual, non skeletal animated objects
This way in your application, when the hair object is attached to the skeleton it will be correctly positionated and will move with the head (without the need for moving or translating it to fit in the correct position)
Use the "attachObjectToBone" method of the "Entity" (in this case the animated body), using the head bone name and the pointer to the hair entity object
Entity* hair = mSceneMgr->createEntity("hairA", "hairA.mesh");
// body is the animated Entity
body->attachObjectToBone("headBoneName", hair);
wilsonwing
23-03-2008 03:07:59
Could you provide the scene (or at least the objects that are not being produced), i will take a look at it asap
In your case, if the hair object(s) dont need to be animated by the skin modifier, in the sense of the vertices being animated by different (2 or more) bones, then you dont need to add an skeleton to the hair object(s)
You can positionate the hair object in the correct position when the object is in figure or pose mode, and then move the pivot point of the hair and align it to the head bone, and export this object as individual, non skeletal animated objects
This way in your application, when the hair object is attached to the skeleton it will be correctly positionated and will move with the head (without the need for moving or translating it to fit in the correct position)
Use the "attachObjectToBone" method of the "Entity" (in this case the animated body), using the head bone name and the pointer to the hair entity object
Entity* hair = mSceneMgr->createEntity("hairA", "hairA.mesh");
// body is the animated Entity
body->attachObjectToBone("headBoneName", hair);
First, Thanks for your help.
It is strange.
The first time I exported the hair mesh was after I had exported the body mesh.
It didn't work, only exported .material file for hair mesh.
However, when I had my computer restarted, and exported the hair mesh,
this time it worked.
And thanks for your help to the coding part