关键词不能为空

当前您在: 主页 > 英语 >

DS MAX标准文本导出格式ASE的文件结构

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-01 21:50
tags:

-

2021年2月1日发(作者:classify)





3DS MAX


标准文本导出格式


ASE


的文件结构< /p>




如果你正在寻找它的几何体存放在哪 的话,事实上,这不是描述具体信息层级关系的图示,


而是类似


XML


的一种


存储规范


,它具有


独立标签



嵌套标签


,独立标签有


名称



值表


,而


嵌套标签不仅可以


嵌套子标签

< br>,


还可以


嵌套



子嵌套标签




如此递归下去 。这种格式固然带


来很大的灵活性,


但是非常浪费时间。


需要对它们


全部解套然后利用一致的算法


,< /p>


提供一个


匹配标签名进行标签取出和迭代。



*3DSMAX_ASCIIEXPORT 200


*COMMENT


版本




2.00 - Wed Sep 19 22:16:39 2007


*SCENE {


*SCENE_FILENAME


*SCENE_FIRSTFRAME 0


*SCENE_LASTFRAME 100


*SCENE_FRAMESPEED 30


*SCENE_TICKSPERFRAME 160


*SCENE_BACKGROUND_STATIC 0.00000000 0.00000000 0.00000000


*SCENE_AMBIENT_STA


TIC 0.00000000 0.00000000 0.00000000


}


第二行使用了双引号对值进行了限定,


避免被分割成子单元。

< p>
我们可以假设


*SCENE


块还可


以内嵌子块,


假如存在,


便可将此子块作为独立单元进 行递归分解。


直到所有嵌套子块全部


被遍历。

< br>





* QUICK NOTES *







This tutorial shows how to load a .Ase file.



An ASE file is a 3D Studio Max ASCII file


that saves all the information in a text file instead of in binary.




The good thing about this is that it's easy to read in, as well as easy to change without


having the software. The bad thing is that it's a HUGE file size, it takes a lot longer to read


in, no other programs support it and it can't even be imported back into 3D Studio Max.



I






would recommend looking at this tutorial before you look at the 3DS tutorial though.



That


way you can see what is actually being read in.





Let me mention that the math functions above are not so important and don't need to be


in this file.



I wanted to show how to calculate vertex normals so your models would have


some excellent lighting.



You most likely have functions already that do the basics so I


encourage you to just use those.



This will cut down the code significantly.






* What's An STL (Standard Template Library) Vector? *




Let me quickly explain the STL vector for those of you who are not familiar with them.




To


use


a


vector


you


must


include



and


use


the


std


namespace:


using


namespace std;




A


vector


is


an


array


based


link


list.



It


allows


you


to


dynamically


add


and


remove


nodes.




This is a template class so it can be a list of ANY type.



To create a vector of type






vector myIntList;




Now you can add a integer to the dynamic array by saying: _back(10);




or you can say:



_back(num);.



The more you push back, the larger




your array gets.



You can index the vector like an array.



myIntList[0] = 0;




To get rid of a node you use the pop_back() function.



To clear the vector use clear().




It frees itself so you don't need to worry about it, except if you have data




structures that need information freed from inside them, like our objects.






Let's go over some of the format of the .Ase file.



I will only address the information that


we really care about for object loading.



The rest is Scene stuff.



I created a single box


around the origin that had a texture map over it to show




the simplest and smallest amount of data.







This next block is the material block.



This holds all the info on the materials.






*MATERIAL_LIST {




// This is the tag for the start of the material info




*MATERIAL_COUNT 1




// This tells us how many materials there are




*MATERIAL 0 {





// This is the material ID that the next data is refering


too.





*MATERIAL_NAME


// The material name





*MATERIAL_CLASS





*MATERIAL_AMBIENT 0.1791 0.0654


0.0654





*MATERIAL_DIFFUSE 0.5373


0.1961


0.1961


// The color of the object





*MATERIAL_SPECULAR 0.9000


0.9000


0.9000





*MATERIAL_SHINE 0.2500





*MATERIAL_SHINESTRENGTH 0.0500





*MATERIAL_TRANSPARENCY 0.0000





*MATERIAL_WIRESIZE 1.0000





*MATERIAL_SHADING Blinn





*MATERIAL_XP_FALLOFF 0.0000





*MATERIAL_SELFILLUM 0.0000









*MATERIAL_FALLOFF In





*MATERIAL_XP_TYPE Filter





*MAP_DIFFUSE {






*MAP_NAME






*MAP_CLASS






*MAP_SUBNO 1






*MAP_AMOUNT 1.0000






*BITMAP



// This is the file name for the texture






*MAP_TYPE Screen






*UVW_U_OFFSET 0.0000


// This is the U offset for the tile






*UVW_V_OFFSET 0.0000


// This is the V offset for the tile






*UVW_U_TILING 1.0000



// This is the U tiling ratio (1 is standard)






*UVW_V_TILING 1.0000



// This is the V tiling ratio (1 is standard)






*UVW_ANGLE 0.0000






*UVW_BLUR 1.0000






*UVW_BLUR_OFFSET 0.0000






*UVW_NOUSE_AMT 1.0000






*UVW_NOISE_SIZE 1.0000






*UVW_NOISE_LEVEL 1






*UVW_NOISE_PHASE 0.0000






*BITMAP_FILTER Pyramidal





}







}




}









*GEOMOBJECT {








// This tag let's us know that objects are


next




*NODE_NAME






// This is the object name




*NODE_TM {





*NODE_NAME





// Once again, this is the objects name





*INHERIT_POS 0 0 0





*INHERIT_ROT 0 0 0





*INHERIT_SCL 0 0 0





*TM_ROW0 1.0000


0.0000


0.0000





*TM_ROW1 0.0000


1.0000


0.0000





*TM_ROW2 0.0000


0.0000


1.0000





*TM_ROW3 0.0000


0.0000


0.0000





*TM_POS 0.0000 0.0000


0.0000





*TM_ROTAXIS 0.0000


0.0000


0.0000





*TM_ROTANGLE 0.0000





*TM_SCALE 1.0000


1.0000


1.0000





*TM_SCALEAXIS 0.0000


0.0000


0.0000



-


-


-


-


-


-


-


-



本文更新与2021-02-01 21:50,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/595340.html

DS MAX标准文本导出格式ASE的文件结构的相关文章

  • 余华爱情经典语录,余华爱情句子

    余华的经典语录——余华《第七天》40、我不怕死,一点都不怕,只怕再也不能看见你——余华《第七天》4可是我再也没遇到一个像福贵这样令我难忘的人了,对自己的经历如此清楚,

    语文
  • 心情低落的图片压抑,心情低落的图片发朋友圈

    心情压抑的图片(心太累没人理解的说说带图片)1、有时候很想找个人倾诉一下,却又不知从何说起,最终是什么也不说,只想快点睡过去,告诉自己,明天就好了。有时候,突然会觉得

    语文
  • 经典古训100句图片大全,古训名言警句

    古代经典励志名言100句译:好的药物味苦但对治病有利;忠言劝诫的话听起来不顺耳却对人的行为有利。3良言一句三冬暖,恶语伤人六月寒。喷泉的高度不会超过它的源头;一个人的事

    语文
  • 关于青春奋斗的名人名言鲁迅,关于青年奋斗的名言鲁迅

    鲁迅名言名句大全励志1、世上本没有路,走的人多了自然便成了路。下面是我整理的鲁迅先生的名言名句大全,希望对你有所帮助!当生存时,还是将遭践踏,将遭删刈,直至于死亡而

    语文
  • 三国群英单机版手游礼包码,三国群英手机单机版攻略

    三国群英传7五神兽洞有什么用那是多一个武将技能。青龙飞升召唤出东方的守护兽,神兽之一的青龙。玄武怒流召唤出北方的守护兽,神兽之一的玄武。白虎傲啸召唤出西方的守护兽,

    语文
  • 不收费的情感挽回专家电话,情感挽回免费咨询

    免费的情感挽回机构(揭秘情感挽回机构骗局)1、牛牛(化名)向上海市公安局金山分局报案,称自己为了挽回与女友的感情,被一家名为“实花教育咨询”的情感咨询机构诈骗4万余元。

    语文