lagauche

Members
  • Content count

    38
  • Joined

  • Last visited

About lagauche

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. Firstly, sorry I don't have my code in front of me, but I'm wondering/thinking this is a bug. I exported a skinned mesh avatar from Maya to *.babylon format with an animation. When I load the model into babylon.js it displays and the animation begins and loops as expected. The bug is that when I change the material on any mesh from the imported skinned mesh consisting of multiple meshes (eyes, clothes, body etc) those particular meshes just stay in place. They no longer animate, but the rest of the meshes with the original imported material do animate just fine. Any ideas? In case it is relevant, I was replacing the imported material with a GLSL shader. Changing the material did work fine and in this case the avatars clothes became a GLSL texture that has some values which change over time, but again the cloth meshes just stay in place while the rest of my avatar animates.
  2. I was able to get scaling to work when I switched to using a LoadAssetContainer to import my skinned mesh then used a for loop to grab all the meshes. Now I'm trying to figure out how to access speedRatio, to lower the number from 1, but I'm not having luck. I can see that through Chrome's Dev tools it is located in the Animatables and also there is something like _activeAnimaTables, but I'm getting the callback error again when I try and do something like container._activeAnimaTables.speedRatio = 0.1 (within a For Loop). Any ideas?
  3. Hey All, I imported a .babylon skinned mesh I exported from Maya with the exporter tool. I can now see it in my scene, but I am getting an error in the console: babylon.custom.js:9757 BJS - [13:06:49]: Unable to load from models/BabylonJSTest/dancer_bjs.babylon: Error in onSuccess callback I'm also trying to scale the whole avatar (it has multiple meshes) but I can't figure out how to scale anything. Could someone provide a quick tip? I'm still very new to this : ) I attached the .babylon file and textures. BABYLON.SceneLoader.Append("models/BabylonJSTest/", "dancer_bjs.babylon", scene, function (scene) { }); BabylonJSTest.zip
  4. Hey @JCPalmer Thank you! This all super super helpful. Regarding 3. Are you suggesting I pose my mesh with the skeleton and then export the shapekeys with the skeleton still there, since you mentioned I might not be able to do one without the other? (I have to get the humanoid into position with the skeleton as the first step no matter what I assume.) File size doesn't matter since this is for a performative art installation so I will run everything locally! It can be gigabytes - doesn't matter : )
  5. Could you share a code snippet for how the Three.js specific code looks in Python? I'm just curious how that translates. Very cool work : )
  6. lagauche

    Explode Modifier?

    Could you share that animation in any form so I can get a better sense? link, video etc : ) Do you break apart the faces using morph targets? I see what you're saying about using SPS for just this one thing so I am open to all options!
  7. Hi All, Asking these questions now could save me weeks of trial and error. Any advice would be much appreciated. Essentially, I am creating a humanoid dancer whose animations I will need realtime control over, at least in terms of sequencing them. I'm using Blender to create the humanoid, but the animation part can either be done in Blender or directly in BJS. I've already started going through the forum to learn what works and does not work with Blender exporting so I will try to not ask too many questions that already have answers (I might fail at this). Here are questions that I think will help guide me to make smart choices: * I think it's important to note that I only need to import my mesh (and potentially the armature/animation, if I go that route). I do not need to import any textures, cameras, lights or environment. The Morph Target Option 1. If I use BJS Morph Targets should I export my humanoid mesh in various positions so that I end up with say 8 OBJ or Babylon files for import? 2. If I use Morph Targets is there any benefit to using the Babylon export format over using OBJ, glTF or any other format? 3. Hopefully I can pose my mesh with rigify armature and then delete it so that I'm not unnecessarily importing the armature as well since I'm just doing Morph Targets with this option, but if anyone has experience with this, any advice would be much appreciated? The armature (with Rigify) Option 4. Are there any new features with BJS 3.0/3.1 I should know about (that aren't documented fully yet) if I go the skeletal armature route? 5. Is the Babylon export format the best way to import my mesh with armature? Last two questions (and thanks for bearing with me) 6. The Blender Babylon exporter gives an error when I don't have a camera in my Blender scene. Is there any reason I need to include a camera? I'm planning on setting that up in BJS of course. 7. I've done some preliminary tests on exporting just my mesh (it has multiple sub objects, but no armature) from Blender with the Babylon exporter and sometimes I see a series of errors. Picture attached. If anyone has experience and is familiar with these errors any words of wisdom would be appreciated. I will work on trying to make (if possible for my needs) my total mesh just one mesh instead of having multiple parts to simplify my tests. I realize I'm asking a lot here so please feel free to respond to 1 or more questions or none, if you are busy : )
  8. lagauche

    Explode Modifier?

    Thank you all! I'm going to try everything you all have said, and I will post results or have follow up questions : ) Thanks for being so helpful everyone.
  9. lagauche

    Explode Modifier?

    With a few tweaks, it's exactly what I was looking for! Really cool! https://www.babylonjs-playground.com/#HDHQN#46 Is it possible to reverse time on this so that after exploding it comes back together? Any ideas?
  10. lagauche

    Explode Modifier?

    Is there any kind of explode modifier to separate all faces of a mesh and animate them? I'm used to using Three.js's ExplodeModifier and wondering if there is anything similar. It's a simple function, but I don't have enough experience w Babylon.js to go about recreating it yet: THREE.ExplodeModifier = function () { }; THREE.ExplodeModifier.prototype.modify = function ( geometry ) { var vertices = []; for ( var i = 0, il = geometry.faces.length; i < il; i ++ ) { var n = vertices.length; var face = geometry.faces[ i ]; var a = face.a; var b = face.b; var c = face.c; var va = geometry.vertices[ a ]; var vb = geometry.vertices[ b ]; var vc = geometry.vertices[ c ]; vertices.push( va.clone() ); vertices.push( vb.clone() ); vertices.push( vc.clone() ); face.a = n; face.b = n + 1; face.c = n + 2; } geometry.vertices = vertices; };
  11. lagauche

    Any GLSL shader in Babylonjs?

    Here is a playground with my code. I think I am getting close. I'm new to the playground so unfortunately this code is broken on it, but at least you can see what I'm doing : ) http://www.babylonjs-playground.com/#NCY1Q#14 edit: It's now working: https://drive.google.com/open?id=1SwhYyYoxZcwDhwh_qiuoBlEMBXdeQWy0 I was unable to load the images in firefox using just drag and drop of my index.html (no local server). I needed a local server to load images! This is a bug or by design in babylon.js because it works fine with THREE.js
  12. lagauche

    Any GLSL shader in Babylonjs?

    @bulisor I'm trying out your code but I'm still getting an error in console that says Source map error: TypeError: NetworkError when attempting to fetch resource: Source Map URL: babylon.textureTools.js.map What am I missing? Is this an extension I need to add that is not including with babylon max?
  13. lagauche

    Any GLSL shader in Babylonjs?

    @bulisor thank you for that code! I am going to try it this afternoon!
  14. lagauche

    Any GLSL shader in Babylonjs?

    I'm having a few issues right now using shaders with images. I have a javascript variable for my uniforms like this: var tuniform = { iGlobalTime: { type: 'f', value: 0.1 }, iChannel0: { type: 't', value: new BABYLON.Texture("/textures/cloudsPo2.jpg", scene) }, iChannel1: { type: 't', value: new BABYLON.Texture("/textures/internalFlesh1024Po2.jpg", scene) }, } Am I doing this wrong? I converted it from Three.js where this, for example, works iChannel0: { type: 't', value: new THREE.TextureLoader().load( 'textures/cloudsPo2.jpg') }, it would be very hard for me to convert this to a playground. Hopefully it's possible to see what I'm doing wrong without. I'm just wondering how to get that image loaded.