Jump to content

Saving and Loading a Scene


iiceman
 Share

Recommended Posts

Can you show the scene you are trying to load?

 

Assumptions:

  • We are talking about a light that reflects on specific meshes.
  • The meshes all have a material
If those two are correct and everything is activated, there shouldn't be a reason why it doesn't work. But would be great to find the cause and fix it.

 

 

Hello.

 

file here. Its don't work

:(

{"autoClear":true, "clearColor":[0,0,0], "ambientColor":[0.1,0.1,0.1],"gravity":[0,-9.81,0], "cameras":[{"name":"Camera","id":"Camera","position":[27.94,5.0426,0],"fov":0.97,"minZ":0.1,"maxZ":100,"speed":1,"inertia":0.9,"checkCollisions":false,"applyGravity":false,"ellipsoid":[0.2,0.9,0.2],"target":[26.9686620259285,5.280302623009682,-0.0000035679236134456005]}],"activeCamera":"Camera","lights":[{"name":"Sun","id":"Sun","position":[-30,-22,8.6],"excludedMeshesIds": ["maiQube"],"direction":[0,-0.1,0],"intensity":1,"range":100,"diffuse":[1,1,1],"specular":[0.98,0.98,1],"type":1}],"materials":[{"name":"grndMat","id":"grndMat","ambient":[0.1,0.1,0.1],"diffuse":[0.3,0.3,0.4],"specular":[0.8941176470588236,0.8941176470588236,0.8941176470588236],"specularPower":50,"emissive":[0,0,0],"alpha":0.9,"backFaceCulling":true,"wireframe":false}],"meshes":[{"name":"mainQube","id":"mainQube","position":[-3,13,0],"rotation":[5.394599999999908,40.2280000000032,2.9226000000000005],"scaling":[3.866,3.8661,3.8661],"isVisible":true,"pickable":true,"applyFog":true,"alphaIndex":1.7976931348623157e+308,"checkCollisions":false,"billboardMode":0,"receiveShadows":false,"materialId":"grndMat","positions":[-1,"1.0000","1.0000",-1,-1,"1.0000",-1,-1,-1,"1.0000","1.0000","1.0000","1.0000",-1,"1.0000","1.0000","1.0000",-1,"1.0000",-1,-1,-1,"1.0000",-1],"normals":[-0.5773,"0.5773","0.5773",-0.5773,-0.5773,"0.5773",-0.5773,-0.5773,-0.5773,"0.5773","0.5773","0.5773","0.5773",-0.5773,"0.5773","0.5773","0.5773",-0.5773,"0.5773",-0.5773,-0.5773,-0.5773,"0.5773",-0.5773],"indices":[0,1,2,3,4,1,5,6,4,7,2,6,1,4,6,3,0,7,7,0,2,0,3,1,3,5,4,5,7,6,2,1,6,5,3,7],"isEnabled":true,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":8,"indexStart":0,"indexCount":36}]}]}
Link to comment
Share on other sites

"excludedMeshesIds": ["maiQube"],

The mesh's ID is mainQube, not maiQube. Changing that to the correct string works.

 

Might I ask what tool exported this scene? I find it odd that some numbers are strings, some numbers are actuall decimals. The mesh's alphaIndex is also pretty odd.

Link to comment
Share on other sites

"excludedMeshesIds": ["maiQube"],

The mesh's ID is mainQube, not maiQube. Changing that to the correct string works.

 

Might I ask what tool exported this scene? I find it odd that some numbers are strings, some numbers are actuall decimals. The mesh's alphaIndex is also pretty odd.

 

 

Oh, where are my eyes !!!  :)  I'm very sorry.

 

This file I adjusted manually, on the basis of the file that generates my Scene's Saver. He's not very elegant, not fully ready, but it works well :)

And, perhaps you know where i can see actually .babylon format file?

For example, blender plug-in save some more information (and it correct responding at loading), than it describe in manual.

as useFlatShading param for meshes.

 

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...