当前位置:网站首页>Obj file format and.Mtl file format
Obj file format and.Mtl file format
2022-07-25 05:23:00 【Super__ Idol】
1.OBJ It's a kind of 3D Model file , therefore No animation 、 Material properties 、 Map path 、 Dynamics 、 The particle Etc . But you can read .mtl file To get material information .
2.OBJ Files use 【 Keywords are arranged according to data type , Each keyword has a short description 】
Vertex data (Vertex data):
v Geometry vertices (Geometric vertices)
vt Map coordinate points (Texture vertices)
vn Vertex normals (Vertex normals)
vp Parameter space vertex (Parameter space vertices)
3. stay Maya Create a polygon cube , Select this cube , The export format is OBJ, The file named "cube.obj".( If there is no such format , Please be there. Plug-in Manager In the load "objExport.mll") Open with a tablet "cube.obj". For example, below :
usemtl initialShadingGroup
v 0.500000 -0.500000 -0.500000
vt 1.000000 0.000000vn 0.000000 0.000000 -1.000000
s off
f 1 2 3
f 1/3 2/5 3/4
f 1/3/4 2/5/6 3/4/2
Explain it. :
"v 0.500000 -0.500000 -0.500000" This sentence "v" Represents the coordinates of the point .
"vt 1.000000 0.000000" This sentence "vt" Mapping coordinates representing points .
"vn 0.000000 0.000000 -1.000000" This sentence "vn" Represents the normal of the point .
"s off" Indicates that the smoothing group is turned off .
"usemtl initialShadingGroup" Indicates the material used .
"f 1 2 3" Such lines are represented by 1、2、3 The vertex of No. 2 forms a triangle .
"f 1/3 2/5 3/4" Such lines are represented by 1、2、3 The vertex of No. 2 forms a triangle , The index value of the texture coordinate of the first vertex is 3, The index value of the texture coordinate of the second vertex is 5, The index value of the texture coordinate of the third vertex is 4.
"f 1/3/4 2/5/6 3/4/2" Such lines are represented by 1、2、3 The vertex of No. 2 forms a triangle , The index value of the texture coordinate of the first vertex is 3, The index value of its normal is 4; The index value of the texture coordinate of the second vertex is 5, The index value of its normal is 6; The index value of the texture coordinate of the third vertex is 6, The index value of its normal is 2.
4. say something .mtl file Well
3D model processing will read .mtl File to get material information .
mtl file (Material Library File) Is a material library file , It describes the material information of the object ,ASCII Storage , Any text editor can open and edit it . One .mtl The file can contain one or more material definitions , Each material has its own color , Description of texture and reflection map , Applied to surfaces and vertices of objects .
The following is the basic structure of a material library file :
newmtl mymtl_1
Material color lighting definition
Texture map definition
Reflection map definition
newmtl mymtl_2
Material color lighting definition
Texture map definition
Reflection map definition
notes : Each material library can contain multiple material definitions , Each material has a material name . use newmtl mtlName To define a material . For each material , Its color, illumination, texture, reflection and other descriptive features can be defined .
The main definition format is shown below :
Material color illumination
1. Environmental reflection has the following three description formats , The three are mutually exclusive , Can't be used at the same time .Ka r g b \\ use RGB Color value to represent ,g and b Two parameters are optional , If only r Value , be g and b All the values of are equal to r Value . The general value range of the three parameters is 0.0~1.0, Values outside this range increase or decrease reflectivity accordingly ;
Ka spectral file.rfl factor \\ Use one rfl Documents to show .factor Is an optional parameter , Express .rfl Multiplier of the value in the file , The default is 1.0;
Ka xyz x y z \\ use CIEXYZ Value to represent the ,x,y,z yes CIEXYZ Component values of color space .y and z Two parameters are optional , If only x Value , be y and z All the values of are equal to r Value . The general value range of the three parameters is 0~1.2. Three formats of diffuse description :
Kd r g b
Kd spectral file.rfl factor
Kd xyz x y z3. Three formats of mirror reflection description :
Ks r g b
Ks spectral file.rfl factor
Ks xyz x y z4. Three formats of filter transmittance description :
Tf r g b
Tf spectral file.rfl factor
Tf xyz x y z5. Lighting model description format :
illum illum_#
Specify the lighting model of the material .illum It can be followed by 0~10 Numerical parameters in the range .
5. download 3D The website of the model :https://free3d.com/
6. more , Please refer to
obj File parsing - giser_xupf - Blog Garden
OBJ Model files and MTL Material file Introduce _ Changjiang many blogs -CSDN Blog _mtl texture of material
边栏推荐
- JS common code questions array de duplication - Custom New throttling and anti shake - deep copy - instanceof URL parameter extraction - thousand separator - array to tree structure - array flattening
- When image component in wechat applet is used as background picture
- Introduction to base ring tree
- H5 new feature domcontentloaded event - custom attribute -async attribute -history interface method - local storage -postmessage
- The price is 17300! Why does Huawei mate x face Samsung fold?
- Thesis reading | which is the best multilingual pre training technology for machine translation? See the latest progress!
- I have seven schemes to realize web real-time message push, seven!
- FinClip实现微信授权登录的三种方案
- Panda3D keyboard moving scene
- STL notes (VIII): container - List
猜你喜欢

What about reinstalling win11 system?
Set up private CA server

微信小程序相关操作示例

Implement is by yourself_ class

Special analysis of data security construction in banking industry

Odoo14 | about the abnormal display of statusbar keyword after use and Its Solutions

Now the operator wants to check the answer details of all user questions from Zhejiang University. Please take out the corresponding data

Implementation principle of epoll

Redis的三个必知必会的问题

龙蜥社区发布首个 Anolis OS 安全指南 为用户业务系统保驾护航
随机推荐
OpenFegin远程调用丢失请求头问题
What content does the software test plan include and how to write it. Share test plan template
Introduction to kubernetes
STL notes (VIII): container - List
Zhanrui's first 5g baseband chip was officially released and successfully ranked among the first tier of 5g!
LCP插件创建对等VLAN接口
CSDN编程挑战赛之数组编程问题
Add click event to unity 3D object
rhcsa暑假第三天
Guanghetong and Intel released the global version of 5g communication module
Solve the problem that uni app applet obtains routes and route parameters
项目管理工具——阿里云Projex介绍与实战
How to carry out the function test with simple appearance and complex interior?
Introduction to base ring tree
Teach you three ways to optimize the performance from 20s to 500ms
2022-07-24:以下go语言代码输出什么?A:[]int{};B:[]int(nil);C:panic;D:编译错误。 package main import ( “fmt“ ) f
一篇文章带你读懂Redis的哨兵模式
批量下载视频小技巧
Go language function
Three schemes for finclip to realize wechat authorized login