用 C++ 建模服装 [英] Modelling clothing in C++

查看:32
本文介绍了用 C++ 建模服装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望编写一些最终会绘制人体框架的软件(可以使用各种参数对其进行配置),并且计划是在假人上放置某种衣服.

I'm looking to write a bit of software that will end up drawing a human frame (which can be configured with various parameters), and the plan is to have some sort of clothing placed on the dummy.

我已经研究过 Blender、OpenGL 库以及其他渲染和物理引擎,我不是在找你告诉我如何做到这一点,但主要是我想知道有哪些库可以做这种事?

I've looked at Blender, and OpenGL libraries as well as other rendering and physics engines, I'm not looking for you to tell me how to do this, but mainly I'm wondering what libraries are out there to do this sort of thing?

因此,在 2d 中会有一个服装图案,然后系统(至少在理论上)将能够将其转换为例如衬衫的 3d 表示?然后把它放在人体框架上.我知道为此我需要做很多工作,但是在将衣服渲染到框架上,考虑碰撞以及它如何在框架周围掉落等方面,我一直在谷歌搜索,并找到了一些位,但想知道是否有 C++ 库可以做到这一点.

So there'll be a pattern for the clothing in 2d, then the system, (at least in theory) will be able to translate that in to a 3d representation of a shirt for example? And then place that on the human frame. I know there's a lot of work I need to do for this, however in terms of rendering the clothing on to the frame, and accounting for collisions and how it drops around the frame etc, I've been googling, and have found a few bits, but was wondering if there were C++ libraries out there that would do that.

我正在使用 Visual C++ 2010 进行开发,目标环境是 Windows 机器.

I'm developing using Visual C++ 2010, and the target environment is a Windows box.

要么那样,要么我需要上一些物理课.

Either that, or i'm going to need to take some physics lessons.

推荐答案

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

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.

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

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.

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

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.

有关更多学术类型资源,请查看 Game Programming Gems、GPU Programming Gems 和 Graphics Programming Gems 系列丛书.他们有很多很好的文章来解决诸如此类的图形问题.

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.

您可能要做的另一件事是多检查一下搅拌机.有一个有趣的项目叫做 MakeHuman

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

http://makehuman.blogspot.com/

这会自动完成在 Blender 中开发人体模型的过程.

That automates the process of developing human models in blender.

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

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

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

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

www.blendercookie.comcg.tutsplus.com

www.blendercookie.com cg.tutsplus.com

我希望其中一些有用.

这篇关于用 C++ 建模服装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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