How can I write a .j3o blender exporter

During these 2 weeks of getting my personal jmonkey api setup for Ludum Dare I have realized that I cannot reliably export models into jmonkey I have been striving for a while now and I have given up on Ogre Xml it works 20% of the time. for ludum Dare i know i am going to create something in 2d.
After Ludum Dare I am going to strive to write a plugin for blender that exports in j3o format. I have never wrote a plug in before quite frankly it might be beyond my skill level but it will give me something to do and allow me to contribute to the community. So can someone give me advice on how i would go about writing a j3o exporter for blender. Or point me to a tutorial for writing plug-ins

You should look at the xbuf threads… as someone is already doing all of the (super really hard) work for you, basically.

There is a reason that there isn’t a good asset path… because it’s one step short of impossible. Not impossible, but very close to it.

So it isn’t “These crazy JME people why do they waste their time on so many things for so many years when assets are broken?!?”

It’s “that’s a really f-ing hard problem that no one has had the man-years to invest in yet.”

And by the way, a j3o exporter is a bad idea because that format may change from one version of JME to the next. The xbuf approach is so far the best one in my opinion.

can you shoot me a link for the xbuf threads. And i dont think any of the core developers are crazy. Because jme3 has more capabilities than any other java engine out there believe me i did the research. Jpct is right behind JME3 however the learning resources are terrible, and also j3o format might not stay???

http://lmgtfy.com/?q=jmonkeyengine+xbuf :smile:

1 Like

This is reason why I stopped coming to forums for answers and PM people directly most of the time

Sorry for that, but I think that you should be able to figure out the thread since there are 10 threads with pretty good names if you search for xbuf in this forum.

The current version of the j3o format doesn’t have a version number and new features may be added, which might affect the format.

You are aware that theres a .blend IMporter in jME though, right?

As already mentioned, the xbuf links are easy to find with the little search box up top. Given your other response, I’m not sure why I should be your personal search box, really. But I really want to understand something, why was replying and asking me to search for you faster than just searching yourself? Xbuf is the very first link if you search.

As to the other, j3o is never meant to be an interchange format. A particular j3o might break from one version of JME to the next as features are added or things are rearranged, etc… While we try to maintain some level of backwards compatibility, things might break that require a developer to regenerate their j3o files from the original model.

For me, there is another reason why this is an bad idea.
Currently the only way to “protect” your assets ( models ) is to use j3o objects, if there is a easy way to convert j3o back to blender, so there should be a way to prevent it from happen, like encrypting flagging, I do hope the guys that are doing this really think on this problem.
Currently, the only reason that anyone could say this engine is bad is the assets exposure.

He’s talking about going the other way. blender → j3o not reverse.

And anyway, yeah, we haven’t put too much effort into the impossible. It’s impossible to protect assets in general and there are many non-JME ways to pretend to do it.

Hey, its possible to completely protect your assets, you just can’t load them into your own game anymore then :wink:

I doubt they are completly save then, someone could try to load from /dev/random untill suddenly your assets are there.

There is a tool that can save & capture everything you form to the screen. There they need to be opened anyway. Works with DirectX only, I’m not sure. I haven’t tried it. But the point being that I think in the end it is futile battle. Like copy protection on games. They just have a risk to hinder the legal use and complicate your own use. I wouldn’t count on any protection.

You can also have some monkeys type in zeroes and ones for infinity ^^

Thats how my dev/random is implemented. Of course, how else to do it?

I tried this and the complete works of Shakespeare kept ending up in my game.

I haven’t gotten an answer to the OP. Which is can someone point me in the direction to get started writing a blender EXPORTER for j3o format. Or is it impossible like pspeed says.

It’s not a good idea to write a j3o exporter as pspeed explained:

And as someone else already writes an exporter (not to .j3o as that is nonsense) there is no point in trying to write your own.

Thank you for an easily understandable response. After ludum I will probably be done with jmonkey since it is impossible for ME to reliably use it as a 3d engine

Well you won’t have much luck importing random models from the internet or models with messed up faces, “blender materials” and things like that into any engine. “Game ready model” means a very specific thing (as we describe in the blender import tutorial). But yeah, for other engines theres asset shops with properly made models so that’ll probably be easier.