3d建模加载,更新和在java中呈现 [英] 3d modelling loading , updating and rendering in java

查看:176
本文介绍了3d建模加载,更新和在java中呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是java 3d的新手。我遇到过这样的情况,我想在我的java程序中加载3d工程max或Maya等3d建模软件中开发的任何对象[作为示例鞋]的现成的开发3d模型,更新其纹理或颜色属性等。渲染它,然后将更新的模型显示给最终用户。

i am new to java 3d. i have encountered a situation like , i want to load ready made developed 3d model of any object [as an example shoe] developed in 3d modeling software like 3d studio max or Maya in my java program , update its texture or color properties etc. then render it and then display the updated model to the end user.

所以我问所有的3D专家我应该如何继续完成我的目标?
我应该将哪些输入加载到我的程序中?
如何更新加载的模型,渲染它并向最终用户显示更新的模型?

so i am asking all the 3d experts how should i proceed ahead to accomplish my goal ? which input should i load into my program ? how can i update the loaded model , render it and display the updated model to the end user ?

在简单的故事中,我想给我的用户能够通过他们的交互来修改3d模型,例如他们提供了3D模型的鞋子,例如默认颜色和纹理&一些领域,如鞋底颜色,如果他们选择红色,那么加载的3D模型的鞋底是红色(即更新),然后显示给最终用户用红色橡胶鞋底而不是默认颜色鞋。

请告诉我完成我的目标。

please, advice me to accomplish my goal.

推荐答案

首先确定,复杂的物体通常使用一些3D编辑软件,如Blender或Art of Illusion创建。这些程序可以将对象输出为几种不同的文件格式,最常见的是.obj文件格式:

Ok so first of all, complex objects are usually created using some 3D editing software like Blender or Art of Illusion. These programs can output the object into several different file formats, the most common being the .obj file format:

  • http://en.wikipedia.org/wiki/Wavefront_.obj_file

另一种常见的格式是.3ds,根据我的经验,它的工作量远远超过它的价值。他们为Java3D制作了一个.3ds文件加载器,页面可以在这里找到:

Another common format is .3ds, which in my experience is a lot more work than it's worth. They do make a .3ds file loader for Java3D, the page can be found here:

  • http://www.starfireresearch.com/services/java3d/inspector3ds.html

我的建议是使用.obj文件格式,使用起来要容易得多。您也可以为它创建自己的解析器,它不像听起来那么难。这样,您就可以准确了解对象如何加载到环境中。 Java确实附带了它自己的解析器,有关如何使用它的说明在这里:

My advice for you is to just use the .obj file format, it is a lot easier to use. You can also just make your own parser for it which is not as hard as it sounds. This way you know exactly how your object is being loaded into the environment. Java does come with it's own parser, instructions on how to use it are here:

  • http://www.vrupl.evl.uic.edu/LabAccidents/java3d/lesson08/indexa.html

我在使用Blender导出的文件时遇到了很多麻烦,不幸的是,他们可能已经解决了问题现在,但我不确定。当我以前做过更多的3D东西时,我只使用了Art of Illusion,甚至知道Blender更强大。 Blender可以在Mac上运行,但在适当设置的Windows上更平滑。祝好运!如果您需要一些示例代码让我知道,我会非常乐意为您发布一些代码。

I have had a lot of trouble with files exported with Blender while using this file format unfortunately, they may have fixed the problem by now but I'm not sure. When I used to do a lot more 3D stuff I just used Art of Illusion, even know Blender is a lot more powerful. Blender can be run on a Mac but is a lot smoother on windows with the proper setup. Good luck! If you need some example code let me know and I would be more than happy to post some for you.

幻觉艺术:

http://www.artofillusion。组织/文件#

Blender:

http://www.blender。 org / education-help / tutorials /

我不确定你希望用户如何能够改变对象。如果你希望他们能够改变鞋子的颜色或类型,或者什么都不是很重要。如果您希望用户能够更改花边长度或更改实际对象结构的内容,则需要深入了解3D结构。如果要更改颜色,只需更改材料即可。如果您想要更改鞋子类型,只需装入不同的鞋子。我希望这对你有所帮助。

Im not sure how you want the user to be able to change the object. If you want them to be able to change the color, or the type of shoe or whatnot that is not a huge deal. If you want the user to be able to change the lace length or something where you are changing the actual object's structure, that requires an in depth knowledge of 3D structure. If you want to change a color, just change the material. If you want to be able to change the type of shoe, just load a different shoe object. I hope this was helpful for you.

在评论中,你还谈到纹理映射,根据我的经验,在Blender中比在Blingder中要容易得多。在幻觉艺术中做。我可能会用blender来完成这个:

In the comments, you also talk about texture mapping, which in my experience is a lot easier to do in Blender than it is to do in Art of Illusion. I would probably use blender to accomplish this:

  • http://wiki.blender.org/index.php/Doc:2.6/Manual/Textures/Mapping/UV

John

这篇关于3d建模加载,更新和在java中呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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