惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - ChenA

Fire and Motion[转载] terrain lighting radiosity lighting 很专业的Flash游戏 Water Simulate Decal Texture NVPerfHUD 不明白 晕,wow的alpha贴图的坐标要*0.95f 关于ROAM 四道题让你变猪头,敢不敢试一试?? 哈哈,今天晚上12:00魔兽世界公测 时光如梭 深圳抵制日※货※游※行 CWOW客户端首发 3C from max sdk CPU的另类用法
3ds max
ChenA · 2005-04-07 · via 博客园 - ChenA

经过两天的折腾,我已经受不了max了,真是太晕了。

昨天好不容易把map channel搞清楚什么意思。vertex color是0,1是regular texture,2-(MAX_MESHMAPS-1)是额外的通道 。访问的接口还不一样,0和1可以通过public member直接访问,晕。

今天在公司搞Max的材质树搞了半天,虽然导出正确了,还是不太明白。回家用understand c++一看,太清楚不过了,呵呵,这个软件真牛。


先来看Class MtlBase:
This is the base class from which materials and textures are subclassed. Methods are provided to access the name, flags, and sub-materials/maps.
材质和贴图类的纯虚基类。
看看它的声明(截掉了一部分成员函数):


再来看Class Mtl:
This is the base class for the creation of material plug-ins. This class provides methods to do things such as compute the properties of the material for a given location, return the number of sub-materials and access the properties of the material for the interactive renderer.
来看它的成员变量:
RenderData * renderData;储存
同样是纯虚类。


Class Texbmp:
This is the base class for the creation of texture map plug-ins. It provides methods for things such as calculating the color of the map for a given location, and computing a perturbation to apply to a normal for bump mapping.
唯一的成员变量:
int cacheID;    // used by renderer for caching returned values
还是纯虚类。和材质相关的几个函数是:
GetName(), GetUVWSource(), GetMapChannel()


Class BitmapTex:
This class is an interface into the Bitmap texture. All methods of this class are implemented by the system.
还是纯虚类,最终的纯虚接口,它的实现子类max sdk里没有,也没有成员变量。通过GetMapName()就能得到我们想要的纹理文件名。

再来看看下面几个函数:

ISubMap::GetSubTexmap();ISubMap::NumSubTexmaps();

Mtl::GetSubMtl();Mtl::NumSubMtls();

Mtl可以得到Sub Texmap,Mtl明明就是和Texmap平级的,而且Mesh::GetMtl()返回的是Mtl *,不是MtlBase *,我就不明白了,sdk上不是写的Mtl和Texmap都是材质树的一个节点吗?如果说Texmap不是一个节点,是Mtl的一个成员,调试的结果好像不支持这个结论。

Mesh::getFaceMtlIndex()得到是全局的Mtl索引,还是和Node相关的,Mtl怎么得到自己的Index了?

再来看看MtlList,MtlLib,MtlBaseList,MtlBaseLib。

分别是全局的Mtl列表,Mtl库,MtlBase全局列表,MtlBase库。

typedef MtlBase* MtlBaseHandle;
typedef Mtl* MtlHandle;
typedef Texmap* TexmapHandle;

class MtlList : public Tab<MtlHandle>

class MtlLib : public ReferenceTarget, public MtlList

class MtlBaseList: public Tab<MtlBaseHandle>

class MtlBaseLib : public ReferenceTarget, public MtlBaseList