Jump to content

CornellBox for testing


V!nc3r
 Share

Recommended Posts

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]

Link to comment
Share on other sites

Thanks!

But! :D
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.

s0x5dIU.png

And in the playground, the original meshes are split!
Nnd8onC.png

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 ?

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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 :lol:

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...