MattB

Members
  • Content Count

    21
  • Joined

  • Last visited

Everything posted by MattB

  1. I'm building a scene with vehicles at an intersection. I also have a bunch of tree instances that have Alpha in their leaf texture. I've noticed some weird things with how the trees are being rendered, but more importantly I noticed that you can see the vehicle's transparent windows behind the trees (below), any advice on how to fix this?
  2. MattB

    Transparencies question

    Sebavan - YES! setting transparencyMode =1 for all the trees fixed all the problems. Thanks so much!
  3. MattB

    Transparencies question

    PBR stuff is what I have been putting off, I guess I need to get use to using it. Your post is very helpful in explaining how all this stuff works. Thank you all for the fantastic information!
  4. MattB

    Transparencies question

    First off, this forum is just the absolute best, thanks so much for such quick responses and great information! I'm actually working in Blender Render and not cycles so I"m not using the GLTF PBR shader (hopefully I said that right)...The alphaMode for the trees was "2" so I changed it in runtime to "1" and they turned white (below). I'll play around with the materials some more. Thanks again for your help!
  5. MattB

    Transparencies question

    Is that an option for exporting? I'm not exactly sure what you are suggesting - I'm using the official glb2.0 exporter from blender. I'm also really struggling with how materials get translated from various programs
  6. MattB

    Transparencies question

    Here is a screenshot of one of the windows close up:
  7. MattB

    Transparencies question

    Below are the two files (is there anyway to get non-https files into a playground?) - I should specify that the windows have a standard material with an Alpha set (in this case 75%), while the trees have a leaf texture with an Alpha channel. The trees were exported as .glb files from blender, the vehicle is also a glb file converted using an fbx to glb converter, and then a new material is created and set with Alpha for the windows at runtime. http://www.forensic-visuals.com/appExamples/treetest.glb http://www.forensic-visuals.com/appExamples/AcuraSedan1_body.glb The windows are set to transparent based on the mesh name using this: for (var a=0; a<scene.meshes.length; a++) { if (name.indexOf('_MCT') !== -1){ var new_material = new BABYLON.StandardMaterial('new_material', scene); index = name.indexOf('_MCT'); alpha = name.substring(index+4,index+6); new_material.alpha = alpha/100; scene.meshes[a].material = new_material
  8. Why can I click and change the text in the right InputText box but when I assign the starting value as a variable on the left, it crashes? https://playground.babylonjs.com/#8J5XK5
  9. Ok, it seems to work if I put the variable in quotes - instead of var endFrame = 119; use var endFrame = "119"; I wouldn't mind input into why this happens though
  10. I'm trying to build a scene with multiple cameras, of multiple types. What I find is that when I move one camera it causes all the other cameras to move too. Is there a way to prevent this? Simple example: https://playground.babylonjs.com/#U0AE2U#2
  11. haha, thanks! That sounds really obvious now that you've said it
  12. I'm trying to make it so the user can create multiple measurements and then delete them individually. In the playground below, if you click in two different spots on the meshes it will create a measurement. If you click the measurement it will expand it, and if you click the X it will delete it. However, if there are two or more measurements it will only delete the last one - what am I missing? https://playground.babylonjs.com/#JIHTLS Thanks
  13. MattB

    What's next?

    Is there a way to import a point cloud, from a ply, e57, xyz etc, or does it have to be a mesh rendered as a point cloud?
  14. MattB

    What's next?

    I'd like support for point clouds - especially with variable point density. I'd be willing to donate money for this to happen :). Sort of like Potree (is there any way to get Potree to work with Babylon?)
  15. I'm trying to setup an interface so that you can toggle on and off objects or layers. Can anyone tell me why this isn't working and maybe a better way to do it? the error is from line 66, - Cannot read property of undefined. https://playground.babylonjs.com/#EN5MK5#2 Thanks!
  16. oh, thank you so much Deltakosh! And thankyou for pointing me to what I need to study - I've been reading about closures and scopes. So, is a partial reason my version didn't work is because "i" went to 3 and it was looking for layerMeshes[3]?
  17. How do I make it so that when I click "Button1" it doesn't create a decal? I thought the property "isPointerBlocker" would do it, but I'm really new to this https://www.babylonjs-playground.com/#EEUVTY#8
  18. I'm pretty new to all this, so I'm sure its something stupid. I went through the Babylon 101 tutorial and used the template html file, I then added BABYLON.SceneLoader.Append("assets/", "Alien.glb", scene, function (scene) { and downloaded the Alien.glb file from Babylon's site. But it will not show up and the debug layer gives this error: BABYLON.JS LOGS [13:23:56]: glTF Loader: t._loader._onReadyObservable.addOnce is not a function [13:23:56]: Unable to load from assets/Alien.glb: t._loader._onReadyObservable.addOnce is not a function If I change it to a sample .obj file it works fine. I also can't get it to work with the Boombox.gltf from the Babylon samples (or any other GLTF files I've created from blender). I'm running this on a Wamp server (which I also am new at). Attached is my index.html. Thanks for any help! index.html
  19. Thanks!!! I wonder why they have that in their template: https://doc.babylonjs.com/babylon101/first