Use MOGRE for a non-interactive, machinima-like 3d app?

yannischris

02-01-2012 22:48:59

Hi all,
I am currently a CS PhD student and my research is on knowledge engineering and particularly on modelling film direction knowledge.

For the purpose of conducting some experiments, I have been searching the web to find a high-level, open-source 3D engine/API, preferably for Java but any other suggestion would be useful, with fair documentation/tutorials and an active community, that will enable me to easily generate some basic "film scene" examples programmatically, without having to go in the deeps of 3D programming. And this has to be done through code, rather than in some 3D platform like 3DMax or Blender.

For example I may need to generate a room, then place some objects (e.g. furniture, everyday-objects) and some human characters in it, and then create basic animations for the characters (e.g walk, sit on a chair or lie on a bed, bend, make simple gestures such as wave, point, hug or grab an object, etc). I will also need to move the characters around, so I need to be able to create motion paths (straight or curved) for translating the characters and the camera in space.

I have spent a lot of time checking out a large number of 3d/game engines and the truth is I have got quite confused... I don’t have any experience in 3D programming and for that reason I need the API to be as high-level and easy-to-understand as possible. Note that I don’t care about audio, networking or high rendering quality. Also I don’t want this to be interactive at all (as opposed to games). I just need to generate a rendered clip through code, according to a number of specific directives.

I came across MOGRE and it sounds really promising! But I am wondering whether MOGRE would be the optimal solution for what I need to do. Is it high-level enough to easily tackle this task? Or maybe it would be overkill? And, in that case, should I be looking for a simpler, higher-level 3D/Game Engine, or maybe some other type of Virtual Reality API? Any specific suggestions?

I will very much appreciate any help/tip/hint!

Tubulii

06-01-2012 10:09:54

Mogre is a managed wrapper for Ogre (99.99% complete).

And yes, it supports cameras, moving characters and advanced effects but aware that you will need to spent a lot of time to get into (M)Ogre because it has A LOT OF features and possibilities. In my opinion it is the best open-source graphics engine with many features and it's still developed. The community is quite active (especially in the main Ogre forum). The wiki is full of tutorials which covers nearly all basic needs.

I guess it will be more the overkill but it really depends on your effort and your wishes. For example NeoEngine (which is a commercial (and free) Ogre wrapper) has a (more or less) impressive showcase but _no_ tutorials. Axiom (which is a .net port of Ogre) is more or less the same than Mogre but a bit older... And Blender supports Python as programming language which (of course) can be used in the Blender Game Engine. If you know Python and Blender [and BGE], it IS a possibilty, too.

Long story short:
There is no out of the box solution with a click and drag editor and a play button.
Ogre is only a graphics engine (and Mogre the wrapper), there is no build-in editor. Of course there are such projects (e.g. Ogitor) and plug-ins for Blender, 3ds Max and Maya. Meshes and animations need to be created by yourself. Check out the Mogre samples to get an impression of Mogre and look into sample code and in the tutorials. Or look around (Axiom, NeoEngine, BGE). They are good, too.

Tubulii

Pyritie

06-01-2012 17:02:17

Yeah ogre's just a graphics engine. If you want something with an editor and more high level stuff right out of the box, I'd suggest something more like unity or UDK. The big advantage M/ogre has over game engines like unity/UDK is that it's more low-level and therefore a lot more flexible, but it also requires a bit more work to get things the way you want.

By the sounds of it though you're looking for something without much low-level control, so I think a full game engine would suit your needs better.

yannischris

11-01-2012 09:28:12

Hi Tubulii and Pyritie (and thanks for the replies :-),
No, I didn't mean that I wanted things to be done through a drag-n-click editor. On the contrary, I have this restriction, that everything should be done through code (except of course the modelling of 3d objects!). So, that said, I need the engine to be as high level as possible (e.g. much higher level that the OpenGL API).
So in that sense,
- Is Mogre considered high-level?
- Do you think that Mogre is appropriate for someone who is a pro developer, but does not have any experience whatsoever in 3d programming?
- Does Mogre support collada format (which is very rich in free content on the web)?
- Does Mogre allow one to define the position/orientation of a 3d object, frame by frame, by providing pre-determined values for translation/rotation for each frame?
- Does Mogre allow one to translate a 3d object along a pre-calculated motion path?
- Does Mogre allow loading of animations together with the loading of a mesh (in one object or separately)?
- Does Mogre allow one to activate multiple animations simultaneously, given that they are loaded together with mesh (e.g. walking cycle and waving hand at the same time)?
- Does Mogre enable one to code in advance transformations of a 3D object for specific time intervals, or activate/deactivate animations for specific time intervals, in order to generate a rendered clip through code?
For example, let's say I want to generate (through code) a rendered clip of 20 secs, in which a character model is static for the first 10 seconds, then translates from a point to another for five seconds (which means that the walking cycle should also be activated for that five seconds) and then stops and turns his head to the left while waving for another 5 seconds). What I need to do is to be able to code these actions in advance, so as to generate the rendered video programmatically. Is that possible?


PS: Sorry for the question bombing!

Tubulii

11-01-2012 19:11:33


- Is Mogre considered high-level?
The question is: Is Ogre a high level graphic engine? In my opinion yes, but I AM ONLY SPEAKING FOR MYSELF. Mogre as a wrapper is only makeup ;)
- Do you think that Mogre is appropriate for someone who is a pro developer, but does not have any experience whatsoever in 3d programming?
I was neither a pro developer nor had much experience in 3d programming and I managed it but I spent a lot of time ...
- Does Mogre support collada format (which is very rich in free content on the web)?
There IS a plugin for Ogre but I recommend to use Blender (2.49 (full) supported, >2.5 partially) or Max or Maya or [...] to export all meshes (or entire scene) to ogre mesh format (+ animation): here
- Does Mogre allow one to define the position/orientation of a 3d object, frame by frame, by providing pre-determined values for translation/rotation for each frame?
Of course, see Intermediate Tutorials for (very simple) walking and rotating samples
- Does Mogre allow one to translate a 3d object along a pre-calculated motion path?
Same as above
- Does Mogre allow loading of animations together with the loading of a mesh (in one object or separately)?
Mesh and animations are separated: .mesh for mesh and .skeleton for animations. Use Blender or Max or Maya or [...] to export them
- Does Mogre allow one to activate multiple animations simultaneously, given that they are loaded together with mesh (e.g. walking cycle and waving hand at the same time)?
Never done that (it is supported) but:
1. You could use different animations and blend them together at runtime
2. Look through forum..

- Does Mogre enable one to code in advance transformations of a 3D object for specific time intervals, or activate/deactivate animations for specific time intervals, in order to generate a rendered clip through code?
Advance transformation -> quauterions and you can fade and enable animations at any time... (and a lot more)
But I never rendered a scene into a file although I know that this question is answered in the (ogre) forum. Just look for it...

yannischris

11-01-2012 19:26:12

Ok, thank you for the very useful hints!
I will browse through the forum for more info ;-)

Pyritie

26-01-2012 14:47:50

adding to Tubulii's responses...

- Does Mogre allow one to activate multiple animations simultaneously, given that they are loaded together with mesh (e.g. walking cycle and waving hand at the same time)?As long as you have them in separate animations in your skeleton (like one animation where the top half of the body has no keyframes but the bottom half has some, and another animation where the top half has keyframes and the bottom has none), it's very easy to combine them. There's also a class somewhere in the wiki to blend between different animations instead of just instantly switching between them, but it only supports going from one animation to another. Shouldn't be too difficult to extend it to support any number of animations though.
- Does Mogre enable one to code in advance transformations of a 3D object for specific time intervals, or activate/deactivate animations for specific time intervals, in order to generate a rendered clip through code?
every frame you're given a "time since last frame" amount, which you can add to an overall counter. Then you can do something like "if elapsedTime > 20 seconds, start doing something else"