BlackShadauw Posted May 25, 2018 Share Posted May 25, 2018 Hi guys, I will try to render material in the same way as this PG : https://www.babylonjs-playground.com/#10D6YT#33 but when i am exporting my gltf file with blender, no texture are apply, not enven a simple picture in a plane. can you help me to understand what happend? my texture is in the same folder as my .bin and .gltf file index2.html t.gltf Quote Link to comment Share on other sites More sharing options...
Guest Posted May 25, 2018 Share Posted May 25, 2018 Is there any error on the console? Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted May 25, 2018 Share Posted May 25, 2018 Can we have a look on your blend file too? Have you used the material node from the gltf github repo? Quote Link to comment Share on other sites More sharing options...
BlackShadauw Posted May 26, 2018 Author Share Posted May 26, 2018 Hi guys, no there is no error in the console. Here is my file No i did not use the gltf github repo, cause my plane (it is a test) is not in metal. Its only an imported image apply to a plane this is all a test to apply materials to learn how for a more complicated scene t.blend Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted May 28, 2018 Share Posted May 28, 2018 Even if your material is not metallic, you have to use the gtlf material nodes (and put your metallic value on it to 0). For now, gltf exporter doesn't support raw cycles materials (after your current blend export, edit the gltf and search for "material", you will find nothing). Quote Link to comment Share on other sites More sharing options...
BlackShadauw Posted May 29, 2018 Author Share Posted May 29, 2018 Hi, thanks a lot for your answer. I tryed what you said and followed the correct way as it is show here : https://github.com/KhronosGroup/glTF-Blender-Exporter/blob/master/docs/user.md But i have an error and i can't export. Any idea what i am doing wrong ? Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted May 29, 2018 Share Posted May 29, 2018 It seems you're trying to use a jpg with alpha, which is not possible: link only the color output, not the alpa. Be sure to have a UV channel on your object too (which is probably already the case, but who knows). Quote Link to comment Share on other sites More sharing options...
BlackShadauw Posted May 31, 2018 Author Share Posted May 31, 2018 Hi, still not working like that Did you have any other idea ? Or maybe did you have a simple functionnal (that export texture in gltf file) blend file that i can use as reference to explore how it works ? Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted June 1, 2018 Share Posted June 1, 2018 Here you have: t.zip I append in t.blend the MetallicRoughness material (named Material_MR) from gltf2_principled.blend I use this code from BJS doc (notice that I replace the local HDR texture by using the helpder scene.createDefaultEnvironment(), I think I will modify the doc example) As the doc say: some browsers may not want loading the scene, for some security issues (e.g.: Chrome). In this case, you have to open the html file through a webserver (local or not), or try into another browser (e.g.: Firefox, Edge) Also, be sure to have the last exporter version : https://github.com/KhronosGroup/glTF-Blender-Exporter/tree/master/scripts GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
BlackShadauw Posted June 2, 2018 Author Share Posted June 2, 2018 Hi thanks a lot for your help this very nice. the html file is fine and texture you is now loading correctly. I still have the error message from blender when exporting even with you t.blend file. I will try to fixe it by re-installing all.. but now i can go further. I found an other framework blend4web, is it more efficient to use it as babylon with blender ? Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 3, 2018 Share Posted June 3, 2018 @BlackShadauw Personally, I would avoid the gtlf format like the plague. I have always had mixed results using this format in any project, as there is limited support and many issues when trying to conform this format outputting from 3rd party applications such as blender. Either .OBJ, .FBX, and others are far more reliable to either directly import into a WebGL framework, or as in FBX to move scenes from application to application. If you simply discard using the gtlf format in exchange for something else more mainstream, you'll find a pipeline which works well for your needs. If the need is to import directly into a WebGL framework, then OBJ is a good way to go - then you can build your materials and textures run time JavaScript. Otherwise, if using babylon.js, then the .babylon format is ideal in so many ways. Just a little experimentation to become familiar with a reliable pipeline will make life so much easier for you. And I would avoid ANY WebGL framework which you have to pay for. This isn't because of the price, but because you're completely relying on a company and it's limited resources which you are investing your time and future in. And their growth and maininence is completely dependant on developers such as you - which are extremely limited. Whereas open source frameworks are driven by communities of users - which now have grown far beyond what any for profit company can possibly compete with. As a former Senior Software Engineer for Sony Electronics, we could afford any API to create products using WebGL, and we chose babylon.js as it is a very cohesive framework and more reliable than practically any open source framework we've ever used. Remember WebGL is a standard for browser rendering, and not a product for revenue driven by a company which needs you. Yet this community (BJS) is far better than any for profit "API" I've yet to use. This is for many reasons which I won't go into now. But if you wish to continue to develop for WebGL as a future for yourself, I guarantee that babylon.js will survive well beyond the demise of companies such as the Russian company Triumph who produced blend4web. And BJS far out functions their API now and forever. There is no future competing with the existing opensource frameworks for WebGL. Not my opinion, but simple economics. And back to your original issue, again - a few hours working with formats other than the out-dated gtlf format (even the Khronos Group doesn't use or support this format any longer) is a few hours spent in your future. I've been down this road personally, which is why I'm so passionate about trying to direct newbies in the right direction - for their own future. Good Luck! DB Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted June 4, 2018 Share Posted June 4, 2018 @dbawel How do you deal to export your scenes from Blender using PBR workflow? .babylon exporter use the standard one (but I don't know how obj/fbx/dae files with cycles materials are imported into BJS, are their materials processed as PBR, or standard?) Quote Link to comment Share on other sites More sharing options...
bghgary Posted June 4, 2018 Share Posted June 4, 2018 On 6/2/2018 at 11:45 PM, dbawel said: out-dated gtlf format (even the Khronos Group doesn't use or support this format any longer) I am a member of the 3d formats working group under Khronos and I'm not sure where you are getting this information. While there are some issues with consistency across tools, we are actively working on fixing them. That said, glTF is intended for runtime and not for interchange. It may or may not be the right fit for all situations. V!nc3r 1 Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 4, 2018 Share Posted June 4, 2018 @bghgary I must have wrong info then. I still had limited results in using gtlf, and had to abandon. I also haven't seen any recent updates in compatibility recently - so I don't know where gtlf fits anymore comparative to other formats. DB EDIT - actually, my bad. I see on GitHub that there were updates to gltf format this past month. Need to take another look as I hadn't seen any changes in application since 2014. Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 4, 2018 Share Posted June 4, 2018 @V!nc3r I only use .babylon format into the babylon.js framework. The other formats are only to move scenes from one application to another. But for runtime mesh loading, OBJ works for most uses; however, I'm taking another look at gtLF. DB Quote Link to comment Share on other sites More sharing options...
BlackShadauw Posted June 7, 2018 Author Share Posted June 7, 2018 @dbawel Thanks for your advice. I tryied blend4web anyway, it a heavy (Go) and huge add-ons, that have make my blender much longer to launch. It give many usefull tools to set up very easly a scene with every thing we need like for exemple FPS functions A new "realtime render" engine that need to have specific use of textures but still with using nodes that its is nice. Many nodes system to aplly colision, events, action on our scen that avoid any lines code, that is awesome. But yea i have the feeling that i completely relying on this company and i dont like it. Well for now i fill stay on Babylon with gltf file that suite me welle, but caost many times to (for now, it is the begining) to have result For Info guys, no more error or special issues, thanks a lot for your help Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 7, 2018 Share Posted June 7, 2018 @BlackShadauw- As you mentioned, there are always limitations to any framework - however, 3rd party for profit frameworks always limit general usage as they seem to always require specific guidelines to use and the overhead is almost always much greater. If using babylon.js, the exporters are up to date, and no matter what company I work for, we find the .babylon format far less limiting and more comparable for loading scenes; as well as permitting all BJS functionality - unless the rare occasion that a bug is found in new versions - which are generally fixed quickly. If not, then a quick post on the forum and the core babylon team is on it. as for OBJ files, remember to often eliminate the MTL file as well as all reference to the file in the original OBJ. This allows far more flexibility when using OBJ files dynamically and/or at run time. I'll be experimenting with gtLF files on a project this weekend - and hopefully, find them useful. Sometimes it's difficult to keep up with advances when working one or more dev jobs. Good Luck. DB 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.