• Content Count

  • Joined

  • Last visited

About SneakySnave

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ah, I understand. So if you're going to support multi platform ktx textures in your project, you must also use that for your skybox. You cannot mix and match. Thanks, @Deltakosh!
  2. Thanks! You were on the right trail! is a crude modification I made to the ParticleSystem class which gives support for a "colorAlive" variable. With that, over the lifetime of a particle, the particle color changes in this way: colorAlive -> random color -> colorDead instead of randomColor -> colorDead With the dust motes floating around the tree, I wanted a fade in and fade out effect. With BJS's current ParticleSystem, I could only get a pop in and fade out, or fade in and pop out effect. And it's in its own file because I wrote it before I learned how to compile the BJS src using Gulp. I just haven't gotten around to integrating it into my project the "correct" way yet!
  3. As promised, here you go: One of the cooler features I implemented: When the modal appears, take a screenshot using CreateScreenshotUsingRenderTarget, then stop the render loop. When the modal is dismissed, or the camera spin effect begins, run the render loop and hide the screenshot. It's simple, but helps reduce the page processing cost when you're just reading or viewing pictures in the modal. Our next step: animations for the tree and grass. Feedback welcome! Thanks. edit: I see now I should've shared this in the Demos and Projects forum, not here. My apologies! Won't happen again.
  4. Thanks for the clue! I think I found the problem. It looks like you cannot cascade load separate sides of a cube texture if you're using a compressed texture format. I followed the call stack from my line "var skyboxTexture = new BABYLON.CubeTexture("textures/skybox/gradient-sky/SkyGradient", scene);". Not using a compressed texture format leads to Engine.prototype.createCubeTexture, and the function call cascadeLoad at line 10578 below. Using a ktx texture format leads to Engine.prototype.createCubeTexture, and the function call BABYLON.Tools.LoadFile at line 10535 below. At line 10528 the rootUrl is changed to the engine.textureFormatInUse, which is "-dxt.ktx". Then BJS tries to load a file "-dxt.ktx", which doesn't exist. Is there a reason you cannot load all the sides of a cube texture separately when using a compressed texture format?
  5. No, there is no file at http://localhost:8888/-dxt.ktx
  6. Thanks for the lightning quick response, @Deltakosh! I believe so. I have this in my mime.types file image/ktx ktx
  7. Hello. I'm having an issue creating a skybox with compressed ktx textures. I've followed the instructions here, and have used the 2 bat scripts in conjunction with the PVRTexTool and ASTC tools. Note that I've used "D" for developer level quality. cd my-directory-with-images make-ktx-batch D ktx-batch That seems to have correctly generated the compressed files. I then create the default skybox. var available = ['-astc.ktx', '-dxt.ktx', '-pvrtc.ktx', '-etc2.ktx', '-etc1.ktx']; var formatUsed = engine.setTextureFormatToUse(available); console.log(formatUsed + ' textures'); ... var skyboxTexture = new BABYLON.CubeTexture("textures/skybox/gradient-sky/SkyGradient", scene); scene.createDefaultSkybox(skyboxTexture); Based on the console output, it seems to be attempting to load the texture format used "-dxt.ktx" at my root URL. I'm testing in Chrome on a MacBook, but am getting the same error in Firefox and Safari "Error: Error status: 404 - Unable to load -dxt.ktx". Any ideas? Thanks for taking the time to read.
  8. Thanks! I'm redoing my company's website and can post here with it's complete
  9. Thanks, @Deltakosh ! It took some fine-tuning, but I was able to get some results I'm happy with.
  10. Thanks for moving! I see that increasing the blur kernel softens the shadows, and lightens the tree/ground island mesh. However, this cannot be a final solution for me. At the point where I've increased the blur kernel enough that the tree is sufficiently lit, the shadow on the clouds is too diffuse. See below there are samples of blurKernel 4, 128, and 512.
  11. Ah. Whoops. I did mean for it to be under Questions & Answers. I don't see a way to move it. Must a moderator do that? Sorry about that!
  12. Hi. I'm trying to get softer shadows in my scene using a blur exponential shadow map. When enabled, the shadow generator seems to incorrectly affect one of my meshes. Here's my scene with a default shadow generator (blur disabled): Looking good. You can see the hard shadows from the tree, cast onto the clouds in the bottom left corner. And here's with blur enabled: The shadows look softer on the clouds, but the tree mesh got significantly darker. Here's my code: // light & shadows var lightPos = new BABYLON.Vector3(160, 80, 160); var dirLight = new BABYLON.DirectionalLight("dir01", lightPos.negate(), scene); dirLight.position = lightPos; var shadowGenerator = new BABYLON.ShadowGenerator(1024, dirLight); // shadowGenerator.useBlurExponentialShadowMap = true; // materials var treeMat = new BABYLON.StandardMaterial("treeMat", scene); var cloudMat = new BABYLON.StandardMaterial("cloudMat", scene); var atlasTex = new BABYLON.Texture("textures/Website_Atlas.jpg", scene); treeMat.diffuseTexture = atlasTex; cloudMat.diffuseTexture = atlasTex; // meshes var finishedLoadingMeshes = function (task) { task.loadedMeshes.forEach(function (mesh) { switch ( { case 'treeMeshTask': mesh.material = treeMat; mesh.receiveShadows = true; shadowGenerator.getShadowMap().renderList.push(mesh); break; case 'cloudMeshTask': mesh.material = cloudMat; mesh.receiveShadows = true; shadowGenerator.getShadowMap().renderList.push(mesh); // create cloud rings... break; } }); }; var treeMeshTask = assetsManager.addMeshTask("treeMeshTask", "", "meshes/tree/", "Website_Tree.gltf"); treeMeshTask.onSuccess = finishedLoadingMeshes; var cloudMeshTask = assetsManager.addMeshTask("cloudMeshTask", "", "meshes/clouds/", "Website_Cloud.gltf"); cloudMeshTask.onSuccess = finishedLoadingMeshes; Has anyone had this problem before? I searched the forum and couldn't find any similar issues.
  13. Whoops! Sorry, and thank YOU @Deltakosh
  14. Ah, thanks for pointing me in the right direction, @Sebavan. That demo worked fine on my phone, and I noticed it uses // whereas I was using dist/babylon.js from the repo. Using dist/preview release/babylon.js on the preview branch fixed the issue in my project. Cheers!