Search the Community

Showing results for tags 'babylon'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 391 results

  1. Hi, I've switched from BJS 3-beta to BJS-3 final and now get this error: Error status: 404 - Unable to load src/Shaders/ShadersInclude/shadowsVertexDeclaration.fx What's causing it?
  2. I have a babylon.js scene on which I have added some meshes. I want to make the preview image where all meshes would be in camera frustum and fitting exactly the user's screen. How can I do it? Please, fix my playground:
  3. Hi folks, I am a beginner for babylon.js and blender. So I imported a cube with one face textured from blender to babylon js using BABYLON.SceneLoader.Load. The scene has the default point light in blender and the HemisphericLight I created using babylon.js. Everything looks good (please see the 2.jpg in the attachment), but after I resize the cube to make the cube flat (using cube.scaling.y = 0.1), the lower part of the textured face will be always shadowed, no matter how i adjust the light or how to move the cube (please see the 1.jpg). I already made the scene as simple as possible to narrow down the cause of the issue, but I still cannot figure out why the lighting cannot be rendered properly. So any help will be much appreciated!
  4. Hi there! I'm new to the community, and also to Blender and Babylon.js. I made my first model in Blender v 2.78 (a basic creature, humanoid type), rigged it and animated a simple walk movement (or a half one, right foot forward, left foot back). I baked my IKs, then exported the whole animation and mesh with the babylon exporter (v. 4.6.1). When I import the animation in Babylon it gets distorted. When the arms and legs goes forward/backward, they move too much upwards. I attached the .blend file, and i have a working online demo also: It is password protected: thyalie:iso88591 First of all, I want to find out that the babylon settings cause this, or the blender exporter, or i did something wrong in blender (this last seems the most likely, but i dont know what i missed). Thanks for helping in advance! cube.blend cube_baked.blend
  5. Hi Everyone, I am working on 2D planner. I have this demo am facing following issue: 1) As you can see i have created custom mesh (window object named w1) on top left corner of design. The code is at line 369,370. This window object have y index greater than another slot element(green slots) on top of which it lies. So there is no collision. I am aware that mesh border rendering flickers when the borders of mesh collides with each other.but i am ensuring that it is not colliding with object below it. how can i fix flickering ? 2) The text(W1) is created on top of plane having default white color. this plane hides green slots which are behind them. I have tried setting alpha property to make the plane transparent. however it is also changing transparency for text on it. How can i fix this line 138
  6. Hi, can anybody teach us or help resolve Levrage? How should I resolve that horizontal green bar will rotate around his origin point (origin point is in center of green bar) and push tile on the other side? So that ball push green bar on his side and than bar should push Tile on the other side. Can anybody complete code in playground and teach us how to do this? I decide to prepare more playgrounds (simple models) like tutorials for learning. Here is plaground I'm not such good in physics but I really would like to learn new things. greetings Ian
  7. I maked simple hexagon in blender and i want change colour on click button "Click me". How I can refer to the specific id (In this case - Cube) from blender in my script? Can you check my html file? I'm not sure that all it's good. It's blender file {"producer":{"name":"Blender","version":"2.78 (sub 0)","exporter_version":"4.6.1","file":"szescian.babylon"}, "autoClear":true,"clearColor":[0.0509,0.0509,0.0509],"ambientColor":[0,0,0],"gravity":[0,-9.81,0], "materials":[{"name":"szescian.Material","id":"szescian.Material","ambient":[0.8,0.7048,0.0663],"diffuse":[0.64,0.5639,0.0531],"specular":[0.5,0.5,0.5],"emissive":[0,0,0],"specularPower":50,"alpha":1,"backFaceCulling":true,"checkReadyOnlyOnce":false}], "multiMaterials":[], "skeletons":[], "meshes":[{"name":"Plane","id":"Plane","billboardMode":0,"position":[0.2658,0.2489,1.9542],"rotation":[0,0,0],"scaling":[5,5,5],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[1,0,-1,-1,0,1,-1,0,-1,1,0,1] ,"normals":[0,1,0,0,1,0,0,1,0,0,1,0] ,"indices":[0,1,2,0,3,1] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":4,"indexStart":0,"indexCount":6}] ,"instances":[]} ,{"name":"Cube","id":"Cube","materialId":"szescian.Material","billboardMode":0,"position":[0,1,0],"rotation":[0,0,0],"scaling":[1,1,1],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1] ,"normals":[0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773] ,"indices":[0,1,2,3,4,5,5,0,2,4,6,0,6,3,1,2,3,5,0,6,1,3,7,4,5,4,0,4,7,6,6,7,3,2,1,3] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":8,"indexStart":0,"indexCount":36}] ,"instances":[]} ], "cameras":[{"name":"Camera","id":"Camera","position":[7.4811,5.3437,-6.5076],"rotation":[0.4615,-0.8149,0],"fov":0.8576,"minZ":0.1,"maxZ":100,"speed":1,"inertia":0.9,"checkCollisions":false,"applyGravity":false,"ellipsoid":[0.2,0.9,0.2],"cameraRigMode":0,"interaxial_distance":0.0637,"type":"FreeCamera"}],"activeCamera":"Camera", "lights":[{"name":"Lamp","id":"Lamp","type":0,"position":[4.0762,5.9039,1.0055],"intensity":8.22,"diffuse":[0.1138,1,0.1492],"specular":[0.1138,1,0.1492]}], "shadowGenerators":[] } My html code <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"/> <title>Babylon - Getting Started</title> <!-- link to the last version of babylon --> <script src="js/babylon.2.5.js"></script> <link rel="stylesheet" href="css/style.css"> </head> <body> <canvas id="renderCanvas"></canvas> <button id="sweetButton">Click me</button> <script> window.addEventListener('DOMContentLoaded', function(){ var canvas = document.getElementById('renderCanvas'); var engine = new BABYLON.Engine(canvas, true); engine.enableOfflineSupport = false; var createScene = function(){ var scene = new BABYLON.Scene(engine); // create a FreeCamera, and set its position to (x:0, y:5, z:-10) var camera = new BABYLON.FreeCamera('camera1', new BABYLON.Vector3(0, 5,-10), scene); // target the camera to scene origin camera.setTarget(BABYLON.Vector3.Zero()); // attach the camera to the canvas camera.attachControl(canvas, false); // create a basic light, aiming 0,1,0 - meaning, to the sky var light = new BABYLON.HemisphericLight('light1', new BABYLON.Vector3(0,1,0), scene); BABYLON.SceneLoader.ImportMesh("","","szescian.babylon",scene); return scene; } var scene = createScene(); engine.runRenderLoop(function(){ scene.render(); }); window.addEventListener('resize', function() { engine.resize(); }); }); </script> </body> </html>
  8. Hi Team, I have got a demo for 2D planner here DEMO 1 : The yellow box meshes are draggable horizontally and vertically(go give it a try....). Now, I wanted to prevent dragging over the places where yellow box already exist(prevent collision of yellow box). In order to do that, I have made some changes in demo 1 to implement moveWithCollisions : Demo 2(using moveWithCollisions) - Changes done: 1) Used checkCollisions and set ellipsoid(equal to width,height,depth of box) for yellow boxes: At Line : 39 - 40 box.checkCollisions = true; box.ellipsoid = new BABYLON.Vector3(sWidth, sHeight, sDepth); 2) set gravity to scene and gravity with ellipsoid to camera(not sure if this is needed as i want prevent collision among yellow boxes): At Line : 72-75 scene.gravity = new BABYLON.Vector3(0, -9.81, 0); camera1.applyGravity = true; camera1.ellipsoid = new BABYLON.Vector3(1, 1, 1); 3) enable collision for scene and camera At Line : 76-77 scene.collisionsEnabled = true; camera1.checkCollisions = true; 4) For horizontal dragging, moveWithCollisions for translating x instead of setting position.x (commented that code, line 194) : At Line : 195 currentMesh.moveWithCollisions(new BABYLON.Vector3(currentMesh.minxpos + Math.round((currentCursorXPosition - currentMesh.minxpos) / horizontalSlotWidth) * horizontalSlotWidth, currentMesh.position.Y, currentMesh.position.Z)); 4) For vertical dragging, Use moveWithCollisions for translating z instead of setting position.z (commented that code, line 201) : At Line : 202 currentMesh.moveWithCollisions(new BABYLON.Vector3(currentMesh.position.Z, currentMesh.position.Y, currentMesh.minzpos + Math.round((currentCursorZPosition - currentMesh.minzpos) / verticalSlotHeight) * verticalSlotHeight)); However, the dragging is completely gone now. what am i missing here
  9. Hi guys, I'm creating an UI for my babylon game via the Canvas2D, precisely the ScreenSpaceCanvas2D. Now I want to know if it's possible to update the text dynamically without recreating/overwriting the text2d child every time the score variable (which is used for displaying) is updated. Playground link for simplified case: Thanks in advance!
  10. Hi Team. I was checking the action manager page over here in order to attach the event on edge/border pick . I wanted to scale(set height,width,depth based on vertex picked) the mesh(box object) when user picks borders and drag it. something like Any idea how this should be handled.
  11. Hi Team, I am doing a good progress for migrating 2D planner to use babylon js. Here is the playground for same: I am having couple of issues here, There: 1) as you can see the boxes with yellow faces depicts certain walls that are draggable in respective rows and columns. However horizontal walls can not be dragged to the last slot in its current room row and vertical slot is not draggable on top most slot in its column. what am i missing here? The code for horizontal draggable to right is on line : 183 The code for vertical draggable to top is on line : 196 2) How can i avoid dragging element to position where there is already a wall with yellow faces. 3) There is some code which is causing the page to become unresponsive.This do not happen consistently but i can see the high memory uses in chrome task manager. Any help would be appreciated. Thank you for stopping by...
  12. Hi, I'm using the brilling water material and would like to change a couple of things: - Specular highlights are currently black near horizon, and I'd like to change them to white as it would look more natural. - Use either an alpha falloff or a different mesh (more like a curved disk) as a surface, as using a plane makes horizon square. Would appreciate any suggestions. P.S. The water materials works great on my veteran iPhone 5s. No slowdowns!
  13. I have used below code to disable rotation. camera1.inputs.attached['pointers'].detachControl(canvas); This removes all pointers events. 1) However i would like to only remove rotation feature only. and click + drag should be binded for panning feature(which is on cntrl+click+drag now) 2) how can extend the control keys for zoom and panning feature. i was hoping to implement something like this: A : Pan left D : Pan right W : pan front S : pan back And also over
  14. I have rendered a 2d scene using one of the json data. For this, I have used 2d rectangles to implement the walls of home planner. However the zoom in zoom out feature isn't working despite setting arcrotatecam and cameras setposition and target. What am i missing here? If it doesn't work, I was hoping to implement scaling(as suggested in one of the post by @Wingnut) and re positioning element when user is scrolling in and out. But not sure whats the best way to re position all the elements though. Any help and suggestion would be great.. Thanks.
  15. Hi Team, I am working on 2D house planners. I have following design. Created using boxes: However the edges/border of design looks broken when camera is positioned at 200+ distance with respect to y axis of design. The only time they are visible properly is when they are viewed closely when zoomed. How can i fix this?
  16. Hi Team, I have hosted one of the playground code. Here is the link to hosted URL(i have also left the debugger so that any one can play around): 2D-engine-worldspace However i am getting following errors there: Error 1: d._cacheNode.getInnerPosToRef is not a function at WorldSpaceCanvas2D.Group2D._bindCacheTarget (babylon.js:94301) at WorldSpaceCanvas2D.Group2D.applyCachedTexture (babylon.js:93634) at new WorldSpaceCanvas2D (babylon.js:100564) at createScene (2denginescrrenspace.html:58) at 2denginescrrenspace.html:73 for below code: canvas= new BABYLON.WorldSpaceCanvas2D(scene, new BABYLON.Size(200, 200), { id: "WorldSpaceCanvas", renderScaleFactor : 4 //worldPosition: new BABYLON.Vector3(0, 0, 200), //worldRotation: BABYLON.Quaternion.RotationYawPitchRoll(0, 0, 0), //enableInteraction: true }); Error 2: Uncaught Error: Parent renderCanvas of mainRect_58_54.1 doesn't have a valid owner! at Rectangle2D.Prim2DBase [as constructor] (babylon.js:89031) at Rectangle2D.RenderablePrim2D [as constructor] (babylon.js:92644) at Rectangle2D.Shape2D [as constructor] (babylon.js:93235) at new Rectangle2D (babylon.js:95191) at createBox (2denginescrrenspace.html:38) at flytrapdatascreenspace.js:464 for code: var box = new BABYLON.Rectangle2D({ id: "mainRect_"+posX+"_"+posY, parent: canvas, x: posX, y: posZ, width: sWidth, height: sDepth, fill: "#404080FF", border: "#FFFFFFFF", borderThickness: 0.2, children: [ ]}); return box; I have downloaded babylon js from version builder. What am i missing here?
  17. Hi Guys, I am working on 2D house planners. I have successfully rendered the design using json data structure i have. However i am struggling with following things: 1) positioning camera in such a way that design lies exactly in between the screen. currently its on top right corner of screen. 2) zoom in zoom out should work with respect to cursor position. I.e. if i am having cursor on left side of planner, then that part should be focused(start coming to center) when zoomed in. Any help would be appreciated.
  18. Hi All, It's been a while... I've got a question re models/meshes imported from Blender unit size. What would be the optimal unit of, say, 1 meter? As far as I understand, if a chosen unit is too small, it will affect reflections/shadows etc?
  19. Hi Team, I am having following code to create box(and also similar code to create planes in some cases): var box = BABYLON.MeshBuilder.CreateBox("box1", {width: sWidth, height: sHeight, depth: sDepth,updatable:true}, scene); box.enableEdgesRendering(); box.edgesWidth = 2.0; box.edgesColor = new BABYLON.Color4(0, 0, 1, 1); This creates solid edges on box/mesh. Is there any way to make dashed lines instead of solid ones.
  20. when exporting my model to .babylon (using blender) it gives this error "RuntimeError: Error: Maximum number of textures added 18" the model export correctly but some textures are missing. Can anyone help me ?
  21. Hi Folks, I am downloading the snippet from using zip option. So that i can include it in my project and start working on it. However i am getting the error on load itself: 'Cannot read property 'isVerticesDataPresent' of undefined.' Nor do attached camera works. any help would be appreciated. Thanks..!
  22. Hello, I'm trying to render a crystal clear plastic object with really bad results. I need the render to be realistic and close as possible to the real one (see attached pics). Any suggestion or examples?
  23. i have problem with texture when i convert obj file to babylon using blender software ,i get noise textures and it add a new texture called "NORMALS" here the original texture and the noise one
  24. Hi Team, I have a requirement to create a custom shaped rectangle. I am using Lines2D as the shape may not be standard rectangle. however the lines are not rendering for rectangle. My goal is to make this rectangle as container and other objects which are represented as lines can be dragged and dropped on it. Any help would be appreciated. Thanks..!!
  25. I am having trouble enabling zoom in zoom out feature in 2d scene. what am i doing wrong here: