www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: yannischris on December 26, 2011, 02:30:55 pm

Title: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: yannischris on December 26, 2011, 02:30:55 pm
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 JPCT and it sounds really promising! But I am wondering whether JPCT 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!
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: EgonOlsen on December 26, 2011, 08:38:54 pm
I'm not sure...while jPCT can of course handle this, it depends on how much you want/have to invest in the coding side of things. I suggest to give it a try and see if it might be what you are looking for. Maybe this is interesting for you too: http://www.jpct.net/forum2/index.php/topic,2346.0.html (http://www.jpct.net/forum2/index.php/topic,2346.0.html)
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: yannischris on January 02, 2012, 10:43:27 pm
I don't mind spending some time coding My main concern is whether the learning process will be manageable for someone who knows Java but does not have any experience in 3d/game programming. Do I have to spend a lot of time initially just studying, or the learning process is more hands-on (through tutorials, examples, etc)? Are the tutorials/examples sufficient for providing basic understanding/knowledge/utilization of JPCT? For example comparing to Java3D JME, do you find JPCT easier or harder to pick it up? And in which way? Also do you consider higher or lower level, comparing to the aforementioned engines?
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: EgonOlsen on January 03, 2012, 09:00:21 pm
The goal of jPCT was (and still is) to create a 3d engine that is easy to use. But as i'm the author of it, i can't tell you if i've succeeded. Judging from the feedback, i would say yes...but i'm not going to judge the other engines...
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: AGP on January 03, 2012, 09:13:32 pm
jPCT was by very far the easiest and most intuitive 3D engine I'd ever seen back in '05. I think something like Unity might be a lot easier for something like non-programmatically setting up a scene. It might be overkill, though, and it seems that it has to be done programmatically to begin with. So, I would definitely go with jPCT.
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: yannischris on January 04, 2012, 01:35:23 pm
Thanks for the useful advice, I will definitely give it a try!
Two last questions:
- Which formats for model import does JPCT support? The collada format (which is very rich in free content on the web)? Is there a way of converting collada format in the formats supported by JPCT?
- Is there a way to define a path (e.g. a curved path) and then translate an object along this path?

Thanks again, I will give it a try and send you feedback!
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: AGP on January 04, 2012, 06:03:36 pm
Raft's Bones for jPCT (see the jPCT's download page) imports Collada and Ogre. The jPCT ones can be seen here: http://www.jpct.net/doc/com/threed/jpct/Loader.html (http://www.jpct.net/doc/com/threed/jpct/Loader.html)

I've defined a path of SimpleVectors and had a car move along it (rotating apropriately) before, but jPCT, being a graphics (not a game) engine, doesn't have this pre-built. Egon's very good at helping you get it yourself, though.
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: yannischris on January 04, 2012, 06:10:05 pm
Ok, thanks for the useful advice!
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: EgonOlsen on January 04, 2012, 09:04:03 pm
but jPCT, being a graphics (not a game) engine
I couldn't have said this any better... ;D
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: yannischris on January 05, 2012, 04:00:17 pm
But, being a renderer, I suppose that it will allow me to define the position/orientation of a model, for each frame, with pre-calculated co-ordinates, instead of defining a motion path?
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: EgonOlsen on January 05, 2012, 08:19:57 pm
Yes, of course.
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: AGP on January 06, 2012, 02:06:39 am
Quote
I couldn't have said this any better...

I think you did once say it to me. :- )
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: yannischris on January 06, 2012, 12:28:47 pm
OK, and one last thing: Does JPCT allow the loading of animations together with the loading of a model? And, if yes, does it allow for simultaneous animations to be executed (e.g. translating in space, walking cycle and waving hand at the same time)?
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: EgonOlsen on January 06, 2012, 09:25:13 pm
Out of the box, jPCT can load MD2 models, which are pretty simple, keyframed animations which include everything. If this isn't flexible enough, you have to use skeletal animations. This can done using Bones: http://www.jpct.net/forum2/index.php/board,10.0.html (http://www.jpct.net/forum2/index.php/board,10.0.html)

Translations/rotations are usually not part of an objects animation and can be done independently from any animation. Mixing animations is only possible if you split the model and apply different animations to the different parts.
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: AGP on January 07, 2012, 04:30:34 pm
Unless you're talking something like a smiling animation and a walking animation (a vertex and a skeletal one). Those can be combined by a process called animation blending (raft's Bones does it).
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: yannischris on January 11, 2012, 01:50:02 pm
Yes you are right, I am not talking about mixing facial with skeletal animations. Just combination of skeletal animation (e.g. walking cycle and simultaneously move hand). So, you mean that I can load an object file that contains the mesh and both animations, and then through JPCT enable both animations at the same time?!
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: AGP on January 11, 2012, 06:25:19 pm
No, Egon meant that you can't do that. Only way to do it would be to have a two-part model (one for the legs, another for the upper body). Just make a single animation that both walks and moves the hands, though, it's simpler.
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: yannischris on January 11, 2012, 07:51:07 pm
Oh I see... I guess I interpreted the Egon's reply, according to what I wanted to hear ;-)
And one last critical question, that I forgot to ask before:
Does JPCT enable one to code in advance transformations of a 3D object for specific time intervals, as well as 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?

Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: AGP on January 11, 2012, 08:11:32 pm
jpct wouldn't do that for you. You would have to write your own code, but it sounds simple enough and Egon, myself, and others could help you out if you run into a problem.
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: yannischris on January 11, 2012, 08:23:04 pm
Yes of course, I don't mean that this should be ready-to-use. I was just wondering whether the structure of the engine allows for this kind of programming, to cut it short, if this is doable at all!
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: AGP on January 11, 2012, 08:28:04 pm
Very, very doable.
Title: Re: Use JPCT for a non-interactive, machinima-like 3d application?
Post by: yannischris on January 11, 2012, 08:29:28 pm
That's great!
Thanks for the very useful info! :-)