tranlong021988 Posted July 1, 2017 Share Posted July 1, 2017 Hi, I'm making a simple Skybox by copying code from here: http://babylonjsguide.github.io/intermediate/Skybox Everything fine, but it's seem that I can not apply a AmbientTexture to SkyBox, it thrown error: Uncaught TypeError: Cannot read property 'toArray' of null So skyboxMaterial.ambientTexture is not supported yet ? Quote Link to comment Share on other sites More sharing options...
tranlong021988 Posted July 1, 2017 Author Share Posted July 1, 2017 Same error with skyboxMaterial.diffuseTexture , seem that ReflectionTexture is the only one has supported. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 3, 2017 Share Posted July 3, 2017 Hiya T! Good to see you again. Umm... I think we have a framework bug... but I have said that before, and been wrong. http://www.babylonjs-playground.com/#UU7RQ#22 It seems... material.diffuseColor needs to be set to some color OTHER THAN BLACK, or not set at all. Setting diffuseColor to black... will somehow kill ambientTexture and diffuseTexture. hmm. Activate line 29. BOOM, ambientTexture and diffuseTexture disappear. Go fig. I see a little "sky-line" or two... in this cubeMap, too. hmm. (Wingnut caulks the cubeMap cracks... to prevent mosquitoes from entering the skybox.) Anyway, about this diffuseColor thing... I'm not sure if this is normal/not. I guess... for now... don't set diffuseColor to 0,0,0 (black). Perhaps Admiral @Deltakosh or another "materials God" will visit and have comments. Thanks for the report, T! An interesting and curious discovery, indeed. tranlong021988 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 3, 2017 Share Posted July 3, 2017 Hi again. I see one other interesting thing, here. http://www.babylonjs-playground.com/#UU7RQ#23 co.png is causing this "black corner". This is normal. The image HAS a black corner, and 3 of those black corners intersect in that skybox corner. BUT... look at the texture level I have set in line 31 (the orient.jpg). Big fat level 5! Now look at line 26... a tiny level .1 for co.png. I can see some clouds in the black corner... but orient.jpg is completely blocked by co.png's black color. Even with level 5 on orient.jpg, and level .1 on co.png, I cannot see ANY of orient.jpg... in that black corner. I'm not sure that is correct, either. hmm. Still testing things. Talk soon. tranlong021988 1 Quote Link to comment Share on other sites More sharing options...
tranlong021988 Posted July 3, 2017 Author Share Posted July 3, 2017 Thank you for your testing thing. You almost the first guy answer my questions when nobody have ideas. I'm trying to make a panorama viewer for interior kind project. People may not only view the room in 3d simulation but also set day time. So I separated panorama picture to 2 part: Diffuse and Ambient. Audience just need to change the Ambient texture - which is affect shadow and lighting of panorama. Since we have problem with BJS Skybox , I'm thinking about combine Ambient Texture and Diffuse Texture on other canvas (using some blending function) and then use that result as a texture for Skybox. That is theory for coding phase. For now I'm crazy in 3dmax rendering task with my f*cking weakly laptop. What a hard day ! GameMonetize and Wingnut 2 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.