Mitä ovat 3d -mallien mukana tulleet yhteenzipatut obj ja mtl -tiedostot ja mitä niillä tehdään? Itse meshit ovat erikseen mutta jokaiselle niistä löytyy myös em. tiedosto.
Obj ja mtl -tiedostot?
3ds
4400
0Äänestä
Muut lukivat myös
Odottaa vastausta
Näihin keskusteluihin ei ole vielä vastattu. Ole ensimmäinen.
Vastaukset 4
Vanhimmat
OBJ(ect) (tekstimuotoinen) tiedosto sisältäen "ohjeen" kappaleen polygonien piirtämiseen
MTL (material) materiaali(tekstuuri)kirjasto, kappaleen pinnoittamisessa käytettävien kuvien tallennuspaikka
Mutta kun on olemassa vielä erikseen Textures -kansio jossa sijaitsee kaikkien mallien materiaalit jpg-kuvina. 3d -ohjelma Blender kyllä avaa 3d -mallit mutta ei sijoita materiaaleja näihin.
... tähän tapaan:
Material Library File (.mtl)
Material library files contain one or more material definitions, each of which includes the color, texture, and reflection map of individual materials. These are applied to the surfaces and vertices of objects. Material files are stored in ASCII format and have the .mtl extension.
An .mtl file differs from other Alias|Wavefront property files, such as light and atmosphere files, in that it can contain more than one material definition (other files contain the definition of only one item).
An .mtl file is typically organized as shown below.
newmtl my_red
Material color
& illumination
statements
texture map
statements
reflection map
statement
newmtl my_blue
Material color
& illumination
statements
texture map
statements
reflection map
statement
newmtl my_green
Material color
& illumination
statements
texture map
statements
reflection map
statement
Typical organization of .mtl file
Each material description in an .mtl file consists of the newmtl statement, which assigns a name to the material and designates the start of a material description. This statement is followed by the material color, texture map, and reflection map statements that describe the material. An .mtl file map contain many different material descriptions.
After you specify a new material with the "newmtl" statement, you can enter the statements that describe the materials in any order. However, when the Property Editor writes an .mtl file, it puts the statements in a system-assigned order. In this chapter, the statements are described in the system-assigned order.
Sample format for a material definition in an .mtl file:
Material
name
statement:
newmtl my_mtl
Material
color and
illumination
statements:
Ka 0.0435 0.0435 0.0435
Kd 0.1086 0.1086 0.1086
Ks 0.0000 0.0000 0.0000
Tf 0.9885 0.9885 0.9885
illum 6
d -halo 0.6600
Ns 10.0000
sharpness 60
Ni 1.19713
Texture
map
statements:
map_Ka -s 1 1 1 -o 0 0 0 -mm 0 1 chrome.mpc
map_Kd -s 1 1 1 -o 0 0 0 -mm 0 1 chrome.mpc
map_Ks -s 1 1 1 -o 0 0 0 -mm 0 1 chrome.mpc
map_Ns -s 1 1 1 -o 0 0 0 -mm 0 1 wisp.mps
map_d -s 1 1 1 -o 0 0 0 -mm 0 1 wisp.mps
disp -s 1 1 .5 wisp.mps
decal -s 1 1 1 -o 0 0 0 -mm 0 1 sand.mps
bump -s 1 1 1 -o 0 0 0 -bm 1 sand.mpb
Reflection
map
statement:
refl -type sphere -mm 0 1 clouds.mpc
Se on joku Autodeskin kehittämä systeemi, näyttää ne tiedostot aukeavan muidenkin ohjelmilla. Voi olla hyväkin.