Search the Community

Showing results for tags 'babylon'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 391 results

  1. I am attempting to create a game in which the player realistically collides with objects (or at least doesn't clip through them), but have run into a bit of a problem. The player must be able to rotate on all axis, as well as translate on all axis. (Local space) See here: http://triblade9.wc.lt/steelprivateer/ However, the player should also collide with the "asteroids" (debug spheres). It was a simple matter getting the engine set up, and the imposters attached to the meshes. (congratulations on making a simple, robust physics engine binding ) The real issue comes when attempting to move/rotate the player. Here's what I've tested: Using the mesh.rotate and translate methods in local space like normal, and updating the body position - Result: Rotations don't work and the body position updating causes lots of jittering.Directly modifying the rotation vector, continue to use translating and updating body position. - Result: Weirdest, most confusing rotation system ever, "forward" seems to be a combination of random axis or something. Example (Yes, I know the rotation coordinates are not global, but the "forward" direction seems off)Using mesh.applyImpulse. - Result: Incredibly finicky to get a solid directional push, very quickly goes berserk when rolling or pitching.Using mesh.moveWithCollision - Result: Similar to #2, but the 'forward' direction seems even weirder.I will upload an example of #2 soon, the Babylon playground isn't working for me with Oimo.js at the moment. EDIT: Example linked.
  2. thank you in advance, I am trying to control through variables like position and scaling... a rigged character with multiple meshes in a ,babylon file,"which was exported with animations from blender". The model is made up of three base objects "Creature", "eye", and "eye2". i need to be able to control the three meshes togeither as a whole. here is a clip of my code refering to this.... // Load character object BABYLON.SceneLoader.ImportMesh("", "models/", "creature.babylon", scene, function (meshes) { var c = meshes[0]; c.isVisible = true; c.scaling = new BABYLON.Vector3(0.1,0.1,0.1); c.position = new BABYLON.Vector3(0,3,0); //c.renderingGroupId = 2; c.checkCollisions = true; CREAT = c; }); window.addEventListener("keydown", function (evt) { switch (evt.keyCode) { case 67: createCreat(); break; default: break; } }); var createCreat = function () { var posX = LANES_POSITIONS[Math.random()]; var c2 = CREAT.clone(CREAT.name) c2.id = CREAT.name+(Creats.length+1); c2.isVisible = true; c2.position = new BABYLON.Vector3(Math.random() * 100- 50, 3, Math.random() * 100 - 50); };when i load this with the meshes[0] selection it only effects the eye... [1] = eye2... [2] = Creature... how can i select all 3 at once? i will need to be able to do this for the animation as well. ty for any help you can give.
  3. Hello folks ! I recently discovered babylon.js and it's awesome ! I would like to create a FPS camera, i mean a camera that doesn't need to click on screen to move ! Can you help me with pieces of code ? Many thanks !
  4. Hi Babylon.js forum, I've been particularly setback by a problem I haven't been able to solve for the last day. I have created a stage in Blender, exported it to Babylon. I had two objects I wanted to create a compound imposter and I found createCompoundImpostor() at this site: http://blogs.msdn.com/b/eternalcoding/archive/2013/12/19/create-wonderful-interactive-games-for-the-web-using-webgl-and-a-physics-engine-babylon-js-amp-cannon-js.aspx. It says you have to create a hierarchy so I did, using .parent... except it squashed one of the meshes. I wondered if this was something in my export so I started a new test project in Blender and yet it still squashes a mesh, in particular it squashes the child mesh! Here is a section of my test code var pushers = { pusher: null, rod: null};var loaded = false;BABYLON.SceneLoader.ImportMesh("", "", "Stage-Test-4-TEST001.babylon", scene, function (meshes) { meshes.forEach(function (mesh) { if (mesh.id === "Slider_Pusher") { pushers.pusher = mesh; } else if (mesh.id === "Slider_Test") { pushers.rod = mesh; } }); pushers.rod.parent = pushers.pusher; var parts = [ { mesh: pushers.pusher, impostor: BABYLON.PhysicsEngine.BoxImpostor }, { mesh: pushers.rod, impostor: BABYLON.PhysicsEngine.BoxImpostor } ] scene.createCompoundImpostor(parts, { mass: 1, friction: 0.1, restitution: 0.1 }); loaded = true;});And here are two screenshots, first from Blender and then from my browser (Ignore the missing faces in pushers.pusher, that's just a stupid problem I encountered making this setup even though all the normals are consistent in Blender) I just cannot figure out what's going on, the only documentation on the entire Internet on this feature is the 2 lines, 1 quoted line and few lines of code from that page! I'm using Oimo.js but in cannon.js it did the same thing. Is this a library bug or am I just doing it completely wrong? Does anyone have any working examples they could share? I'm in despair and losing faith!! Haha! Cheers guys.
  5. Hey all, I'm looking for some direction on snapping objects into position against other objects edges. I'm also looking to define a snap point on an object and use that to lock it into another objects corresponding point. The first problem is essentially voxel drawing with irregular sized objects (all prisms), I need to be able to click on a face and have the new object placed in relation to the face that I clicked. So if I cast a ray and it finds the top face of an object, the new objects bottom face should align with it. (and snap to whichever side edge the mouse was closer to?) I imagine the second problem as having a little sphere attached to the objects mesh in an arbitrary location, and using that spheres center point to snap into the nearest objects corresponding anchor point. Like defining a hook on an object and using it to snap onto a clothesline. The Babylon.js API is pretty huge and I'm not at all familiar with it, but I have a reasonable grasp of the concepts involved. Any direction or suggestions on how to make a system as I described work would be greatly appreciated.
  6. Hello again.... i tried to make a simple animation in Blender to understand how skeletons/bones work in Babylon... and of course, the bottom fell out. it's just a drop dead simple bending cylinder with two bones and three key frames. i can't understand why it doesn't render correctly. i believe it's just me and my lack of knowledge, but nevertheless, i need some guidance. here's the animation: http://aeon3d.fi/test/anitest1.html it's just a simple dual viewport scene, one camera set up at left and second cam at front of the model. everything loads & works ok, no errors and such -- but the animation just looks substantially different than in the original blender file: http://aeon3d.fi/test/mdl/items/bend.blend would be nice to know what's going on.
  7. Hi, running into a problem while getting started with the library. I'm working on a TypeScript project, and the library doesn't ship with the d.ts files. It does provide a gulp task to build the declaration file, but it seems to be broken: https://github.com/BabylonJS/Babylon.js/issues/221 So my question is: does anyone have a working TypeScript declaration file they can post? Or failing that, help with creating one from the source? I have the latest tsc (1.0.1.0) and gulp installed. Thanks!
  8. Hello everyone, I had no problem on importing a blender mesh into the scene. But I'm not beeing able to make it move. I've created a class, so that you can easily instantiate one object in the scene. But since the Babylon.ImportMesh is a callback method, I'm not beeing able to access the object position in the loop method. Help Plz Thanks in advance, Kilombo.
  9. Please find my multi texture sphere implementation at http://www.babylonjs.com/playground/#KDRY0. Now I would like add actions to each of the colors in the sphere, or simply adding event handler with each sub meshes. But its not working. for(i=0;i<data.length;i++){ var currentRowSize = Math.round(data[i] * individualOffset) * rowSize; // Just adding remaing space to last item if(i == data.length-1){ currentRowSize = rowCount*rowSize - prevRowSize; } submeshes[i] = new BABYLON.SubMesh(i+1, 0, verticesCount, prevRowSize,currentRowSize , sphere); prevRowSize+= currentRowSize; sphere.subMeshes.push(submeshes[i]); submeshes[i].actionManager = new BABYLON.ActionManager(scene); submeshes[i].actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger, function(e){ console.log(e); })); }How can this can be implemented ? Please let us know your thoughts
  10. Hi everyone, I'm a new user of babylon.js and i'm trying to understand what the [meshe].getWorldMatrix() and the [scene].getTransformMatrix() matrix are representing. What is a WorldMatrix ? when I try to recuperate the world matrix of a picked mesh, I obtain a 4*4 matrix with the Identity Matrix for 3*3 Submatrix at the top left, and with the 3D position at the 4th line and I don't understand why it is like that. And concretely, how the 'Project' function is running ? I have good knowledge in algebra but I have trouble with the documentation. Thanks !
  11. Hi Gentlemen! The question is in the title... Can I change the execution speed of an animation with/in Babylon? Let me explain : I have a skeleton imported from Blender in Babylon. This skeleton has many animations. In my game projet, I have many characters based on the same skeleton. So, characters all have the same animations. Now my problem : I would like to make animations be differents in playing although they have the same skeleton. Why? Because I have many animations which are the same except the speed execution between the different characters. Otherwise, I will have to make an animation by characters and I prefer factorize as possible my code... (Especially if the animation is the same!) Thank you for your opinion on this issue. Zino
  12. I have recently started to make a simple game with babylon.js. I have created a scene and a sphere(ball). When I tried to apply texture to the sphere with the following code: var ballTex = new BABYLON.StandardMaterial("texture1", scene); ballTex.diffuseTexture = new BABYLON.Texture("ball2.png", scene); ball.material = ballTex; But the sphere is not visible. I tried full path and then also same thing happened. But when I applied color with ballTex.diffuseColor = new BABYLON.Color3(1.0, 0, 0); ball.material = ballTex; the sphere is viosibel. What and where is the problem? leorus
  13. Hello everybody, when I render this code, it doesn't show all sphere multitexture, only shows the first texture: function createSceneTuto(engine){ var scene = new BABYLON.Scene(engine); var camera = new BABYLON.ArcRotateCamera("camara",-20,-45,35, new BABYLON.Vector3.Zero(),scene); var luz = new BABYLON.HemisphericLight("Sol", new BABYLON.Vector3(-10,150,0),scene); luz.diffuse = new BABYLON.Color3(0.6,0.7,1); luz.intensity = 0.5; var cubo = new BABYLON.Mesh.CreateBox("Cubo",10,scene); cubo.position.y = 10; var esfera = new BABYLON.Mesh.CreateSphere("Esfera",10,8,scene); var espejo = new BABYLON.StandardMaterial("texturaEspejo",scene); esfera.position = new BABYLON.Vector3(-15,10,0); suelo = new BABYLON.Mesh.CreateGround("tierra",200,200,2,scene,false); piedras = new BABYLON.StandardMaterial("Piedras",scene); piedras.bumpTexture = new BABYLON.Texture("../materiales/piedras.jpg",scene); rocas = new BABYLON.StandardMaterial("Rocas",scene); rocas.diffuseTexture = new BABYLON.Texture("../materiales/roca.png",scene); madera = new BABYLON.StandardMaterial("Plata",scene); madera.diffuseTexture = new BABYLON.Texture("../materiales/madera_gris.jpg",scene); multimat = new BABYLON.MultiMaterial("multi", scene); multimat.subMaterials.push(rocas); multimat.subMaterials.push(piedras); multimat.subMaterials.push(madera); esfera.subMeshes = []; var verticesCount = esfera.getTotalVertices(); esfera.subMeshes.push(new BABYLON.SubMesh(0,0, verticesCount,0,900,esfera)); esfera.subMeshes.push(new BABYLON.SubMesh(1,0, verticesCount,900,1800,esfera)); esfera.subMeshes.push(new BABYLON.SubMesh(2,0, verticesCount,1800,2088,esfera)); esfera.material = multimat; pelicula = new BABYLON.StandardMaterial("Pelicula",scene); pelicula.diffuseTexture = new BABYLON.VideoTexture("Sintel",["../textures/sintel.ogv"],256,scene,true); pelicula.emissiveColor = new BABYLON.Color3(1,1,1); suelo.material = pelicula; espejo.reflectionTexture = new BABYLON.MirrorTexture("espejo",512,scene,true); espejo.reflectionTexture.mirrorPlane = new BABYLON.Plane(1,-1.0,10,-10.0); espejo.reflectionTexture.renderList = [esfera,suelo]; cubo.material = espejo; return scene;}This is the image:
  14. Hi all! I've been working on a Cheetah3D scene exporter for babylon.js the last days, and it's available on my github for you to have fun with it : https://github.com/Calebsem/Cheetah2Babylon What's supported right now : mesh export with functional transform, naming and parentingmulticamera export (only perspective, no support for orthogonal right now)light export with all babylon type managed :Cheetah3D spot light is a babylon spot (duh)Cheetah3D distant light is a babylon directional lightCheetah3D ambiant light is a babylon hemispheric lightevery other type is a babylon point lightsupports diffuse and specular colorrotations must be on the -Y axismaterials export:supports diffuse, emissive and specular color (plus specular power as "shininess")supports only diffuse textures, Cheetah3D api is realy sparse on thatIt still is a bit sketchy but has proven very useful for simple to very complex scenes. So if you currently use this software and wish to try exporting some static scenes to babylon, you're welcome to do so and send me some feedbacks! Also feel free to check my blog, as I will update it in case of major changes or new features! Have a nice day! Tuxic
  15. Hi guys i have little problem here, when i try to load my own exported mesh from blender with textures into babylon, i allways get "Error: WebGL: A texture is going to be rendered as if it were black, as per the OpenGL ES 2.0.24 spec section 3.8.2, because it is a 2D texture, with a minification filter requiring a mipmap, and is not mipmap complete (as defined in section 3.7.10)." and model is ofc without texture where is the problem? I tried almost every option. Downloaded models works fine, so i guess its in my models. Thanks to everyone.
  16. Hi, first of all, thank you for this great piece of code. I try to build a simple animation : 1 armature, 1 bone, and 1 cube parented to the bone. This animation works perfectly in blender. Unfortunately, it doesn't works in my babylon application. I used this code : BABYLON.SceneLoader.Load("", "myproject/assets/testRot.babylon", engine, function (newScene) { // Wait for textures and shaders to be ready newScene.executeWhenReady(function () { // Attach camera to canvas inputs newScene.activeCamera.attachControl(canvas); newScene.beginAnimation(newScene.skeletons[0],1,40,true,1.0); //newScene.meshes[0].parent=newScene.skeletons[0].bones[0]; // Once the scene is loaded, just register a render loop to render it engine.runRenderLoop(function() { newScene.render(); }); }); }, function (progress) { // To do: give progress feedback to user }Is it possible to post a simple blender animation tutorial with export exemple. I join my sample blender file. Thank tou for your reply. testRot1.zip