I am currently working with an MTL file that contains the following specifications:
newmtl blinn_backSG
illum 4
Kd 0.17 0.15 0.28
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
bump -s 0.1 0.1 canvas_specular.tif -bm 0.025
Ni 1.00
Ks 0.00 0.00 0.00
map_Ks -s 0.1 0.1 canvas_specular.tif
newmtl blinn_boxSG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd -s 0.333333 0.333333 canvas_map.tif
bump -s 0.333333 0.333333 canvas_map.tif -bm 0.1
Ni 1.00
Ks 0.00 0.00 0.00
map_Ks -s 0.333333 0.333333 -mm 0 0.503822 canvas_specular.tif
newmtl blinn_hungerSG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 1.00 1.00 1.00
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
While using MTLLoader, I encountered errors related to the bump -s
and map_Ks -s
instructions as seen in my Chrome DevTools console:
three.js:18393 GET http://localhost:8080/assets/objs/canvas-test/-s%200.1%200.1%20canvas_specular.tif%20-bm%200.025 404 (File not found)load @ three.js:18393load @ three.js:18507load @ three.js:20043loadTexture @ MTLLoader.js:468createMaterial_ @ MTLLoader.js:437create @ MTLLoader.js:329preload @ MTLLoader.js:297(anonymous function) @ previews.html:178(anonymous function) @ MTLLoader.js:36(anonymous function) @ three.js:18347
2016-07-08 08:30:45.396 three.js:18393 GET http://localhost:8080/assets/objs/canvas-test/-s%200.333333%200.333333%20canvas_map.tif 404 (File not found)load @ three.js:18393load @ three.js:18507load @ three.js:20043loadTexture @ MTLLoader.js:468createMaterial_ @ MTLLoader.js:393create @ MTLLoader.js:329preload @ MTLLoader.js:297(anonymous function) @ previews.html:178(anonymous function) @ MTLLoader.js:36(anonymous function) @ three.js:18347
2016-07-08 08:30:45.397 three.js:18393 GET http://localhost:8080/assets/objs/canvas-test/-s%200.333333%200.333333%20canvas_map.tif%20-bm%200.1 404
The issue is that the flag and positioning arguments are being incorrectly interpreted as part of the URL path. Is there a way to resolve this problem within the MTLObjectLoader or modify the MTL file to use a different instruction format?
Thank you for your assistance.