Skip to main content

Module obj

Module obj 

Source
Expand description

Wavefront OBJ, with colours and diffuse textures from its MTL library.

A material’s map_Kd picture is looked up next to its MTL file, then next to the model (never outside the model’s folder); its -o and -s options are baked into the texture coordinates (-clamp is ignored, textures always repeat). The picture replaces the Kd colour where it is drawn, as in Eagle’s viewer.

map_bump (or bump) is read the same way into the surface’s bump map; its -bm strength is ignored, as Eagle’s viewer ignores it. The coordinates take their -o and -s from map_Kd, else from the bump map. A material whose d or Tr is not 1 draws see-through. map_Ke, Ke, norm and map_d are not read, as in Eagle’s viewer. Statement names are compared without regard to case.

Functions§

parse