I'm new here, and learning how to create a terrain mesh for the first time.
I used a free tool called "Nem's mega 3D terrain generator" to quickly
generate a terrain mesh & texture in OBJ format. I assume that the texture
is embedded in the OBJ file (but again, first time doing this for me).
When I run: Obj.load("../resources/demoTerrain.obj");
I get a number of pop up error messages (also shown in the console) with
this text:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL
Not Found.
The odd thing is that sometimes, for maybe a second before I see this error
pop up, I see the mesh with a default wire frame show up on screen as
expected. Maybe 1 in 4 times I see the mesh before the error, the other
times the error pops up before the mesh is rendered.
Any thoughts on this? I'm not sure where to look, the debugger doesn't even
catch this error as an exception, so I'm having troubles tracking down the
problem. My best guess is that it has something to do with loading the
textures from the OBJ file.
Thanks,
David
p.s. I notice that most tutorials show a material being defined in the Init
object passed to the load function. But it hasn't been clear to me exactly
what the requirements around textures are, specifically I noted that an
Object3D object doesn't have a material property, which made me confused
about how the Obj.load function uses the material property in the Init
object to apply the material.