Comments (7)
I'm not too familiar with the G3DB format. Looking at the format specification it seems that it's just the G3DJ file with no line breaks and written as a byte array but I can be wrong.
Anyway I found out there's a UBJsonWriter class in LibGDX nightly so I'll try to use that to write a converter in Java that will batch convert G3DJ files in a folder.
Thanks for trying my converter and for the suggestion.
from libgdx_blender_g3d_exporter.
Maybe we could ask Xoppa to have more detailed explanations on the binary format.
from libgdx_blender_g3d_exporter.
That was quick.
https://github.com/Dancovich/libgdx_g3db_converter
As I imagined the G3DB format is just a JSON format output as a byte stream. There are certain details about the binary format like how many bytes to use for long
, char
, etc.
So I just used the provided UBJsonWriter. It really can output any JSON file to binary format, not just G3D models, and it already takes care of binary format issues.
Did some preliminary tests with a default model and it loaded without issues. Just remember to instantiate your model loader with G3dModelLoader loader = new G3dModelLoader(new UBJsonReader())
. Notice the use of UBJsonReader instead of JsonReader, it's necessary or else your model won't load.
I'm closing this issue for now. Please, if you can, do some testing and post any issues you find in the converter repository.
from libgdx_blender_g3d_exporter.
Nice ! thanks.
I'll have a look ASAP
from libgdx_blender_g3d_exporter.
Just to be sure to understand : with the UBJsonWriter
I can write a g3db file from a g3dj file red using G3dModelLoader loader = new G3dModelLoader(new UBJsonReader())
?
Would it be hard to write it from the exporter plugin (I don't know python, or not yet ^^ ) to avoid having to use some code for writing the binary file ?
from libgdx_blender_g3d_exporter.
Just use the code on the link I provided.
https://github.com/Dancovich/libgdx_g3db_converter
This code will read a folder and output any g3dj files it finds into a g3db file. The README.md contains usage instructions. You can call it from the command line, no need to embed it into your code.
This code depends on the main GDX library. If you use Maven the provided pom.xml is already configured to depend on it.
from libgdx_blender_g3d_exporter.
Ho I see :-)
Thanks a lot for this fast work you did !
from libgdx_blender_g3d_exporter.
Related Issues (18)
- Cycles node editor HOT 2
- 2.78 support? HOT 4
- Exporting unused parts
- Export fail if scene only contains animation HOT 4
- Export issues HOT 4
- Another export issue HOT 5
- Texture missing HOT 2
- Texture file name, and Material.emissive property HOT 3
- Can't export with texture HOT 2
- bpy.ops.export_json_g3d scene arguments HOT 1
- Won't work with blender 2.8 HOT 2
- armature animation error
- Needs an update to blender 2.74 HOT 4
- Y-up and G3DB support HOT 2
- Dope sheet actions don't get exported HOT 10
- Some python error stack trace when tried to use it. HOT 7
- Export doesn't include animations HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgdx_blender_g3d_exporter.