Need artists help !

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Qlippoth
Gnoblar
Posts: 10
Joined: Sat Nov 20, 2004 6:25 am

Post by Qlippoth »

semicolon wrote:Hi Qlippoth:

Wow that looks very nice. My question is whether or not you are using MAX 6 to export your model. Right now I am using MAX 6 and having a problem with UVs and biped with bones. If you are using MAX 6, could your please explain some more about how you exporter your mesh with animation?
I am using MAX 5, I dont really know what the differencies are though..

When I did this model I first applied two HD solver chains to the skeleton because that solver made the movements most like the way I wanted them. Unfortunately that animation was not exportable since it seems the HD solver hides the properties of the individual bones. Then I tried to create similar movement using HI solvers with 'enable' off but that did not work as I wanted it to, the Dolphin looked very stiff =P In the end I just animated the bones by hand setting the keys for all the bones movement and rotation manually without a solver, that made them exportable without errors.

It would be really nice if there was a way to make the exporter to work with the solvers though since that would make animating much easier.

User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France
Contact:

Post by Banania »

Qlippoth wrote: When I did this model I first applied two HD solver chains to the skeleton because that solver made the movements most like the way I wanted them. Unfortunately that animation was not exportable since it seems the HD solver hides the properties of the individual bones. Then I tried to create similar movement using HI solvers with 'enable' off but that did not work as I wanted it to, the Dolphin looked very stiff =P In the end I just animated the bones by hand setting the keys for all the bones movement and rotation manually without a solver, that made them exportable without errors.

It would be really nice if there was a way to make the exporter to work with the solvers though since that would make animating much easier.
The IK controller hides the rotation controller of the bones it controls. That's why the script explodes when using an ik chain.

It should be possible to handle the ik case and retrieve the keys on the ik handle. However, I don't think these keys are gonna be enough to recreate the same smooth movement when used in Ogre. I think, it will be necessary in this case to sample the animation and create additional keys in between.

I'll come back to you later when I have time to give it a proper shot.
Banania

User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France
Contact:

Post by Banania »

myself wrote:I'll come back to you later when I have time to give it a proper shot.
As I stated in my previous post, the ik controller hides standard controllers for bones it controls.

I did try to export ik animation and I feel reasonably certain that it will work fine. However, as the keys are not available for all bones in the chain(at least, I don't know how to get them yet), I have to introduce another parameter in the export : IK sample rate.
It is necessary to generate keys for the ik animation. This parameter controls that.

A value of 2 generates one key every 2 frames, a value of 3 generates one key every 3 frames…..
A value of 0 is not possible and is then internally converted to a value of 1 by the script.

If you don't use any ik controller, this parameter will be ignored.

If you want to give it a try... same link as before :

http://bananialair.ifrance.com/bananial ... xport2.zip
Banania

User avatar
semicolon
Halfling
Posts: 94
Joined: Sun Jul 04, 2004 4:42 pm
Location: Bangkok, Thailand
Contact:

Post by semicolon »

Hi again:

I have sent you the model via the e-mail you posted. I have tested exporting the same model on both MAX 5.1 and 6. There is some difference in the UVs. In MAX 5.1 everything is very perfect. Only some small defective UVs are shown in some small areas.

By the way I have sent you the new model with biped and bones. However the file is in MAX 6. I also showed you how the UVs exported from MAX 6 were broken with the UVs exported from MAX 5.1.

I've heard about the IK translation feature from above. The would be very invaluable small feature for the world of animation, if the result is up to 80% close to the animation with IK in MAX. :D

Very cool!!
Semicolon
"Nature is the mother of learning"

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

I'm going to include this new version in the 0.15.1 release since even if the testing is not complete everywhere, it's a significant improvement over previous versions. Thanks Banania!

User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France
Contact:

Post by Banania »

semicolon wrote:I have sent you the model via the e-mail you posted. I have tested exporting the same model on both MAX 5.1 and 6. There is some difference in the UVs. In MAX 5.1 everything is very perfect. Only some small defective UVs are shown in some small areas.

By the way I have sent you the new model with biped and bones. However the file is in MAX 6. I also showed you how the UVs exported from MAX 6 were broken with the UVs exported from MAX 5.1.
Thanks. I had no time to look at it yet but I will soon.
semicolon wrote:I've heard about the IK translation feature from above. The would be very invaluable small feature for the world of animation, if the result is up to 80% close to the animation with IK in MAX.
It should work well. I am only concerned about the size of the resulting skeleton. I have to find a way to optimize the number of keyframes generated....
sinbad wrote:I'm going to include this new version in the 0.15.1 release since even if the testing is not complete everywhere, it's a significant improvement over previous versions. Thanks Banania!
Cool ! :D
Banania

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

I'm pleased to announce that due to his excellent work on the 3DS Max exporter, Banania now has direct commit access to the CVS version and so can maintain this directly now. Well done Banania!

User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France
Contact:

Post by Banania »

@semicolon : I had a look at the data you sent me.

I still do not understand why uv data would export differently from max5.1 and max6. Having read max6 documentation about mapping, it should work just the same way. Although I did not find any hint in the documentation that they messed around with mesh mapping methods, they might have. I'll keep on digging. BTW, how did you generate mapping coordinates for your "knight" model ? And also, very nice model, I love the style.....
If you can reproduce this kind of behaviour with a simple object, I would be interested in having the max file.

The Shelly model you sent me contains two point helpers but no bones. As they are part of the skin modifier, I assume this is what you want to export. Currently, only Biped Bones and Standard Bones can be part of the hierarchy. I could add export of helpers (and maybe any other object) when they are part of the skin modifier.

[EDIT]
Export of helpers is now allowed. However, they need to be included in the Skin(or Physique) list to be exported. This is not a max limitation but my own design choice. They don't need to have any vertices assigned but need to be part of the skin hierarchy. I might reconsider it if there is a legitimate need for it but for now, this is how it works.

A helper should not be the root of the hierarchy. Semicolon, in your model, you have a helper ("Center") that is the parent of the biped root object. I strongly recommend you don't do that kind of thing and always leave the Bip01 object as the root of the skeleton. Again, if there is a good reason to do that, I am open to discussion but I foresee nothing but troubles if we mess around with the biped hierarchy too much.

The changes are already in cvs. Tell me if you need a separate zip file for download.
[/EDIT]
Banania

User avatar
semicolon
Halfling
Posts: 94
Joined: Sun Jul 04, 2004 4:42 pm
Location: Bangkok, Thailand
Contact:

Post by semicolon »

Hi Banania:

First of all, I have to say I am glad that the updated version of the exporter is loaded of many useful functions. This is really help me a lot as a 3DSMAX artist. Many dream functions are generated pretty quickly.

The way I generated the UVs is by the UVW mapping and Unwrap UVW modifiers. I am not so sure what make them be exported differently. I might have done some funky methods on those model.

Also thank you for your comment on the knight girl. I will do UV unwrap on another model or I will check the other model which I can give away. (That knight girl is part of my commercial project, so I couldn't give you the whole part of it. Sorry about that.) Actually Shelly model was unwraped the same way as any other models I've made. (Since I know only one way to UVs. :D )

As for the way I rigged my character, I need other bone root that will not be affected by the bone parent of the character. Say if I rotate the bone parent of the character, that shouldn't affect the bone root. So the best way is I need an object (any kinds of object like box, dummy, point, etc.) to be the bone root. This bone root will be attached with the attachment points for equipments of the character. The reason I am doing this because this is to help me adjust the pivot point of the the attachment node. Since the attached object to the bone will allign the pivot point of the attachment bone. And bone always has unsustainable transformation. And also the pivot points of the attachment node should be adjusted to be able to have the attaching object be attached in the correct position and rotation.

I would like to ask you for the geometry object type to be as bone node as for the reason above. Or any type of objects from your suggestions for this case are very helpful as well.

However the stability of the exporter should come first. I wouldn't wish to mess up your codes for myself. I shall take the rules of the exporter strictly, if this will ruin your exporter as for others's.

Thank you for the information and the updated exporter.
Semicolon
"Nature is the mother of learning"

User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France
Contact:

Post by Banania »

I have corrected the uv export bug with max6. I still do not understand why it was behaving differently with max5.1 and max6. Actually, I am surprised it was even working with max5.1 :wink: My guess is that some structures were handled differently between max5.1 and max6 and max6 seems to be more strict about it.

But it now works fine with max6 (at least with Shelly) and I hope I did not break anything on max5.1 but I doubt it.

As for the bone root of the hierarchy, I am not really sure I understand what you want to achieve but I will see if it can be done.... of course if you can avoid it, that would be a lot easier for me :D

Changes are in cvs but as anoymous access will take hours to update, I also updated the zip file. Same link as before.....
That knight girl is part of my commercial project, so I couldn't give you the whole part of it. Sorry about that.
Don't be sorry. But if you have other characters, I would love to see them if you can show them.
Banania

User avatar
semicolon
Halfling
Posts: 94
Joined: Sun Jul 04, 2004 4:42 pm
Location: Bangkok, Thailand
Contact:

Post by semicolon »

Hi Banania:

I could export the UVs from both MAX 5.1 and 6 perfectly now. However I have a problem with the animation. When I add the animation to the mesh, the mesh just blew up. Still wonder why this happens. Any idea?

By the way I will send you the files after I am home.

Semicolon
"Nature is the mother of learning"

User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France
Contact:

Post by Banania »

No, no idea until you show it to me.

I worked on your helpers problem. I added this as an option of the exporter because I don't want this to be the default behaviour. But it is now possible to have a Point Helper (or whatever you want to use) as the root "bone" of the hierarchy. The only conditions are to check the new checkbox I added and to include your objects in the skin (or Physique) modifier.

These changes are not available yet. They will be soon....

[EDIT]
As usual, the changes are in cvs but I alse updated the zip as anonymous cvs needs time to be up to date. Same link as above ....
[/EDIT]
Banania

User avatar
semicolon
Halfling
Posts: 94
Joined: Sun Jul 04, 2004 4:42 pm
Location: Bangkok, Thailand
Contact:

Post by semicolon »

Hello everyone,

I need to inform you guys that I have downloaded the mesh viewer from the web site. I have converted the .skeleton.xml file with it. The result doesn't seem to be correct. I thought it was the exporter that didn't work well. But that was not quite true. So just let you guys know. (Should I inform this directly to Sinbad? Or this is what I should do... to inform everyone.)

Semicolon
"Nature is the mother of learning"

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

The MeshViewer is a community project and not directly supported by us - we provide it for your convenience only. The main author (cTh) has been absent for a while so it may very well be out of date.

The only tool we directly support is the official OgreXmlConverter, use that if you have doubts since that is validated much more extensively.

Rixeh
Greenskin
Posts: 135
Joined: Sat Nov 20, 2004 8:36 am

Post by Rixeh »

Don't trust the meshviewer! :shock: Seriously... I had normal maps working for days, but didn't even know it 'cause Meshviewer would append new text onto an existing .material file and mess everything up. Or the lighting wouldn't be correct and the mesh would look completely black. Load whatever you want to see into the actual engine -- it's the best way to test things.

Qlippoth
Gnoblar
Posts: 10
Joined: Sat Nov 20, 2004 6:25 am

Post by Qlippoth »

I have found something that looks like a bug in the new exporter.

When I got the new version i could not export anything, it just said
"no ""get"" function for undefined" or something like that.

I compared the code that caused the error with the same part from a previous version and found this:

Old version:

Code: Select all

		
if (exportColours) then
		(
			faceVertexColorIndices = getVCFace tmesh face ;
		)
		else
		(
			faceVertexColorIndices = Point3 1 1 1 ;
		)
		
		-- For each vertex whose face is made up of.
		for localVertexIndex=1 to 3 do 				-- LOOP on VERTICES --
		(			
		    vertexIndex = (int) (faceVerticesIndices[localVertexIndex]) ;
			vertexColorIndex = (int) (faceVertexColorIndices[localVertexIndex]) ;
			vertexNormal = getVertexNormalAccordingToSmoothingGroups tmesh face localVertexIndex;
		
New version:

Code: Select all

		if (exportColours) then
		(
			faceVertexColorIndices = meshOp.getMapFace tmesh 0 face ;	-- 0 is the vertex color channel
			faceVertexAlphaIndices = meshOp.getMapFace tmesh -2 face ;	-- -2 is the vertex alpha channel
		)
		else
		(
			faceVertexColorIndices = Point3 1 1 1 ;
			
		)
		
		-- For each vertex whose face is made up of.
		for localVertexIndex=1 to 3 do 				-- LOOP on VERTICES --
		(			
		    vertexIndex = (int) (faceVerticesIndices[localVertexIndex]) ;
			vertexColorIndex = (int) (faceVertexColorIndices[localVertexIndex]) ;
			vertexAlphaIndex = (int) (faceVertexAlphaIndices[localVertexIndex]);    -- THIS CAUSES THE ERROR
			vertexNormal = getVertexNormalAccordingToSmoothingGroups tmesh face localVertexIndex;
To me, it looks like something is missing in that 'else' part.
I added:
"faceVertexAlphaIndices = Point3 1 1 1 ;"
into it and that seems to make meshes export normally.

User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France
Contact:

Post by Banania »

I added:
"faceVertexAlphaIndices = Point3 1 1 1 ;"
into it and that seems to make meshes export normally
You are damn right. Thanks a lot....

EDIT: CVS has been updated....
Banania

User avatar
PeterNewman
Greenskin
Posts: 128
Joined: Mon Jun 21, 2004 2:34 am
Location: Victoria, Australia
Contact:

Post by PeterNewman »

Sorry to ask a silly question, but I'm unable to pull this from CVS.

Which/where in CVS are you putting this? ogrenew/Tools/3dsmaxExport ? When I try to update that folder, I'm not seeing any changes.

Or are you working in ogreaddons?

User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France
Contact:

Post by Banania »

ogrenew/Tools/3dsmaxExport
Yes, that's the place. Most of (if not all) the changes will be the scripts subdirectory.

FYI, I commit everything in the HEAD. I never updated the Hastur branch.
Banania

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

I'll be doing a 0.15.2 release soon and I'll back-merge the changes into Hastur then.

User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France
Contact:

Post by Banania »

Good idea.

That way, I won't have to start my posts by "Please upgrade to CVS and see if it still doesn't work" anymore. :wink:
Banania

User avatar
PeterNewman
Greenskin
Posts: 128
Joined: Mon Jun 21, 2004 2:34 am
Location: Victoria, Australia
Contact:

Post by PeterNewman »

Sigh. I still can't get it to work. I'm pretty sure I'm avoiding all the normal CVS traps, and I've been able to keep Ogre up to date using CVS (Hastur branch) (although it does say it's Ogre 0.15.0 still, so maybe I'm not so smart).

I'm not even seeing any differences if I diff Hastur against HEAD (for the 3dmax folder). Maybe I'm hitting a real slow CVS mirror, or something.

User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France
Contact:

Post by Banania »

Well, you are not the first one to have trouble with CVS. That's why I am keeping an archive available. You can find it here :

http://bananialair.ifrance.com/bananial ... xport2.zip

and at this very moment, it is perfectly up-to-date with <cvs.
Banania

User avatar
PeterNewman
Greenskin
Posts: 128
Joined: Mon Jun 21, 2004 2:34 am
Location: Victoria, Australia
Contact:

Post by PeterNewman »

Thanks, that's definately more up to date. No idea whats going on with CVS, I'm probably doing something wrong. That or one of the servers went down, had to be rolled back, so is out of date. OR its a conspiracy!

Post Reply