V!nc3r Posted February 2, 2018 Share Posted February 2, 2018 Hi guys! I recently start a little kind-of cornell box scene, I still have some little tweaks to do before release it for everyone (... in facts, you can already grab the sources). I think this will sometimes be more useful to make some tests in this little environement rather than one with default skybox and default sphere And, in relation with this topic about reflection probe, it's precisely a scene which will be perfect to test these kind of issues. But, after many tries, I never succeed to make a playground-version of my scene. Here the correct version, on my personnal website : https://www.nothing-is-3d.com/dl/babylonJS/cornellBox/BJS-PBR/ Here my try in the playground : http://www.babylonjs-playground.com/#59ZXVF#5 As you can see, loading lightmaps texture goes wrong. Where am I wrong ? PS: we can note a huge bug in firefox, which doesn't load correcly the materials! [edit: dedicated thread] brianzinn and BitOfGold 2 Quote Link to comment Share on other sites More sharing options...
Guest Posted February 2, 2018 Share Posted February 2, 2018 This is cool!! thanks a lot btw, the PG does not work because there is an expection raised in the onSuccess callback of the Append method I fixed the code: http://www.babylonjs-playground.com/#59ZXVF#6 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted February 5, 2018 Author Share Posted February 5, 2018 Thanks! But! As you can see in the scene in my FTP, I cycle through meshes, and then through each materials of my objects, to assign lightmaps on it. And in the playground, the original meshes are split! This way is not very convenient I think, 'cause it generates weird names on submeshes, and unwanted children relation between objects. It's weird because I use the same Append function, isn't it ? Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted February 6, 2018 Author Share Posted February 6, 2018 May I up this thread? The fact that gltf meshes are splitted into submeshes in BJS 3.2-alpha is a bug or a feature? In my opinion, keeping the submaterials way instead of submeshes is very more convenient. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 6, 2018 Share Posted February 6, 2018 Pinging @bghgary And to summarize: it is a feature to be more consistent with gltf file format but I get your point Quote Link to comment Share on other sites More sharing options...
bghgary Posted February 6, 2018 Share Posted February 6, 2018 Yes, I made this change to the loader because glTF has primitives under mesh that will not merge into a single Babylon mesh correctly all the time. For meshes that reuse accessors, it can cause an explosion of GPU memory if the primitives are merged together. The names of the child meshes correspond to the mesh name + primitive index. This matches what is described by the glTF asset better than if we merged them together like before. Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted February 7, 2018 Author Share Posted February 7, 2018 OK, so instead of checking if an object as submaterials, we then have to check if an object hasn't a material but have _children which have each one material. I will udpate my scene at launch time to test that. But in a 3D artist point of view it still a weird way to access to our materials Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted February 7, 2018 Author Share Posted February 7, 2018 I assume this is the part of the gltf specification which is involved? https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#meshes Then, maybe in the BJS side it can be useful to be able to know if we have a parent-child relation due to the manual scene setup, or due to the importer? Like a mesh property called isSplitOnImport or isGLTFsplitted? (<- just an example/proposal). Or, in the case of a gltf mesh splitted, have a kind of function in the master mesh to easily select all submaterials ? Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted February 7, 2018 Author Share Posted February 7, 2018 Hop! http://www.babylonjs-playground.com/#59ZXVF#9 Quote Link to comment Share on other sites More sharing options...
Guest Posted February 7, 2018 Share Posted February 7, 2018 Excellent! Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted February 8, 2018 Author Share Posted February 8, 2018 I just have to add the BJS logo somewhere, and the scene will be good (and a little usage doc of course) adam 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted February 8, 2018 Share Posted February 8, 2018 Excellent! 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.