I'm new to Open/WebGL and am having issues getting the textures/skins from a downloaded Blender model to show up in three.js. I can verify from Chrome's Network tab that it is downloading all of the texture files, but for some reason they are not being rendered.
I am using the webgl_loader_collada.html example as a basis to import a sample 3D model from blender into three.js.
For input, I'm using the MESSENGER model available from the NASA website. For reference, the full gallery of NASA 3D Models can be seen here.
My current steps:
- Download and open the model in Blender
- File->Export->Collada (.dae)
To view:
- Modify a copy of threejs/examples/webgl_loader_collada.html to point to the exported .dae file
- Remove the scaling on line 59.
Using the default options in blender export the resulting rendering is devoid of all textures. If I enable "Include Material Textures" I end up with the gold coloring on the main part of the model, but none of the other textures are mapped and the solar panels furthermore bee pletely black. Alternatively, if I also check "Include UV Texture", I get an all-gray rendering with no textures.
I have also tried the three.js JS exporter plugin for Blender, but in that case (using the appropriate demo template) all I get is a JS exception "Cannot read property 'opacity' of undefined".
Am I doing something wrong in the translation process, or is this a problem with the source model? If the latter, how could I go about fixing either the original model or its exported form?
thanks, - David
I'm new to Open/WebGL and am having issues getting the textures/skins from a downloaded Blender model to show up in three.js. I can verify from Chrome's Network tab that it is downloading all of the texture files, but for some reason they are not being rendered.
I am using the webgl_loader_collada.html example as a basis to import a sample 3D model from blender into three.js.
For input, I'm using the MESSENGER model available from the NASA website. For reference, the full gallery of NASA 3D Models can be seen here.
My current steps:
- Download and open the model in Blender
- File->Export->Collada (.dae)
To view:
- Modify a copy of threejs/examples/webgl_loader_collada.html to point to the exported .dae file
- Remove the scaling on line 59.
Using the default options in blender export the resulting rendering is devoid of all textures. If I enable "Include Material Textures" I end up with the gold coloring on the main part of the model, but none of the other textures are mapped and the solar panels furthermore bee pletely black. Alternatively, if I also check "Include UV Texture", I get an all-gray rendering with no textures.
I have also tried the three.js JS exporter plugin for Blender, but in that case (using the appropriate demo template) all I get is a JS exception "Cannot read property 'opacity' of undefined".
Am I doing something wrong in the translation process, or is this a problem with the source model? If the latter, how could I go about fixing either the original model or its exported form?
thanks, - David
Share Improve this question edited Oct 27, 2013 at 0:26 user128511 asked Oct 25, 2013 at 22:16 DigicratDigicrat 7197 silver badges14 bronze badges2 Answers
Reset to default 4Very nice project, thanks for the link.
For the collada export
- don't include UV textures
- include material textures
- don't copy (you can use the provided texture images)
- double check textures paths in the .dae file, in the
<library_images>
tag, use relative ones
I tried on my own, here if you want https://github./vincent/three.js-nasa, but it's not perfect, for example the foil effect with the normal map is not used.
Perhaps try the GLTF format instead of collada? It is a more modern format designed for realtime/web asset delivery and being widely adopted.
Blender exporter: https://github./KhronosGroup/glTF-Blender-Exporter
Once you have exported as .glb file, you can drag it on here to check it:
https://gltf-viewer.donmccurdy./
Then use the THREE.GLTFLoader() in THREE to load it.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744359112a4570381.html
评论列表(0条)