在 C++ 担任服装模特

发布于 2024-10-21 04:49:26 字数 1539 浏览 11 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

迟到的我 2024-10-28 04:49:26

不幸的是,开发像您所说的那样的系统将非常困难。从好的方面来说,有很多易于使用的技术有望帮助您实现目标。

一般来说,这种类型的工作方式如下:您在建模程序(例如 Blender、3ds max、Maya、Softimage 等)中制作一些 3D 资源,然后在您的程序/游戏中使用它。您可以将这些程序视为只是吐出一堆 3D 坐标,您的程序可以在 OpenGL 或 DirectX 的帮助下将其加载到内存中并进行渲染。

建模和加载资源当然是开发生成点的算法的替代方案。这似乎就是您想要实现的目标。

坏消息是服装真的非常复杂。其中很大一部分原因是大部分都需要模拟布料动力学。问题的另一部分是,即使你有一个二维图案,你会如何让衣服贴合你的人体模型?皮肤紧吗?松动的?你将如何参数化它?任何有 3D 建模经验的人都可能会告诉您,将实际衣服放置在身体上本身就是一件苦差事。

尽管如此,一些业内最聪明的专业人士正在寻找更好的模拟布料的方法,以及更好的自动化资产创建的方法。

总而言之,简单的答案是,你尝试做的事情,尽管可能很有趣和高尚,但将是极其困难的,并且可能不会得到你想要的结果。

至于您可以从哪里获得更多答案:

如果您仍然有兴趣寻找一种自动将衣服固定到模型上的方法,我会首先浏览学术网站。寻找有计算机图形学研究项目的计算机科学系。那里你会发现很多有趣的东西。

如需更多学术类型资源,请参阅《游戏编程宝石》、《GPU 编程宝石》和《图形编程宝石》书籍系列。他们提供了许多解决此类困难图形问题的好文章。

您可以做的另一件事是多检查一下搅拌机。有一个名为 MakeHuman

http://make human.blogspot.com/

的有趣项目,它可以自动化在 Blender 中开发人体模型的过程。

有几个为模特穿上衣服的教程,看看这个:
http://www.davidjarvis.ca/blender/tutorial-05.shtml

有关服装的更多教程和搅拌机中的布料模拟,您可以随时查看

www.blendercookie.com
cg.tutsplus.com

我希望其中一些有用。

Unfortunately, developing a system like the one your talking about would be insanely difficult. On the plus side, there are alot of easy to use technologies that will help you attain your goal hopefully.

Generally, the way that this type of thing works is as follows: You make some 3d asset in a modeling program such as Blender, 3ds max, Maya, Softimage, etc, and then use this in your program/game. You can think of these programs as just spitting out a bunch of 3d coordinates, which your program, with the help of OpenGL or DirectX can load into memory and render.

Modeling and loading assets is of course the alternative to developing algorithms to generate points. This is what it seems like your trying to accomplish.

The bad news is that clothing is really really complicated. A big part of this is due to the fact that most of it requires simulating cloth dynamics. Another part of the problem is that even if you had a 2d pattern, how would you the manner in which the clothing would adhere to your human model? Is it skin tight? Loose? How will you parameterize that? The placement of the actual clothing on the body is a chore in and of itself as anyone with experience in 3d modeling might tell you.

Nevertheless, some of the industry's brightest professionals are looking for both better ways to simulate cloth, and better ways to automate asset creation.

In summation, the easy answer is that what your trying to do, as interesting and noble as it may be, is going to be extremely difficult and may not have the result your looking for.

As for where you can go for more answers:

If your still intersted in finding a way to automate clothing attatchment to models, I would start by looking around academic websites. Look for any computer science departments which have computer graphics research programs. You will find alot of interesting things there.

For more academic type resources look at Game Programming Gems, GPU Programming Gems, and Graphics Programming Gems book series. They feature many good articles that tackle difficult graphics problems such as these.

Another thing you might do is check out blender a little more. There is an interesting project called MakeHuman

http://makehuman.blogspot.com/

That automates the process of developing human models in blender.

There are a couple of tutorials for putting clothing on the models, take a look at this one:
http://www.davidjarvis.ca/blender/tutorial-05.shtml

For more tutorials on clothing and cloth simulation in blender, you can always check out

www.blendercookie.com
cg.tutsplus.com

I hope some of this has been useful.

若沐 2024-10-28 04:49:26

据我所知,布料被模拟为弹簧网格,这建议用于模拟的物理库以及对弹簧/布料物理原理的理解。虽然我还没有听说过专门为布料模拟定制的物理库,但毫无疑问,这个网站上的人会知道一个。

From what I remember, cloth is simulated as a mesh of springs which suggests physics libraries for the simulation along with an understanding of the physics of springs/cloth. I've not heard of a physics library tailored to cloth simulation though, but no doubt someone on this site will know of one.

假扮的天使 2024-10-28 04:49:26

这是关于布料模拟本身的答案。 (也许这不是你所关心的)

如果你想通过一些供应商中间件来模拟布料模拟 - 你可以尝试使用

  1. Havok(它是商业的)。在我看来,这支持任何碰撞对象,由三角形网格表示。
  2. PhysX(它是免费的),但是当您尝试使用它时,它会受到很多限制)。

如果您想亲手模拟布料物理,我可以建议您执行以下步骤:

  1. 刷新有关物理的基础知识(Interia,能量,牛顿定律。)
  2. 布料模拟和物理模拟的良好起点就是那本书
    http://www.amazon.com/Game-Physics-Pearls-Gino-Bergen/ dp/1568814747
  3. 阅读 Siggraph 中有关服装的文章。
  4. 考虑一下您需要哪些碰撞对象
  5. 考虑一下您需要什么力。
  6. 将这个挑战分解为
    广泛阶段/集成/碰撞检测/碰撞响应/约束求解器

我用C++、OpenCL开发了布料物理模拟。
我大约花了4个月的时间来开发,大约2个月的时间来调试stage5。
但那是我生命中非常炎热的时期,工作消耗了大量的时间。

It's answer about cloth simulation itself. (maybe it is not you're intersing in)

If you want to model cloth simulation by some vendors middleware - you can try to use

  1. Havok(it's commercial). It seems to me, that is supports any collision objects, represented by a triangle mesh.
  2. PhysX (it's free), but when you will try to use it there is a lot of constraints on it).

If you want to model cloth physics by you hands I can advise to you this steps:

  1. Refresh base knowledge about physics (Interia, Energy, Newton's law.)
  2. Good start point fo cloth simulation and also physics simulation is that book
    http://www.amazon.com/Game-Physics-Pearls-Gino-Bergen/dp/1568814747
  3. Read articles from Siggraph about clothes.
  4. Think about which collision objects do you need
  5. Think about what forces do you need.
  6. Split this challenge to
    Broad Phase / Integration / Collision Detection / Collision Response / Constrain Solver

I have developed cloth physics simulation in C++, OpenCL.
It takes me about 4 months to develop, and about 2 months to Debug stage5.
But it was very hot-time in my life, the job has consumed huge amount of time.

你不是我要的菜∠ 2024-10-28 04:49:26

除了您想要在应用程序运行时更改虚拟的部分之外,或多或少是游戏引擎的示例,例如 Esenthel Engine 。整个想法是为身体加载一个网格,然后在其上放置一个“布料”(布料已经在大多数游戏引擎中定义为物理类型)。但是当涉及到人体框架的运行时变化时,它变得有点棘手,因为你必须知道如何影响参数,这对于有机形状来说并不容易。

except the part that you want to change the dummy while application is running what you want is more or less the example of game engines like Esenthel Engine. the whole idea is to load a mesh for the body and then put a "cloth" (cloth is already defined in most game engines as physical type) on it. but when it come to runtime changes in human frame it becomes a little more tricky since you have to know how you are going to affect the parrameters which is not easy of organic shapes.

土豪 2024-10-28 04:49:26

如今使用的免费游戏引擎是 Unity 3d ...这一切都取决于细节,而且 Maya 和 3ds Max 是最好的建模程序。

Free Game engine to use these days is Unity 3d ... as well it all depends in the detail and as well Maya and 3ds Max are the best of the modeling programs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文