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.

What should I be looking for? A 3D Engine? A game Engine? Some other type of Virtual Reality API? Any specific suggestions?

Hello v71, Indeed I have stumbled upon Unity3D while searching. Following your advice I gave it a better look and It looks really nice! But what I wasn't able to figure out is: Can I use C# to generate an entire scene exclusively through code (i.e. without touching the Unity GUI) or is C# used to add scripts to a scene that is made in the GUI?

v71
—
2011-12-22T21:12:47Z —
#4

I don't use Unity, but as far as i know you need to import resources in the editor . I think you are referring to procedural generation of a 'level' this can be done in every language , but if you want an fps level ,for example, you need to create in an external editor and then import into Unity.

alphadog
—
2011-12-22T22:50:09Z —
#5

Blender is scriptable. Apart from Unity, which itself may be overkill for your needs, I would look at Blender again. It has real-time interactive capabilities on par with simple game engines. Unity3D is more capable, but Blender may give you different modeling/animation options.

yannischris
—
2011-12-23T02:16:54Z —
#6

What I didn't mentioned before is that I don't need the generated result to be interactive at all (as opposed to games). Just a pre-rendered clip, according to a set of specific directives. No real-time rendering/interaction.

For example, let's say: "Man walks towards the couch, then sits on couch" "Woman is waving at man and at the same time walking towards door" Camera initially follows man from behind. Then camera turns and shows woman as she walks towards door"

So what I need is an API that will enable me (assuming I have the 3d assets) to write a set of commands (e.g. man = new 3DObject("man.obj"); scene.add3DObject(man); ... man.Animate(...); camera.Rotate(0, 0, 0.5); etc) which, when executed, will generate a rendered clip with a couch, a door, a man and a woman, and the animations of the characters and the camera according to the above description. Can Blender/Python provide this kind of functionality? Is there a 3D engine/API that provides a higher level of abstraction for such tasks than Blender?

You may want to do a search and find the favorite engines for this type of thing. Possibly join a forum and get some advice from people that are doing it.

alphadog
—
2011-12-23T14:21:27Z —
#8

Are you both creator and presenter of the content? And, will the content be generated ahead of time?

Assuming you mean you will prepare things ahead of time programatically and then show it later, rather than some real-time and/or interactive component, then something like Blender is what you want. If there is a real-time interactive component, then you want a game engine (and a good word for it is machinima, as fireside says). With a game engine, you trade quality and post-production capabilities for real-timeyness. For example, the uber-popular Red vs Blue is mainly machinima, where the visual are created in-game in Halo and the audio is dubbed over.

fireside
—
2011-12-24T04:33:32Z —
#9

If you want a lot of assets and you can use a commercial game, take a look at Sims3. Do a search on youtube for Sims3 machinima. There are some pretty good ones.

yannischris
—
2011-12-24T14:31:37Z —
#10

Hello guys and thanks for helping out!

Fireside, You are absolutely right, the concept of Machinima fits most what I have in mind, but without the need for high-quality/high-detail modeling/animation/rendering. Also I am not sure if Machinima techniques focus on programming (correct me if I am wrong).

Sims3 engine sounds like an ideal solution for my needs, but, unfortunately, because of the academic context (and also because of the economic crisis the engine "has" to be open-source/free.

So the question is whether there is such an open-source Sims-like, Machinima-oriented, high-level 3D engine out there, which also maybe includes a number of 3d assets (e.g. basic human mal, female) or is compatible with e.g. collada format, which is a strong resource for common creatives?

Alphadog, Yes, if I am getting it correctly, "prepare things ahead of time programatically and then show it later" reflects what I want to achieve, with "later" meaning a second after the preparation (through code) of the scene is completed.

To make it more clear: Imagine some custom GUI with a "go" button, which calls the 3D engine API to generate the scene according to user input, and then display the resulted rendered clip (which definitely need not be production-quality high-detailed modelling/animation).

So do you think that Blender is the optimal solution for that purpose? Do you happen to know of some other 3D engine (e.g. jMonkey, Ogre/Mogre, Panda3D, Xith, Irrlicht, Pixellight, Horde, and the list goes on forever…) that could make things easier for a non-3D programmer, being more high-level, easy-to-learn/understand, straight-forward and all?

fireside
—
2011-12-24T19:39:59Z —
#11

I think Blender would probably be your best bet then. It has a lot of connect the blocks type thing for programming, or you can program using python. You can get some free resources at the Blender model repository:

You'll probably need to set way points and script for character action. I haven't used it for a long time. Automating camera action is a little easier as you can save the motion as an animation and call it from a script. It's going to take time for Blender or any engine to learn. It's not an overnight deal.

There is something called Platinum Arts Sandbox that's supposed to be really easy to program. You could also look at that. I don't have any experience with it.

yannischris
—
2011-12-27T18:02:54Z —
#12

I looked into Blender API and it seems that Python is used for editing data just as from the interface. But, from what I understood, the 3d models have to be loaded in the GUI. Am I missing something? Can Python be use exclusively (i.e. without opening the GUI at all) to create a scene from scratch, and render it to create a video result?

fireside
—
2011-12-28T02:39:54Z —
#13

Can Python be use exclusively (i.e. without opening the GUI at all) to create a scene from scratch, and render it to create a video result?

No, you would want an engine like Panda3d for that. The trouble there is their model format is a little strange. You apparently want an engine that doesn't use an editor. Those are somewhat going out of style. It's a lot harder to place objects, etc. There's a little java engine called jpct that does that. It mainly uses md2 models which are a pretty old standard. I think you can still do that with JME, java monkey engine, but they are using an editor now. I don't think you have to use it, though. Those generally aren't considered high level engines which is why everyone gave you advice for engines with editors. I guess I would look at those two, Panda3d and JMonkey. Another choice might be c# and xna. The only thing the editors are doing is placing models, so what you are asking doesn't make a lot of sense unless it's some school requirement.

yannischris
—
2012-01-03T00:18:09Z —
#14

Yes fireside, you are absolutely right! It's a restriction and has to do with my phd research. So, on the one hand I need an engine that is as clean, straight-forward and high-level as possible, and on the other hand I need to make my own custom, simple "editor" that calls the API and according to high-level user input creates the scene (i.e places models and then animate them) in the form of a rendered clip. So, you think I could go for JME? In what sense JME is not considered high-level, as you mentioned? Is it because of the volume of code you have to write? What about JPCT, Env3D or Xith3D in comparison to JME? Are they more high-level in terms of code-abstraction?

JarkkoL
—
2012-01-03T03:01:43Z —
#15

If you like C++, you can use Spin-X

Cheers, Jarkko

yannischris
—
2012-01-03T11:09:25Z —
#16

From what I saw, Spin-X has been inactive for over a year, which is not particularly good for someone who is very likely to need help So the question remains regarding JME.

@fireside: In what sense JME is not considered high-level, as you mentioned? Is it because of the volume of code you have to write? What about JPCT, Env3D or Xith3D in comparison to JME? Are they more high-level in terms of code-abstraction?

fireside
—
2012-01-03T11:34:45Z —
#17

What about JPCT, Env3D or Xith3D in comparison to JME? Are they more high-level in terms of code-abstraction?

They are going to be similar, but all have their own quirks. Probably your biggest concern will be finding a model format that you can get into the engine easily. For you, I would think collada. Otherwise, you can use Blender to change model formats, but some of Blender's aren't very good. Milkshape3d has pretty reliable model exporters. Anyway, that will probably be your main concern and the first thing you should check out. None of those engines will be drop dead easy to use. They will take some study. You could include Ardor3d in there also. That looks to have some of the best model imports. Engines are easier than using DirectX or Opengl, but still take study and have quirks. They can only make it so high level and still make it able to do most anything. Since you already know java, that's a big plus. It will just mean learning specific functions for what you are doing, but what you are doing will not be that easy. It's sort of like setting up a little movie system. Some professional software like that has taken teams of people years to write. I'm sure you will be doing something much more basic, but still, it's going to take some time. Find some free models that include animations and try to get them into the engine. That will be your biggest concern. There are some free bvh animation files if the engine can use it etc. The rest you can work out, but getting models that do animations you want that are free is not going to be that easy, I don't think. Anyway, it should be your #1 priority, otherwise you might do some work and find out you can't get animated models in there. Importers and exporters can be quirky and you don't want to have to work that out with everything else you need to do.

yannischris
—
2012-01-03T12:45:28Z —
#18

Fireside, thanks for the very useful advice! Yes what I am trying to do is more of a proof-of-concept, prototype thing rather than a complete, commercial-like application. Still, I am not planning to do everything with hardly any effort I just want to be as sure as possible where to start from. And you are absolutely right about the model import issue, and yes I also thought that I should go for collada, as there is a large volume of free content in this format on the web. Do you suggest that I should use Milkshape3D to convert the collada to other formats in case collada is not supported by a certain engine, rather than selecting another engine only because of the collada incompatibility? Can I also change the format of any animations that go with the model? Should I also be checking the tutorials/example volume for each engine I check out? Isn't this critical in the process of learning the engine? For example, the reason why I excluded Ardor3D from the list, is that I read around that it's very poor in tutorials etc.

fireside
—
2012-01-03T13:33:50Z —
#19

Should I also be checking the tutorials/example volume for each engine I check out? Isn't this critical in the process of learning the engine? For example, the reason why I excluded Ardor3D from the list, is that I read around that it's very poor in tutorials etc.

Make sure that you are getting current information, and be careful about advice because it can be all over the map. People will basically say anything without much experience, or they may have tried it years ago. Ardor3D looked to have some decent tutorials from my brief inspection. It looks like it's being worked on a lot, which is important. It has procedural animation, which you might find necessary or useful. I haven't used it, so I can't really say, but my guess is it would be acceptable and it does have a lot of model import formats.

Your most important asset for any engine is the forum and knowledgeable people that are willing to help and respond fairly promptly. You can convert models with a program like Milkshape or some others, but it's one more step in the chain, so if it can be eliminated, that's generally better. Also, see if there are any demo's that are close to what you are doing as you can build off of them rather than starting from scratch. That might not be acceptable for a school project, however. It still helps to at least look at other code.