Jump to content


  • Content Count

  • Joined

  • Last visited

About djeustice

  • Rank

Recent Profile Visitors

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

  1. Good morning and thanks for the reply! I uploaded the glb here: https://github.com/djeustice/engine-gltf The model was created in Modo. Thanks again! Dave
  2. Good afternoon. Today I was given a glb of an engine part. The artist added a cutout texture to the model. When I load it into my BJS scene, the engine has a transparent/ghost-like appearance. I thought adding backfaceCulling = false and hasAlpha = true would solve this but no luck. Here's my code below: var myEngine = BABYLON.SceneLoader.ImportMesh("", "models/", "2.glb", scene, function (newMeshes) { myEngine = newMeshes[0]; myEngine.material.backFaceCulling = false; myEngine.material.hasAlpha = true; }); Do I have to create a new mater
  3. Nice, checking the Do Not Optimize Animations worked! Thank you kindly! For future reference, is there a place I can share scenes with custom models? Can I upload custom models into the Playground? Thanks again!
  4. We created 2 versions of an animate crane in 3DS Max 2017. One has animated pivot points, the other is rigged with bones. I tested both animations in BablylonJS as .babylon file and as glTF files. Both have this loose, floating-like appearance where the animations are happening. There are no issues with the animation when played in 3DS Max. Does anyone have insight on how to fix this? Below is an example of the crane with animated pivot points:
  5. The animation button works now! This is the code I ended up with: var isAnimating = false; var meshesForAnimation = null; BABYLON.SceneLoader.ImportMesh("", "test/", "Crane.gltf", scene, function (newMeshes) { for (i = 0; i < newMeshes.length; i++) { scene.stopAnimation(newMeshes); isAnimating = false; } meshesForAnimation = newMeshes; }); document.getElementById("Button").addEventListener("click",function () { if(!meshesForAnimation){ return; } i
  6. Wonderful thank you! I'll try this out and report back my results.
  7. I received a model of a tractor / crane arm. It is boned and animated. I exported this crane arm out of 3DS Max as a glTF. When I import it into BabylonJS, the animation begins playing immediately. I would like import the crane arm and not have the animation play immediately. I have a "Play" button and I'd like the animation to start from frame 0 when clicked. I'd like the animation to stop and return back to frame 0 when the button is clicked again. Is creating a Play / Stop animation button fairly basic (loader.beginAnimation())? Do I have to work with skeletons? Below is my code:
  8. First off, thank you all for the replies! Yes Wingnut, it is for clicking and selecting the kayak. I was hoping to use the yellow renderOutline because we use yellow outline for selection in our standalone Unity3d app. But right now I will be happy to get any type of selection working. I will check out the HighlightLayer and emissiveColors and let you know my results. Thanks again!
  9. Awesome! I tried the MergeMeshes code above and this has the perfect effect I am looking for. Only problem is it looks like the normals on the kayak flipped. I thought setting test.backFaceCulling = false; would fix it but no luck. BABYLON.SceneLoader.ImportMesh("", "models/", "Kayak.gltf", scene, function (newMeshes) { var test = BABYLON.Mesh.MergeMeshes(newMeshes); test.backFaceCulling = false; test.renderOutline = true; test.outlineWidth = 0.01; test.outlineColor = new BABYLON.Color4( 255, 200, 0, 1);
  10. Hello. I have a kayak model in my scene and I would like the renderOutline to show around the model like in the playground examples below: http://www.babylonjs-playground.com/#18ZFZ9 http://www.babylonjs-playground.com/#18ZFZ9#2 Here is code importing the kayak: BABYLON.SceneLoader.ImportMesh("", "models/", "Kayak.gltf", scene, function (newMeshes) { }); ----------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------
  11. This code works! Thank you guys for your help! myKayak2 = BABYLON.SceneLoader.ImportMesh("", "models/", "Kayak.gltf", scene, function (newMeshes) { myKayak2 = newMeshes[6]; myKayak2.material.subMaterials[0].albedoTexture = new BABYLON.Texture("models/Lime_baseColor.png", scene); });
  12. I found the correct mesh. It's newMesh[6]; To modify the base texture of the existing PBRMetallicRoughness, I've been trying out the code below. It doesn't work. But is this the right idea? I don't want to reassign the material and lose the other maps, just change the current texture. Thank you. myKayak2 = BABYLON.SceneLoader.ImportMesh("", "models/", "Kayak.gltf", scene, function (newMeshes) { myKayak2 = newMeshes[6]; myKayak2.albedoTexture = new BABYLON.Texture("models/Lime_baseColor.png", scene); });
  13. Hello. I exported a Kayak model from Substance Painter 2 as a glTF with the Metallic Roughness configuration. The Kayak has a red/yellow gradient png texture on it. Exporting from Substance Painter 2 gave me Kayak_baseColor.png, Kayak,_normal.png, and Kayak_occlusionRoughnessMetallic.png textures. In my Babylon JS scene, I import the model (Kayak.gltf)and am trying to switch the Kayak_baseColor.png to Lime_baseColor.png on load. The Kayak loads into the scene with it's red/yellow gradient png texture on it, but doens't switch to the lime texture on load.. Am I missing PBR properties?
  14. Thanks for replying. I changed my Lime Standard material to PBR material and it seems to be working now. I think it was erroring because Kayak.gltf was looking for PBR properties: var myKayak2; BABYLON.SceneLoader.ImportMesh("", "models/", "Kayak.gltf", scene, function (newMeshes) { myKayak2 = newMeshes[0]; }); var LimeTexture = new BABYLON.PBRMaterial("Lime", scene); LimeTexture.albedoTexture = new BABYLON.Texture("models/Lime.png", scene); LimeTexture.baseColor = new BABYLON.Color3(1.000, 1.000, 1.000);
  • Create New...