如何在Java中使用Blender模型? [英] How do I use Blender models in Java?

查看:409
本文介绍了如何在Java中使用Blender模型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

真的只是一个普遍的问题吗?

假设我正在制作一款游戏并在Blender中制作了角色模型。如何在Java中使用此模型?



我会以某种方式导入吗?



谢谢。

解决方案

通常,在blender中制作模型时,您可以使用允许稍后将其导入所选游戏引擎的格式导出模型,您使用的格式有所不同。



出口导入周期通常被称为资产管道,您一般希望保持简单和自动化因为它是您或您的艺术家定期执行的内容。

因此,如果我们看一些特定的图形引擎和平台,那么$ /

b
$ b


  • OGRE3D (或 Ogre4J )支持它自己的纯文本格式(.scene,.mesh.xml,.material.xml)以便加载场景,模型和材料。它还支持电影动画,还有一些支持直接加载.blend文件。请参阅其搅拌机文档

  • JmonkeyEngine 支持直接加载OGRE3D .scene和.blend。它也有它自己的二进制j3o格式,当你想打包游戏时可以转换成它们。有关具体示例,查看他们的教程



在决定如何使用模型时,您可以考虑多种格式。然而,当它被导入时,选择的游戏引擎会将其表现为一种内部结构,通常可以让您与选择的确切格式分离。



选择要使用的是不应该写在石头上的,因为要求可能会改变,如果做得好,它不应该对项目产生重大影响。如果您正在编写自己的引擎,这也是您应该考虑的事情。


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.

解决方案

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.

这篇关于如何在Java中使用Blender模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆