Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use Blender models in Java?

Just a general question really?

Let's say I am making a game and have made a character model in Blender. How would I use this model in Java?

Would I import it somehow?

Thanks.

like image 780
Garee Avatar asked Aug 20 '10 16:08

Garee


People also ask

Can you use Blender with Java?

There are input/output scripts available for Blender that will help you. Blend2Java, for example, is a set of Python scripts for use with Blender that will export to Java XML, which can be decoded with the standard java.

Can you insert Blender models into Roblox?

In general, importing your Blender models into Roblox is a simple task. When you do run into issues, like the 10,000 polygon limit issue, it's simple to use Blender's built in tools like Decimate to quickly fix your model.

Can you use Blender for 3D modeling?

blender is a free 3D modeling application and is part of the large Open Source community. The application is available for most modern operating systems for free, which makes it an ideal inexpensive platform for creating your own 3D models rather than downloading other people's.


1 Answers

Generally when making models in blender you export the model in a format which allows you to later import it in the game engine of your choice, which format you use differ in requirements.

The export-import cycle is often referred to as the "Asset Pipeline", and you generally want to keep it as simple and automated as possible since it is something you or your artists will perform on a regular basis.

So if we look at a few specific graphics engines and platforms;

  • OGRE3D (or Ogre4J) supports it's own plain-text format (.scene, .mesh.xml, .material.xml) in order to load scenes, models and materials. It also has support for armature animations among other things, there is also some support for loading .blend-files directly. See their documentation for blender.
  • JmonkeyEngine has support for loading both OGRE3D .scene's and .blend's directly. It also has it's own binary j3o format which these can be converted into when you want to package the game. For specific examples, see their tutorials.

There are multiple formats you can take into consideration when deciding how you want to use your model. When it is imported however, the game engine of choice represents it in an internal structure which usually allows you to be decoupled from the exact format of choice.

Picking which to use is and should not be written in stone since requirements might change and if done properly it should not have a considerable effect on the project. This is also something you should take into consideration if you are writing your own engine.

like image 97
udoprog Avatar answered Oct 06 '22 09:10

udoprog