• Content Count

  • Joined

  • Last visited

Everything posted by ragingclaw

  1. hey @MackeyK24 it's been a while! I am having an issue with the exporter. When I export my scene I get a mostly empty directory structure under the Project folder. In the scenes folder I do get the .babylon file, the scene.js file and my 1 texture, but all other folders and the main index file are missing. I am using the latest version of the toolkit and the latest version of Unity (2017.2.0f3). My workflow is, I build the scene, I export the scene. I get a message saying "Scene exportation complete.". The scene itself consists of nothing but 3 models and a camera. No animations, nothing advanced at all. Have you any thoughts on this?
  2. you should do a video on your asteroids game and also shadows. it should contain kitten noises as well because this is the internet
  3. I haven't done anything at all with skeletal animations in either unity or babylon, ive only ever rigged inside of cinema 4d, so im not much help here. I would assume the skeleton would be attached to a mesh but I have no idea.
  4. you can do whatever you want to the animations once you make the animatable. In my case, I fed in all the objects animations, but I could have just sent 1 or 2 or whatever (there are 7 total in my case). Now that we have the animatable, a, we can do whatever we want withing the animatable class http://doc.babylonjs.com/classes/2.5/Animatable like restart(), start(), pause(), etc. We could even get rid of them and replace them with something else. The experiment was simply to see if I could get something animated along a spline and have control over it. In this case, all the animations are for position and rotations so it makes sense to loop through all of them together and not by index. Make sense?
  5. What I ended up doing was creating a new animatable from the animations on the object: var hero = scene.getMeshByName("hero"); var animations = hero.animations; var a = new BABYLON.Animatable(scene, hero, 0, 150, true, 1, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE, animations); and Bob's your Uncle, loopable animations. Now there is total control over the animations to start/stop/whatever them.
  6. As a follow up to my previous post, it looks like fbx file is spitting out babylon animations in the objects animation array, so that's a win!
  7. stop trying to logic, it won't work here.. ha! I would rather not take the time to teach unity since im still a novice at it right now (but I have some plans for something mwahaha). I will try to get the JS templates going this weekend, I don't have much free time until Saturday. After watching your metadata video I was able to get what I needed to prove the toolkit is a viable solution to the workflow on the project so woot to that. It may never come to handing the project off, but I needed to know if it could be done to cover that contingency I'm curious to know how animations work though. Im testing that today. I imported an fbx file (a box moving along a spline from cinema4d) last night and when exported the animation does play, but it won't loop. I haven't dug into it just yet but is the animation converted to a babylon animation or just sent out as vectors in the update loop?
  8. I owe you lots of beers.. you complete me... ha! Thanks for the video explaining the metadata man, I appreciate it. It answers all of my questions (though my brain is slow because i feel like crap, so im sure i will ask more). What I meant by 'hand-off' is simply I have the files, and I give them to some one else to work with. Using the manager api is what I needed. I personally like to use typescript, but no one else on the team does so I have to do it in raw JS for now. I need to watch the video again to make sure I fully comprehend what's going on, but this is awesome.
  9. yup, that is exactly what I am trying to do, right down the angularjs bits. If there is a way to make those easily accessible it would be great because while the above line of code will work, it's not really multi-developer friendly. Next I'm going to try and export the cube moving along a spline path. Think I will try iTween first and see how that works out.
  10. thanks @MrVR but that isnt going to work from what I can tell. Lets say you make this and then give the Project directory to someone else who cannot go into unity. This is when I need to change the value. So putting it into that typescript file wont work once it's compiled to javascript as it doesnt see the hero.getProperty('rotationSpeedY') as valid (unless im just doing it wrong, which is more very possible). Now, I figured out that if I do this: var hero = scene.getMeshByName("Cube"); hero.metadata.components[0].properties.rotationSpeedY = 1; then i CAN change the speed of the rotation, so that works. So it goes to 1 instead of 0.005, which is great. Im hoping there is an easier way to get that property though.If there are a lot of components on that mesh then going through that components array to find a specific property is going to be a pain in the butt.
  11. Hey there @MackeyK24 I have a question about the toolkit. I'm putting this here since its related to the toolkit, but I can make this a new thread if needed. When the project builds, lets say I need to do a hand-off. For simplicity sake, lets say I have an object called Cube with a mesh component called MeshRotator, like your video. Lets say there are 3 properties on this component, 3 floats: rotationSpeedX, rotationSpeedY and rotationSpeedZ. now, how would I gain access to those values from the file hand-off? It looks like when the project is compiled it runs the this.mesh.rotation.y += this.rotationSpeedY; inside the registerBeforeRender or registerAfterRender functions. Is there some sort of global property that's queuing off of? So, if I set the rotationSpeedY = 0.005 in unity, is there a way to hand exported project off and then gain access to change that 0.005 value? Im not seeing rotationSpeedX/Y/Z on the mesh (Cube) as a property when doing console logs. Does that make sense even remotely? Im just researching how feasible it is to use the toolkit in a multi-developer environment.
  12. The angle of the dangle is proportional to the heat of the beat.
  13. yup, they are the ones. all on together crash the scene so I want to just have them on an off if the camera is right there on them.
  14. Hey there party people. I have 5 meshes that are using physics (cloth like sims). I am wondering if there is a way to disable or pause the physics if the mesh does not meet specific criteria at a given point. So it would be possible to turn physics on or off depending on some condition. Simple test, can you have a button that enables and disables physics on a per object basis? Lets say, mesh A is within x distance of the camera, so it can be on, but meshes b-e should be off. If mesh A leaves x distance, it turns off. If mesh B becomes within x distance, it turns on. Make sense? @RaananW you have experience here, what are your thoughts?
  15. @Deltakosh that is something you will need to ask @FlashyGoblin about. actually, he's standing right here. be right back!
  16. and of course I post this and find a solution. derp. was a zOffset issue after all. we just didnt go high enough for ios10 i guess. so stupid. thanks for nothing apple!
  17. hey @davrous was wondering if you had experienced any of the flicker issues yet? @FlashyGoblin and I still haven't found a work around/fix. Can you take a look and see if you get the flicker http://www.wildsavagekingdom.com/episode/mother-of-lions thanks!
  18. I am having the same issues with ios10. @RaananW knows the site Site is great in everything but ios10. It has the flicker from hell. http://www.wildsavagekingdom.com/episode/mother-of-lions EDIT: was a z offset issue after all. I am still blaming ios10 because I can though.
  19. can the camera be used like that though? is it considered a mesh?
  20. Hello BJS sorcerers, I am in need of your voodoo once again! I am using an arcRotateCamera. I have some hidden boxes that I am using as colliders the camera can pass through. Here is the lowdown: camera is outside of the party box camera is inside the party box so it makes a little love, does a little dance, and gets down tonight and sends a message to angular "im at the party" (true) camera leaves the party box. stops with the love making, no more dancing - it only cries itself to sleep, and sends a message to angular "i left the party" (false) I am using .onCollide to detect the collisioins between the camera and other stuff. The hidden boxes do have checkCollisions = true; I get the logs for the true event, but I never get false. some code for you to laugh at: scene.executeWhenReady(function() { _scene.collisionsEnabled = true; var cam = _scene.activeCamera; cam.collisionRadius = new BABYLON.Vector3(1, 1, 1); cam.checkCollisions = true; cam.onCollide = function(collidedMesh) { if (collidedMesh.obj_type == "locations") { cameraAtLocation = true; console.log('cameraAtLocation', cameraAtLocation); } else { cameraAtLocation = false; console.log('cameraAtLocation', cameraAtLocation); } }; }; so to recap, I need to know when the camera leaves the collision if that makes sense. Thanks you wonderful people!
  21. Thanks, I'll check out the MipMaps docs.
  22. I saw a previous post from a few years ago asking this and the answer was a no, but.... has texturing/material LOD been added yet? I have a mesh I need to re-texture based on distance (the actual mesh is fine but the texture is expensive). I have 3 sets of textures I need to cycle. These textures are tile based. I have a 512, 1k, and 2k tile set each in there own folder. That is the other piece of the puzzle, texture subfolders. I sent @Deltakosh a message on twitter asking about that part. Look, I need you to tell me this works.. if it doesn't.. lie to me and tell me it does anyway because it should work... what kind of cruel world do we live in where we cannot do this i ask...
  23. GUYS GUYS GUYS!!!! I FIGURED IT OUT GUYS!!! OMFG STOP THE PRESS AND GRAB YOUR BUTTER CHURNER BROOMS!!!!! ok, actually, a guy I work with named Dave (ANOTHER FREAKING DAVID!) figured out the formula I am using but whatever, screw him, this is my win. http://www.babylonjs-playground.com/#28AM9V#9 is the solution Sorry @Wingnut but I went with @Deltakosh's idea of not using the mouse wheel at all. This is how it works (pay attention it is about to get all calculated and crap all up in here) the goal is to sync the two ranges. We do this by using the upper and lower bounds of the camera radius and syncing that percentage change to the upper/lower bounds of the allowed beta range. This gets checked in the registerBeforeRender function. Since I am not longer using the mouse wheel event I don't have to worry about doing extra crap for mobile too, it will just work. // the numbers here are just to help you process what is going on. var camera = scene.activeCamera; var camera_max_radius = 50; var camera_min_radius = 6; var cam_radius_range = 44; var camera_beta_max = 64; // (*degrees) var camera_beta_min = 45; // (*degrees) var camera_beta_range = 19; // (*degrees) var range_difference = camera_beta_range / camera_radius_range; // 19/44 var beta_in_degrees = (camera.radius - camera_min_radius) * range_difference + camera_beta_min; var new_beta = deg_to_rad(beta_in_degrees); // ** function deg_to_rad(deg){ return (deg * Math.PI) / 180; } /* lets test with some made up numbers to see what the formula actually looks like current_radius = 44 beta_in_degrees = ( 44 - 6 ) * 0.43 + 45 = 61.4 beta in radians = 61.4 * 3.14 / 180 = 1.07163216 now, that might make you go.. ummmm ok... but what it means is IT FREAKING WORKS! TEST SUCCESSFUL! you may proceed to the next testing chamber. */ * arcRotateCamera uses Radians, not degrees, but my brain processes degrees easier ** convert degrees to radians for the arcRotateCamera to understand using the formula: (deg * Math.PI) / 180 I have notes in the playground for all of this as well. It is also worthy to note the following: WUBBA LUBBA DUB DUB!