Page 1 of 1

assimp metafile for dae? (solved)

Posted: 25 Mar 2012, 07:51
by saberRattler
Hey guys,

been trying to figure out the assimp metafile from:
http://springrts.com/phpbb/viewtopic.ph ... 65#p463265

currently I cannot download the AssimpTest file and do not know of any games that use assimp+metafile for their units.

I am trying to scale the model with the height command (is that even what it is for?). And trying to get it to rotate so it isn't facing the ground.

Code: Select all

model = {
		radius = 25.0,
		height = 40,
		tex1 = "steamcopter1.tga",
		tex2 = "steamcopter2.tga",
		midpos = {0,0,0},

		pieces = {
		  root = {
			rotate = {-90,0,0},
		},
			Untitled = {
				rotateZ = 90,
				}
		}
}
return model
I have read the chat with CarRepairer, and he mentions doing everything in blender. Sadly, I am still not getting the scaling or rotation in blender even with the suggestions there.

Does anyone have a model and meta that I can look at? Or a working link to the AssimpTest?

any other suggestions/beatings would be appreciated as well :D

Re: assimp metafile for dae

Posted: 25 Mar 2012, 08:29
by KaiserJ
it sounds like you need to reset your object origins (if you've got things facing the ground)

i don't use blender but look at stuff like pivot points (your model doesn't have 0,0,0 defined correctly)

sorry if this was bad advice i'm pretty drunk

edit: scaling via height command doesn't sound right. all scaling and positioning of objects should be done within your editor (blender, max etc)

Re: assimp metafile for dae

Posted: 25 Mar 2012, 08:51
by saberRattler
being in the Navy I appreciate the drunk advice, sometimes it is the best!

tried flipping in blender, no luck so far. Will try more tomorrow, have to get some sleep.

Re: assimp metafile for dae

Posted: 25 Mar 2012, 18:22
by saberRattler
Figured it out, switched model from .dae to .3ds and now it works.

Re: assimp metafile for dae

Posted: 25 Mar 2012, 19:02
by KaiserJ
good stuff man, glad you've figured it out!

really saves you a lot of anguish to use assimp rather than the old method of prepping models in upspring; or at least it did for me because it allows me to set origins etc in an environment that i'm comfortable in

Re: assimp metafile for dae? (solved)

Posted: 26 Mar 2012, 11:01
by SpliFF
3DS appears to have a slightly different coordinate system to other model types. I think the issue is that historically 3DS Max uses a different axis for "front".

The Assimp site says (emphasis added): "By default, all 3D data is provided in a right-handed coordinate system such as OpenGL uses. In this coordinate system, +X points to the right, -Z points away from the viewer into the screen and +Y points upwards. Several modeling packages such as 3D Studio Max use this coordinate system as well (or a rotated variant of it)."

I think it's implying that the correct rotation is not universal but application-specific. It may even be that Assimp assumes 3DS files were made in 3DSMax and rotates them automatically to match other formats. I ran into this issue myself and never did figure out what was "correct" but thankfully rotating the model via metafile or your 3D app isn't that taxing.

I suppose if you want to use DAE it's as simple as removing rotate = {-90,0,0} from your root object.

Re: assimp metafile for dae? (solved)

Posted: 05 Sep 2013, 06:43
by Kerr
3ds Max uses the proper right-hand coordinates(x > right, y > front, Z > up), it's spring that does silly things.. In spring y- is down, z+ is forward, and x+ is left...

And Assimp doesn't automagically rotate .3ds models

EDIT: necro, oops.