Cinematic Editor: Devlog#5

Hi
I have been studying the Netbeans Platform for the last 2 weeks or more.I have dug up a lot of docs and tutorials from their website, netbeans DZone and youtube and also made some demo’s/test projects of my own.Finally I have been able to wrap my head around Lookup, Actions, FileSystem,Window Systems,Nodes,Property Sheet and Explorer and DataSystem API’s to an acceptable level of detail.I have created a new FileType j3c for the editor. It stores the cinematic editor’s content as xml.(p.s the extension is j3c but the content stored is xml-like) For example,

<cinematic name=”myclip” duration=”30″>
<layer name=”character_1″ content-type=”j3o” res=”/assets/models/character_1.j3o”>
<event name=”walk_1″ start=”20″ duration=”10″/>
</layer>
<layer>…….
</layer>


</cinematic>

I am using JDOM API to construct my tree-type data structure from this file. The user will interact with the cinematic editor, which would modify the j3c file. The concerned listeners will then update the scene,cinematic,editor and data structure.
I plan to finish this by the end of the month or max before 4 August and release a prototype for everyone to check out.
There are a few things I need help with :

Undo/Redo - I would like to integrate this feature sometime soon. Can you suggest some good tutorial for me to get started ?

PermGen error - Whenever the text editor and the cinematic editor are simultaneously open, I get a java.lang.OutOfMemory Exception : PermGen space. I have using -J-Xms24m -J-Xmx1g -J-XX:PermSize=512m handles in etc\jmonkeyplatform.conf. I tried increasing all of these, but nothing good happened. My heap size remains fixed at 830mb no matter how much RAM is free and -J-Xmx is set to.

Cookies in FileType: I do not understand what they are or if they could be helpful in simplifying the project by giving it a better architecture.Should I be concerned?

I know this devlog is about a week late. I’m sorry for that. I needed some time to sort out and understand the Netbeans Platform Api’s as they didn’t seem quite intuitive at first.

Erf I guess we had a misunderstanding. J3c shouldn’t be an xml type it should be a binary type, saved using JME Savable serialization.
Anyway I guess that’s too late to change this, we’ll find a way to make that happen once gsoc is over.

ohhk. I think it can still be done without much hassle. Just to be on the same page, I should implement the Savable interface to all the classes that are to be included in the j3c and use the BinaryExporter to read and write them to the j3c(which is the primaryFile) when the editor is opened/closed right?? just as described here : https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:save_and_load

Yes I think thats what is meant, as this is the default save system for jme3.

Btw if you need/want also xml jme also has a xml exporter/importer for the Saveable interface.
com.jme3.export.xml.XMLExporter so both can be catered with that. :slight_smile:

I know this devlog is about a week late. I’m sorry for that. I needed some time to sort out and understand the Netbeans Platform Api’s as they didn’t seem quite intuitive at first.

I know how it feels :). About Undo/Redo there’s support both in swing and netbeans. It’s all about implement UndoableEdit and pass them to UndoManager . There’s a lot of documentation if you look at swing applications . To wire up with netbeans enviroment you should simple provide the undomanager in your Topcomponent and the magic should be done :slight_smile: .

2 Likes

So is there progress on the editor? I’d love to use it!

@Mathias Yeah, there has been progress but I haven’t updated the community yet. I’ll try to make the cinematic editor available as soon as possible. Had quite hectic 2 months academically and hence I couldn’t contribute much after GSoC’s official end date.I’ll keep you in the loop.

Okay thanks! I’m really looking forward to using it.

@Maany

So? Any progress? Sorry I don’t wann bother you :smiley: but I think this is really useful

Hi
Sorry to bring this post up. It almost passed a year since this topic. So is there any progress to cinematic editor since then ? Any New things happened ? Any Plan ?

As I said in that thread, I started work on an own CinematicEditor. It will not be as advanced as the one that was planned here but I hope to make it kind of usable. I just have a lot of stuff going on in school and private right now so development is a bit slow, but I will pick it up again in about a week when I will finally have finished that essay that I’ve been writing for half a year…

2 Likes

Thanks a lot . I am enthusiastically looking forward it.
The cinematic is a very great feature in JME . And it will be so so great if there is any GUI for it.
I hope developers put more attention on it.
I am now studding more so that I can do some contribution and help Our Monkey to grew up more
and more …
(Also I think @atomix also did some work for cinematic in their superb Atom Framework so just wanted to thanks them )

Hey. What’s the status of Cinematics editing in the SDK? I see that there’s a plugin installed called Cinematics Editor, but can’t find any GUI for it.

I cant tell you about the cinematics Editor but at least I implemented Motion Paths (which are the essential feature of Cinematics). Would be nice to have full Support in the SDK though, I will Check that

Is there a working example of Cinematic serialization anywhere? I’m trying it out and get an exception on what appears as an anonymous inner class(?) in Cinematic:
Caused by: java.lang.NoSuchMethodException: com.jme3.cinematic.Cinematic$1.<init>()

on this line:
cinematicEvents = ic.readSavableArrayList("cinematicEvents", null);
(so not the originating Cinematic, but this list, which is empty)

But I’ve gone through it (doesn’t have any inner classes), and extended classes, imported classes, added a few default constructors for good measure, where missing. I still don’t get around it.

I save it like this (this is a basic example with no events attached):
BinaryExporter exporter = BinaryExporter.getInstance();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
//exporter.save(cinematic, new File("assets/Cinematics", "TestCinematic" + ".j3c"));
exporter.save(cinematic, baos);

I’ve made a loader that looks like this:
BinaryImporter loader = BinaryImporter.getInstance();
loader.setAssetManager(assetInfo.getManager());
Cinematic cinematic = (Cinematic) loader.load(assetInfo);

(Also tried using File and InputStream directly)

So I had a brief look at the code of the Cinematic Editor and it’s only a stub so far, someone wanted to start a Cinematics Editor but never added content to it apart from icons.

As for the exception, I guess no one really tried serialization of Cinematics and/or it broke with the recent cloning changes. That’s actually the case with many parts of the engine, the only one to use read/write is the SDK.

A good question would also be why we read/write ArrayLists instead of the underlying arrays

For future reference: this thread has a link to the repo with whatever came out of the GSoC. (It’s inside this folder)