dbawel Posted December 17, 2017 Share Posted December 17, 2017 Hello, I've not been working in BJS for a while now, and am back on a job. I've imported loads of OBJ files into babylon.js, and never had an issue. However, I must have forgotten everything already. I need to have the OBJ file into babylon.js tomorrow, and m stuck. I know it's an idiot issue, but I'm too stupid to sort out why this OBJ won't load. http://qedsoft.com/DEMOS2017/obj_loader/index.html Thanks, DB Or better yet - if I import an OBJ file into Blender, the mesh imports as a completely black material with no texture. How do I correct this? It all imorts fine into Maya, which is what I normally use. However, it seems that I'm the only one using Maya in WebGL production, and there is no compatibility between Maya and babylon.js - not that I've ever found reliable. Could someone PLEASE write a reliable FBX converter to babylon.js? Everyone's been asking for this for many years now. I wish I had the skills to write it and support it. Quote Link to comment Share on other sites More sharing options...
davrous Posted December 17, 2017 Share Posted December 17, 2017 Hello, Can you please describe more precisely what happens with your OBJ? Is there something in F12 console? There is a Maya exporter currently being worked on: https://github.com/BabylonJS/Exporters/tree/master/Maya Regarding FBX, it's complex the format is not simple and freely documented. Have you shared the issues you've got with the current FBX exporter? David Quote Link to comment Share on other sites More sharing options...
MarianG Posted December 17, 2017 Share Posted December 17, 2017 Hi. There could be a mtl format problem. By the way, this demo from https://doc.babylonjs.com/how_to/obj doesn't work Quote Link to comment Share on other sites More sharing options...
dbawel Posted December 17, 2017 Author Share Posted December 17, 2017 @davrous- The link in my first post is the complete test scene. There is no messages or errors in the console of any browser I've tested. Any other methods to import the mesh and textures into babylon.js - or into Blender where the model and texture can be seen? DB Quote Link to comment Share on other sites More sharing options...
jerome Posted December 17, 2017 Share Posted December 17, 2017 I tested your scene with the dev tools (network tab) and I can't see the emitted request to the object to be downloaded. Are you sure that you download it in your code ? Quote Link to comment Share on other sites More sharing options...
davrous Posted December 18, 2017 Share Posted December 18, 2017 Yeah, I've just looked to the code, you're never calling the createScene() function, so nothing will happen Quote Link to comment Share on other sites More sharing options...
dbawel Posted December 19, 2017 Author Share Posted December 19, 2017 @davrous- DUH! I've been working in PHP way too long, and overlooked such a basic task as defining the engine correctly and calling the function to initialize the scene. I'll make the simple changes this morning, and let you know if there are any other issues. But as I mentioned in the title of this post - I knew I was asking an obviously stupid question. But now I feel even dumber than I initially thought I would, as this is scripting 101. Thanks, and I'll post the scene if all works for both the .OBJ and .babylon file. I have alo discovered issues with importing different formats into Blender, and maintaining textures. However, I seem to have found a quick fix for this without the need to re-apply the UV mapping - which is a nightmare. So I'll post this if all goes well so that others don't need to struggle over importing textures from applications into Blender. Thanks again, DB And @MarianG- You found what I found as well - which is that the demo for loading OBJ files into babylon is no longer working. But than you for all your help - including @JCPalmer as well. It takes time to read through and assist others on the forum, so thank you all very much for taking your valuable time to help. Without this forum, many devs could never find the answers they need to meet their deadlines which is why babylon.js is by far the best framework in the industry these days. And fortunately, the core team supporting BJS really cares about their community. I hope all of you who are new to the framework remember all of the help you required and received, and one day returns to assist all of the newbies who will certainly come here to learn the best WebGL framework in existence. Just keep in mind that those developers you will be helping are probably only 6 or 7 years old right now. But one day soon, they will have newer versions of WebGL, hardware, and computing power which to us right now - can not yet be realized in any way. SO fortunately, we'll also be learning from them as well. Just remember this, as all things come back around - both the good and the bad - so if you receive help now, remember that one day you'll personally benefit greatly by passing on the help you've been given today. That's how it works, folks. Cheers to you all, DB Arte 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 20, 2017 Share Posted December 20, 2017 Not quite sure why I am in this thread, but looks like it could be marked solved. Also the link in the first post gets a 404. Maybe remove it at the same time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.