• Content Count

  • Joined

  • Last visited

About JonVarner

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. Hey guys, I was checking out the demo on parallax mapping and it looks really cool. I did have one question though. Is there a way to control the number of steps? What I mean by that is if you look at it from and angle you can see what looks like layers. Is there a way to increase this number for a smoother look? Demo I was checking out.
  2. Ok thanks. I will try and post whatever I and up with here for others that might run into something similar.
  3. Hey all, I have a use case where I have two camera positions, A and B. I am currently using an arc camera. What I would like to do is rotate the camera from position A to position B using the shortest path over a period of frames. I am confident I could code this but wanted to double check there wasn't already a built in function somewhere that I was unaware of? Just seems like it would be a pretty common task. Anyway, I just did want to invent the wheel if it was already available somewhere.
  4. In the end I just ditched the Import mesh and used asset manager. Because I was loading things dynamically at different intervals, I had to use ".useDefaultLoadingScreen = false" so I did not get the preloader screen. But it seems to have solved my problem.
  5. Hey all, I am working on a scene where, for optimization purposes only render when the camera is moving, or when an object is imported into the scene. However, for some reason the scene is rendering before the model is actually ready, which leads to a partially rendered object. What is the correct way to trigger a render once the model is actually imported and ready to go? My code: BABYLON.SceneLoader.ImportMesh('', 'assets/components/', path + '.babylon', scene, (newMeshes) => { self.__forceRender = true })
  6. Thanks for the response guys. Regarding a playground example: What I would like to do is make the shadow completely black without changing the intensity of the lights. I can of course change the emissiveColor properties of materials. But for the sake of discussion, I like how my materials and light look but the only thing I want to change is the darkness of the shadow. Possible?
  7. Hey all, so I have a scene where I have lit the objects using several lights and turned one of my lights into a shadow caster. The shape of the shadow looks great but because of the other lights the shadow is just not dark enough. I can go through and redo my lighting, but that kind of stinks because everything is looking great except the darkness of the shadows. So I was wondering if there was a way to "over crank" a shadow to make it darker? I currently have the shadow darkness set to 0. Any ideas?
  8. Ok so it does seem to be a bug of some sort. By setting alpha to 0 it seems that all of the properties are no longer present except environmentIntensity which remains present even if alpha is set to 0. In the end I just used: shader.alpha = 0 shader.environmentIntensity = 0
  9. I am actually beginning to think that too. For the most part setting alpha to 0 seems to be removing most of the reflections. Here is a screen shot of what I am looking at. You have to look closely at the top of the image and you can see what looks like a "ghost" of the original material. I am looping through all of the materials and setting: shader.alpha = 0
  10. Thanks yeah, I was hoping it was going to be that easy as well. But I tried it to no effect and I don't see it as a property when I query the submesh.
  11. Hey all, I am trying to get hide a material (PBR) using alpha=0. However, a problem arises with the reflections on the material still being present. I can of course set reflectivity to 0, but it seemed that there might be a better way to simply show/change visibility of a material/submesh?
  12. Thanks Deltakosh, that was the ticket. For those who might run into a similar situation here is what I came up with. light2.excludedMeshes.push(mesh_A,mesh_B); shadowGenerator = new BABYLON.ShadowGenerator(1024, light1, true,true); shadowGenerator.getShadowMap().renderList.push(window.mesh_A); mesh_B.receiveShadows = true; var shadowGenerator2 = new BABYLON.ShadowGenerator(1024, light2); var shadowGenerator2.getShadowMap().renderList.push(mesh_A,mesh_B); mesh_C.receiveShadows = true;
  13. I have a situation where I have three meshes: "A, B, C". What I would like to do is have mesh "A" cast a shadow on mesh "B" and meshes "A and B" to cast shadow on mesh "C". But I do not want mesh "B" to cast shadows on itself. What I have so far: window.shadowGenerator = new BABYLON.ShadowGenerator(512, light, true,true); window.shadowGenerator.getShadowMap().renderList.push(window.mesh_A); window.mesh_B.receiveShadows = true;