I am new to OpenGL / JOGL. I am able to hardcore a texture onto a polygon, and I am correctly drawing polygons specified in .obj files. I now want to draw the materials/textures specified in those .obj files, but I'm not quite sure what to do.
For example, I downloaded this gazebo. The download contains a single .obj file. From that file:
g gazebo colonne Cilindro8
usemtl Nuovo
v -75.941025 -96.399765 167.927612
v -75.941025 -11.561661 167.927612
v -74.18103 -94.604233 167.927612
v -74.18103 -94.604233 167.927612
v -73.898544 -12.541035 167.927612
v -73.898544 -12.541035 167.927612
v -74.267166 -94.604233 167.383743
How do I know what Nuovo
is? Is there supposed to be a nuovo.mtl
file?
I also downloaded another file:
usemtl black_roof
s off
f 1775/1/1 1778/2/1 1779/3/1 1777/4/1
f 1777/5/1 1779/6/1 1780/7/1 1774/8/1
f 1776/5/2 1782/6/2 1781/9/2 1773/10/2
f 1772/11/2 1783/12/2 1782/13/2 1776/14/2
f 1773/15/3 1781/16/3 1778/17/3 1775/18/3
f 1774/19/4 1780/20/4 1783/21/4 1772/22/4
f 1782/23/5 1779/24/5 1778/25/5 1781/26/5
f 1783/27/6 1780/28/6 1779/29/6 1782/30/6
usemtl black_roof_bricks.png
f 6102/31/7 6098/32/7 6094/33/7 6090/34/7
f 6095/33/7 6099/32/7 6103/31/7 6091/34/7
f 6096/33/8 6100/32/8 6104/31/8 6092/34/8
f 6105/31/8 6101/32/8 6097/33/8 6093/34/8
f 6106/35/9 6088/36/9 6090/37/9 6094/38/9
f 6091/37/10 6089/36/10 6107/35/10 6095/38/10
The download includes a .obj and .png files, but no black_roof
or black_roof_bricks.png
. Am I missing something, or are these models deficient?