• Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by dbawel

  1. Path animation and mesh position

    @MarianG- I tried several conditions similar to this, but didn't get it right. Thank you very much for taking the time to answer and to update the PG. Between you and @JohnK, you helped add a key component to the project which was as frustrating as I've yet encountered. I missed the logic needed to execute this, and I wish you lived closer to San Diego, as I'd definitely buy you and John a beer - or two. Thank you again for your help. Cheers, DB
  2. Hello, I have several meshes on paths, and need to begin particle animations at specific locations on the paths. However, when I use the position of an object or child on the path to start the particle animation, the condition is never met. I assume that the transforms are not updated on path animations. If I start the particle animation, it starts. But if I place it in a condition, in the same location in my script, the particle animation will not start. I'm using it on the same path which @JohnK helped me with last night:: if (mesh.position.y > 0) { smokeSystem.start(); } and mesh is on the path passing above 0.0 - which I've tried every axis and the particle system will not start. If I use collisions by placing a cube on the path which my object must pass through such as: let abc = BABYLON.MeshBuilder.CreateBox(`abc`, { size: 5 }, scene); abc.position = new BABYLON.Vector3(-50, 10, 100); if (vehicle.intersectsMesh(abc, true)) { smokeSystem.start(); } The particles will not start. But if I say smokeSystem.start(); in the exact same location, the particles start. I've spent hours on this, and tried everything I know. If anyone can help, please let me know as I have to finish this tomorrow. Thanks much, DB
  3. Path animation and mesh position

    I updated the PG scene @JohnK was kind enough to build last night. If you un remark the smokeSystem.start(); you'll see it works. But I need the particles to only start near the top of the heart, and then stop before the bottom: https://www.babylonjs-playground.com/#72C7CT#2 Any thoughts would be very helpful. @Deltakosh - do you have time to look at this? I really need help today, as I've wasted hours on collisions, GetAbsolutePosition, and everything else I can think of. Thanks much, DB
  4. @JohnK- You are amazing in my opinion. I had switched the normals and binormals, but foolishly assumed that changing the order of the tangents would not have an extreme effect on the orientation behavior. This is a huge help to me, and I owe you one - and way beyond "one." You are a gentleman and very accomplished scholar. It's certainly a pleasure to have you as an integral part of our small (yet rapidly growing) community. I just hope I can assist you on the same level one day. Please have a great weekend! Cheers, DB
  5. Hello, I'm animating vehicles on paths, and have no flipping until I get to a heart shape. The curve is less than others, yet I'm getting tons of flipping (gimble lock.) I've tried converting the animation to use quaternions, but no such luck. Here's the code I'm using for the animation: If anyone can offer a solution to stop the constant flipping, I would be grateful. Every method I know doesn't want to work on this path. Thanks, DB
  6. Hello, I'm importing a new OBJ file with the MTL and texture into my scene every 30 seconds. When I import, I dispose of an existing OBJ and MTL, and declare their variable (array) as null. But my frame rate continues to drop as I add and dispose of objects - even though there is only 20 heads at a time in the scene - never more. But my fps drops from over 40fps to under 20fps once I add less than 10 new heads and dispose of an equal amount. I've even forced dispose, but fps still drops. Thanks, DB
  7. Compiling latest bjs

    Also, did you run a "yarn install"? DB
  8. @jpdev- Are you trying to run directly off of the repro branch? If so, then make sure you pull all necessary files, set up your json.package to include everything you are using. However what is often missed is to run a "yarn install". Otherwise you most likely won't have all of the necessary files to run directly using the GitHub files. If you already know how to do this, then please provide more info, as the question isn't entirely clear to me after reading your initial post. DB
  9. Hi DK - @Deltakosh - I'm trying to find the memory leak. However, as we move closer to delivery, I'll be far more aggressive in tracking this down. So I'll share whatever I need once we get close to delivery - if I haven't solved it by then. But, right now there's allot I can try and optimize the scene and overall architecture in the process. Thanks for looking at this, as I know how busy you and your team are. And I guarantee you'll be impressed with what we're building, as it's something not yet seen in WebGL - and pushes Babylon.js to the limit. It has also received such a great response from the executive team in Japan, America, and internationally - that they have concrete plans to take the "game" onto stages internationally for highlighting the hardware abilities of the new super secret Sony phones and features which they alone contain. Sony is extremely happy with the Babylon.js framework, and appreciate all of your personal interest in the project and the support available to us as well as the entire Babylon.js user community. I'll be trying to get you or someone from your team here soon, as Sony realizes the dramatic potential which BJS provides us now and continuing to provide in the future. The general quality of rendering, animation, and all aesthetic and subjective elements of the content is far greater than what was ever initially imagined in our (Sony's) initial discussions concerning which framework to use on both the projected content as well as any mobile content. But I'll provide you with more info on this as soon as I'm able to do so - since our project and the release of the new hardware is extremely "hush hush" - as might be expected in such a highly competitive market. However, I can tell you that what is coming is a bit "mind-blowing" in many ways. But again, thank you for building such a well thought out and well functioning framework; and providing a level of support which is unprecedented in the open source community. I can hardly wait to tell you about what's coming - and hope I'm able to show you in the near future. Thanks again, David
  10. Hi @adam Unfortunately, I have to scan a new persons head and import into the scene in a game scenario. So we'll most likely scan over 1000 heads in 3 days. I am cloning and disposing as well - could this be a problem? Thanks, DB
  11. @Deltakosh I'm importing 2 separate meshes, and the second mesh gives me an error: I couldn't copy the console, so I'm sending a screen shot. No matter what .babylon file I use in the second import, I get the same error. Here's the code: // Import Biplane model, transform, and parent to box mesh BABYLON.SceneLoader.ImportMesh('', './Demos/models3/', 'Biplane_body.babylon', scene, function (newMeshes) { Rmesh = newMeshes[0]; Rmesh.scaling = new BABYLON.Vector3(4, 4, 4); //Rmesh.rotation.x = -(Math.PI / 2); Rmesh.rotation.y = Math.PI / 2; Rmesh.position.y = -100; for (let nb = 0; nb <= (Vcount - 1); nb++) { rocketsArray[nb] = Rmesh.clone('biplane' + nb); rocketsArray[nb].position.y = 0; //console.log(rocketsArray[nb] rocketsArray[nb].parent = boxRotArray[nb]; } }); BABYLON.SceneLoader.ImportMesh('', './Demos/models3/', 'Biplane_prop.babylon', scene, function (newMeshes) { Pmesh = newMeshes[0]; Pmesh.scaling = new BABYLON.Vector3(4, 4, 4); //Rmesh.rotation.x = -(Math.PI / 2); Pmesh.rotation.y = Math.PI / 2; Pmesh.position.y = -100; for (let np = 0; np <= (Vcount - 1); np++) { propArray[np] = Pmesh.clone('prop' + np); propArray[np].position.y = 0; //console.log(rocketsArray[nb] propArray[np].parent = boxRotArray[np]; } }); Please help if you can. DB
  12. Hello, If I create a simple Blender scene with a cube which rotates, When I clone the scene I can't get the animation to play. Any examples of something this simple? I need to clone many objects and start their animation at different times. DB
  13. Cloning scenes with animation

    @Deltakosh The real scene is an airplane, and I need to animate parts on a cloned model airplane. DB
  14. Hello, I have a mesh (an airplane) which needs to be cloned 20 times - and then all 20 clones require their propeller to animate at different speeds and times. How do I identify each propeller or assign a variable (preferably a slot in a "propeller" array) to each cloned propeller to animate - once again animate separately. When I clone each airplane, how do I know the name of each child on the parent mesh, and animate it's children such as the propellers? How do I assign a unique name to each one? Once I have a unique name or variable assigned to each, then I can animate each one separately - but I don't know how to "Get" the names of cloned meshes or assign to a slot in an array upon cloning. Any ideas? DB
  15. Animate Cloned Mesh Children

    @JCPalmer - I tried every method I know to determine the names of the children of a clone. Even mesh._children(); doesn't return the children of a clone. At least I couldn't get any result from this function at all. I'm now considering separating all of the meshes from the parent file that need to animate. But considering there are dozens of meshes to animate - this adds allot of code which could easily be avoided as the children of a clone definitely have names. They must in order to animate at all. But I'm running out of time, and there appear to be no more options. DB
  16. Issue with Sandbox

    Hello, When I try to load files into the Sandbox, I receive the error: framingBehavior is null The .babylon files load fine in my scene. Any thoughts? DB
  17. Hello, I import .babylon files to use in scenes regularly; however, there is a bit of knowledge I'm lacking to fully understand how to use each of the elements in my scene independently. As an example, the following is typical code used to import a scene from Blender and clone many hierarchical meshes from this one .babylon file: And this always works - however, I often need to animate several of the meshes from this one scene separately - such as this scene above is an airplane with a propeller on the front which needs to be animated on many clones of the plane. So what I'm not clear on from reading the documentation as well as running many playground searches, is how to access the other meshes in the scene such as the propeller. I have tried to get mesh by name, access different slots in the newMeshes[] array, and every other method I can think of - but have not been able to access the propeller or other objects in the .babylon file in a simple method. The only way I've been able to animate these other meshes is to import each additional mesh separately, parent the mesh to the plane (such as the propeller) back onto the plane, and animate it's rotation separately. However, I assume this is far more effort than is necessary, and I cannot get the information I require to simplify this from the documentation. So in looking at the above code where I'm importing an airplane with a propeller and cloning the airplane and it's children including the propeller - how do I access and animate the propeller in this scene without having to re-import the propeller, parent to the plane, and then animate the rotation? The propeller is already in the scene, but I simply don't know how to access and assign the propeller in the scene to a variable and/or array to then animate as a separate object. Even though I believe the explanation is easy to understand, I've attached the Blender file so that you can see what I'm speaking about in animating the propeller(simply rotating it.) If there is a playground scene which clearly demonstrates this, it would be much appreciated. although I cannot find one. Only the "Dude" scenes, which aren't relevant to my current needs as I need to animate meshes from the scene in the babylon engine - not in Blender. I know this is done by many users on this forum regularly, but I cannot locate the info on how to set this up myself. As always, any help is greatly appreciated. Thank you, DB biplane_model.zip
  18. @Deltakosh- That is a great idea. I'll give it a try, and let you know how successful it works for me. But this is what I was considering - just not using the sandbox - which is a GREAT idea. Thanks, DB
  19. How do you put an image on a DynamicTexture?

    @chicagobob123- Perhaps this is more of what you are looking for? https://www.babylonjs-playground.com/#1390ZN#2 I use Dynamic Textures to draw onto meshes in babylon routinely. They are one of the most powerful tools I've found in the BJS framework, and I use them in so many scenes for different purposes, I've lost count.. DB
  20. Hey, I've never used any procedural textures. Where do I place the procedural texture and .fx files to reference? Thanks - I'm sure it's obvious. DB
  21. Hello, I'm able to attach spatial audio to an object in my scene. But as I'm now creating many objects and pushing them to an array, I cannot assign the audio to the mesh in the array. Here's the basic code: for (let b = 0; b <= 20; b++) { boxRotArray = BABYLON.MeshBuilder.CreateBox("box_rot" + b, {size:0.1}, scene); } const bgm = new BABYLON.Sound('backgroundMusic', './Demos/sounds/WubbaWubbaSound.mp3', scene, null, { spatial: true, maxDistance: 20, loop: true, autoplay: true }); bgm.attachToMesh(boxRotArray[0]); I've tried using the name of the object in the array, and I've also tried to assign a new variable to equal boxRotArray[0]. when I console.log(boxRotArray[0]); it is a mesh and I'm using this in many different other assignments. Any thoughts? Thanks, DB
  22. fire procedural texture

    That's excellent! I didn't even know it existed. But what if we're linked directly to the repo? I guess we need to reference in our json.package file? DB
  23. Can't assign audio to object in array

    @Pryme8 There is no access to our private repo here at Sony. But I doubt there's anything to do as it appears you can only assign a single audio file to one mesh. I've tried to work around this, but no luck. I appreciate the help though. I'm sure you'll be proud when you see the scope of what I'm building (20 players) and the efficiency of the code. I've come a long way this last year - and you were the first to really push me. Now I'm all E6 compliant. I can show the scene after we release in late March. Perhaps @Deltakosh or someone on his team has a workaround? Is there a connect() function I can index as there is in using AudioNode.connect()? DB
  24. Can't assign audio to object in array

    Hey, My bad again - not paying attention as I'm working while on the forum - I copied the code from the original post, and once again forgot to add the REAL code I'm using - so here is REALLY the code: for (let b = 0; b <= 20; b++) { boxRotArray = BABYLON.MeshBuilder.CreateBox("box_rot" + b, {size:0.1}, scene); } But I did learn more about the scene and perhaps a limitation for audio? If I run the following loop, I hear no audio: for (let se = 0; se <= 20; se++) { bgm.attachToMesh(boxRotArray[se]); } And the mp3 is not assigned to a single mesh. However, if I use a single mesh in the array, then it plays for the one mesh such as: bgm.attachToMesh(boxRotArray[0]); So this works; is this an absolute limitation of the audio assignment? I don't want to load 20 of the same audio files or make 20 separate assignments. I'll need to look further into solutions, but if anyone knows how to assign the same mp3 to many objects in an array, I'd be grateful as I hate adding unnecessary lines of code. And Andy - thanks for catching me twice - but I'm not that stupid to leave out the var in the loop. Cheers, DB
  25. Can't assign audio to object in array

    Hey Andy, I wrote this too fast. The actual code is: for (let b = 0; b <= 20; b++) { boxRotArray = BABYLON.MeshBuilder.CreateBox("box_rot" + b, {size:0.1}, scene); } And I'm using boxRotArray as variables in many different functions without issue. It simply won't allow me to assign audio to any of the objects in boxRotArray. Sorry for providing incomplete code - I should have copied and pasted as the var assignment is correct - but not the code in the original post - again, writing too fast on the forum. Thanks, DB