Search the Community

Showing results for tags 'babylonjs'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Found 308 results

  1. Hi BabylonJs lovers, Now you can apply transparent background on videos with chromakey (green background). Check the demo here: http://www.babylonjs-playground.com/#P75330 Enjoy...
  2. Howdy, I'm struggling to conceptualize how I would tackle solving the following task. Imagine you have a scene as displayed in the attachment. I would like to bind scroll to moving the camera along a predefined path. Breaking it down into components...how do I: Attach a Camera to a predefined path? Allow a user to move the camera along that path? Any suggestions that might point me in the right direction? @Deltakosh Thanks, JPS
  3. Aliasing in VR mode

    Hey everyone, We are building an environment that contains many thin lines and grills. While in normal mode everything looks fine (with Babylon's AA enabled), however after entering the VR mode (using the VRhelper) jagged edges become very apparent to the point that it's impossible to distinct some of the details. I have made a few screenshots with test environment to demonstrate the problem. Solutions like FXAA plugged to post processing pipeline make everything blurrier and worse. I'm wondering why is it happening (stereo cameras are super low-res?) and is there a way to deal with it? It would be ok to take some performance hits and render everything internally in much higher resolution for example. What are the good practices for fighting the jagged edges in VR in general? Many thanks in advance!
  4. Hello everyone, I’m Mostafa Kaouri founder & CEO at YouAugment, a free augmented reality app creator. I’m going to introduce you to YouAugment AR app creator that was developed with BabylonJs 3D Engine and Artoolkit. - What’s YouAugment AR app creator?AR app creator is a web enabled application that can help anyone to create their AR app for free and without coding skills. It can work on your iphone/ipad or android enabled devices. It's highly depends on BabylonJs.- Why I made it?I’m looking for everyone to get the absolute benefit from Augmented Reality without pain on coding or paying for high cost licenses.- Why it’s free?I made it free for you to be part of AR community and let you engage your customers, family or friends to experience the AR technology for any purpose you are looking for such as increasing sales, education, or entertainment.- How do I support it?It’s my passion to continue improving and supporting the youaugment AR app creator from my income and interested investors.- Contact usIf you’ve any question, please feel free to contact me on ceo@youaugment.com
  5. Hello everyone, I’m Mostafa Kaouri founder & CEO at YouAugment, a free augmented reality app creator. I’m going to introduce you to YouAugment AR app creator that was developed with BabylonJs 3D Engine and Artoolkit. - What’s YouAugment AR app creator?AR app creator is a web enabled application that can help anyone to create their AR app for free and without coding skills. It can work on your iphone/ipad or android enabled devices. It's highly depends on BabylonJs.- Why I made it?I’m looking for everyone to get the absolute benefit from Augmented Reality without pain on coding or paying for high cost licenses.- Why it’s free?I made it free for you to be part of AR community and let you engage your customers, family or friends to experience the AR technology for any purpose you are looking for such as increasing sales, education, or entertainment.- How do I support it?It’s my passion to continue improving and supporting the youaugment AR app creator from my income and interested investors.- Contact usIf you’ve any question, please feel free to contact me on ceo@youaugment.com
  6. I was wondering whether or not it's possible to get the world/3D positions of different textures using the TerrainMaterial. Let's use the TerrainMaterial PG as an example: https://www.babylonjs-playground.com/#E6OZX#7 Now, let's say I want to place meshes wherever the rock texture is used on the ground mesh, programmatically and automatically. I don't seem to find any relevant references or functions in the object, and can't think of a proper way without loading the image separately and somehow map those colors to the ground positions.
  7. Hi everyone, I'm trying to integrate VR cameras to my project, but I encountered some problems with the VRDeviceOrientationArcRotateCamera. As you can see there : https://www.babylonjs-playground.com/#1BILUK#2 , I can't set the target of the camera on the moving sphere, and I have no idea what's going wrong with my code. If you have some ideas about how I can fix that, you are very welcome
  8. Mesh showBoundingBox is bugging

    Hello all, I just finished the migration to the new Babylonjs and all dependencies for my project. now i'm pointing to the latest builds directly from URLs. Something that i could not fix and that was working before is the showBoundingBox attribute in mesh, it looks like that Babylonjs is generating a wrong mesh fro the bounding box. It's reproducible in Playgroundground, tested on Firefox, Chrome and MS Edge http://playground.babylonjs.com/#07U3EY Best regards DarkLight
  9. Hey, I have an issue with loading textures using an .obj and .mtl file. There's over 300 textures that need to be loaded in. I've checked the developer console in chrome and it appears that BabylonJS does indeed load them in, but they're still appearing as black textures in the view-port. Check below for image: I've seen that this is a common issue with .obj and .mtl files. Just wondering if anyone actually has a solution for this? Pete.
  10. Hi, I'm trying to use Angular 2 to create a BabylonJS scene - but seem to having some difficulty getting the OBJ loader to bring in the OBJ model. I'm getting this error: Unable to import meshes from http://localhost.cdn.com/b_azir.obj: importMesh of undefined from undefined version: undefined, exporter version: undefinedimportMesh has failed JSON parse. http://localhost.cdn.com is just an IIS website that points to a localhost website that contains the model files. (OBJ, MTL and textures). I can navigate to http://localhost.cdn.com/b_azir.obj fine. So that's no issue. I can include the code if one wishes. I would create a playground. But does it support TS? Thanks, Pete.
  11. So a gotcha of the moveWithCollisions method is that it uses an ellipsoid mesh to calculate collisions of your mesh instead of the original mesh dimensions. I see a clear way to remove your original mesh but how do we remove the ellipsoid mesh from the scene? I'm worried that keeping these ellipsoids even when my original mesh has been disposed of will hurt performance. Thank you so much.
  12. I spent around 4 hours scratching my head and still can't figure this out! If you throw an object in front of you and then move left or right, how can you tell which side you are on? I'm using BabylonJS so it would be super helpful if you could limit the methods used to that library. Otherwise, a clear mathematical question would suffice. Thank you so much!
  13. Hello all, Im trying to load a mesh using FilesInput via Drag and drop like in the sandbox. Im always getting the following error: 'Error: No camera defined babylon.js:10:28650' I tried alot of solutions and im always getting the same error. The scene is already created and rendering perfectly i want just to get the meshes from the files. Here the code for the creation of the FilesInput instance. filesInput = new BABYLON.FilesInput(sceneManager.engine, sceneManager.scene, sceneLoaded, null, null, null, function () { BABYLON.Tools.ClearLogCache() }, null, sceneError); And here the call for the loadFiles on drop event. function drop_handler(ev) { console.log("Drop"); ev.preventDefault(); filesInput.loadFiles(ev); } Please note that sceneLoaded callback is not even called. Thxs in advance Regards Darklight
  14. 3D Web Constructor

    Hello all i want to present you my new project, It's a Web CAD (It will be in the future ) for the moment it's more a viewer. For the moment i am focusing to include the most common features of BabylonJs. Here a capture of the current state As you can see it allows to see the loaded object structure, in the tree you can hide or show or allow wireframe to the a specific object, in addition you have the global actions that will be applied for all meshes. The application also has a custom context menu Here the Prefab creation section Here what i call the compound objects Mode (CSG Balybon plugin) I implemented a 3D section mode also (Still contains some bugs ) For the moment the Import is hard coded i don't have yet a server side implementation, this is the next step. The toolbar contains some other options like remove, clone mirror a mesh, change camera views, and camera behavior on selection. Your feed backs are all welcome (Positive or negative), any ideas are welcome too. Here the link to the project on github you can try it your self https://darklight4070.github.io/3DWebConstructor/ And here the source code https://github.com/DarkLight4070/3DWebConstructor And thxs for this nice BabylonJs framework Regards DarkLight
  15. Hi friends, I'm new to babylon js. i want to add a slope the player want to jump from that. but i don't know how to add this.
  16. Hi All, I've just made available a new github project for using BabylonJS with Microsoft Visio. It enables Visualization of Visio Diagram in 3D. https://github.com/MichelLaplane/VisualShow3DLight Even it is a very simple use for now, I'm faced with two problems : - How to disable the security warning when launching WebBrowser Control - How to call JS function that are in other file than the HTML landing page of the solution. Any suggestions will be appreciated.
  17. QUESTION: What are the minimum steps required to get a bone to export from blender and to be visualized with Debug.SkeletonViewer? Having trouble making a cube add a bone and then export to babylon. After a bunch of variations I see why... there are many steps: Applied: Object->Apply->Location & Rotation & Scale. And ensured Camera Icon is on Armiture (exporting). Weight Painted. Or setParent-> Auto Weights. And added Armiture modifier... still no bones. Tried two different loading types, two different export types (Tower of Babel), and then... #3 glTF. Fabulous! I'll leave the tips that I find below. GOAL: open blender > add 1 bone inside a cube or tube and > export to .babylon > then see bone with Debug.SkeletonViewer. PURPOSE: to run a bunch of test animations on bones (at runtime). CONTEXT: Blender version (2.78) and updated the exporter (babylon.js ver 5.4.2). Also Tower of Babel, and glTF exporter 1.0. UPDATE: glTF animations look promising. I'll provide answer here for minimum steps to animate GLTF Blender Export. Any tips of things to try in this experiment? Thx.
  18. Hey all, Has anyone integrated web midi with BabylonJS? I'd like to trigger events in Babylonjs with WebMIDI. I'd also like to explore OSC but WebMIDI is more important. Unfortunately a google search turned up next to nothing. If anyone can point me to some libraries or pass me any tips i'd much appreciate it!
  19. I'm creating a mesh from scratch but when I add a texture, I get nothing. The plane is simply white. Are my UV coords or normals not set up correctly for Babylonjs or am I missing something else? import { Mesh, VertexBuffer, StandardMaterial, Texture } from 'babylonjs' export default function CreateMesh(height, width, scene) { const mesh = new Mesh('TerrainMesh', scene) const indices = [] const vertices = [] const normals = [] const uvs = [] const startX = -width / 2 const startY = -height / 2 let index = 0 for (let y = 0; y < height; y++) { for (let x = 0; x < width; x++) { vertices.push(startX + x, 0, startY + y) uvs.push(x / (width), y / (width - 1)) normals.push(0, 1, 0) if (x < width - 1 && y < height - 1) { indices.push(index, index + width + 1, index + width) indices.push(index + width + 1, index, index + 1) } index++ } } mesh.setVerticesData(VertexBuffer.PositionKind, vertices) mesh.setVerticesData(uvs, VertexBuffer.UVKind) mesh.setVerticesData(normals, VertexBuffer.NormalKind) mesh.setIndices(indices) let groundMaterial = new StandardMaterial("ground", scene) groundMaterial.diffuseTexture = new Texture("textures/earth.jpg", scene) mesh.material = groundMaterial return mesh }
  20. How to camera go upstairs !

    Hi, I created stairs using CreateBox , i'm asking if it's the right way ! And i'm asking also , how can i make the camera go upstairs ! Thank you for your answers.
  21. Hello, I am working on a catch and run game, and I have cat and rat meshes along with a height map that creates walls for me. I have the locations of rat and cat, also my objective is using websocket to play this game, so I should know information about locations. Simply, I want to send some information to the users so, they can decide which way to go. In Gazebo simulation program, LaserScan that has distance array to the obstacles with decided view of angle such as pi radian is used for deciding which way to go with no knowledge of the world. How can I achieve this goal? How can I get the distances to obstacles which provided with some decided angle of view. I want to do this in that way, because any indexing can be wrong for some situations like roundoff errors may occur, but any suggestions is welcomed. Please consider the fact that I will send this information to users, and wait them to understand quickly.
  22. Hello , It's my first post in the forum. I need your help. When i click in a mesh , i need the camera get in front of the Mesh. Thanks for your answers.
  23. Playing with shader

    Hello guys, see the GIF please https://ibb.co/kZkrBR. I wonder how to do something like this in babylonjs, I did this in opengl project by sending a value to a uniform in fragment shader. should I do the same with babylonjs ? ; should I modify babylonjs shaders ?, or there is a better way to do that.
  24. Hello, I am developing a 3d page, with babylonjs, I have the scene, that I am modeling and exporting in "blender" to a babylon file. In code I am adding shadows and lights, some of these lights I need turn on an turn off whe the lamp is clicked. I create the lights like this: //Luz global light[0] = new BABYLON.DirectionalLight("LuzGlobal", new BABYLON.Vector3(0, -1, 1), scene); light[0].diffuse = new BABYLON.Color3(1, 1, 1); light[0].specular = new BABYLON.Color3(1, 1, 1); light[0].direction = new BABYLON.Vector3(0, -1, 1); light[0].position.x = 27; light[0].position.y = 28; light[0].position.z = -89; light[0].intensity = 1.0; //createLensFlare(); //Creamos las luces de las lamparas light[1] = new BABYLON.SpotLight("lampara1", scene.getMeshByName("lamp1").position, new BABYLON.Vector3(0, -1, 0), 0.8, 2, scene); light[1].diffuse = new BABYLON.Color3(1, 1, 1); light[1].specular = new BABYLON.Color3(1, 1, 1); light[2] = new BABYLON.SpotLight("lampara2", scene.getMeshByName("lamp2").position, new BABYLON.Vector3(0, -1, 0), 0.8, 2, scene); light[2].diffuse = new BABYLON.Color3(1, 1, 1); light[2].specular = new BABYLON.Color3(1, 1, 1); light[3] = new BABYLON.SpotLight("lampara3", scene.getMeshByName("lamp3").position, new BABYLON.Vector3(0, -1, 0), 0.8, 2, scene); light[3].diffuse = new BABYLON.Color3(1, 1, 1); light[3].specular = new BABYLON.Color3(1, 1, 1); light[4] = new BABYLON.SpotLight("lampara4", scene.getMeshByName("lamp4").position, new BABYLON.Vector3(0, -1, 0), 0.8, 2, scene); light[4].diffuse = new BABYLON.Color3(1, 1, 1); light[4].specular = new BABYLON.Color3(1, 1, 1); And I switch the state like this: // Apagamos o prendemos la luz de la lampara 1 scene.getMeshByName("lamaparaCalle1").actionManager = new BABYLON.ActionManager(scene); scene.getMeshByName("lamaparaCalle1").actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger, function (evt) { if(light[1].isEnabled() == true){ light[1].setEnabled(false); if(scene.getMeshByName("vlsT1") != null) scene.getMeshByName("vlsT1").setEnabled(false); } else{ light[1].setEnabled(true); if(scene.getMeshByName("vlsT1") != null) scene.getMeshByName("vlsT1").setEnabled(true); } })); // Apagamos o prendemos la luz de la lampara 2 scene.getMeshByName("lamaparaCalle2").actionManager = new BABYLON.ActionManager(scene); scene.getMeshByName("lamaparaCalle2").actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger, function (evt) { if(light[2].isEnabled() == true){ light[2].setEnabled(false); if(scene.getMeshByName("vlsT2") != null) scene.getMeshByName("vlsT2").setEnabled(false); } else{ light[2].setEnabled(true); if(scene.getMeshByName("vlsT2") != null) scene.getMeshByName("vlsT2").setEnabled(true); } })); // Apagamos o prendemos la luz de la lampara 3 scene.getMeshByName("lamaparaCalle3").actionManager = new BABYLON.ActionManager(scene); scene.getMeshByName("lamaparaCalle3").actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger, function (evt) { if(light[3].isEnabled() == true){ light[3].setEnabled(false); if(scene.getMeshByName("vlsT3") != null) scene.getMeshByName("vlsT3").setEnabled(false); } else{ light[3].setEnabled(true); if(scene.getMeshByName("vlsT3") != null) scene.getMeshByName("vlsT3").setEnabled(true); } })); // Apagamos o prendemos la luz de la lampara 4 scene.getMeshByName("lamaparaCalle4").actionManager = new BABYLON.ActionManager(scene); scene.getMeshByName("lamaparaCalle4").actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger, function (evt) { if(light[4].isEnabled() == true){ light[4].setEnabled(false); if(scene.getMeshByName("vlsT4") != null) scene.getMeshByName("vlsT4").setEnabled(false); } else{ light[4].setEnabled(true); if(scene.getMeshByName("vlsT4") != null) scene.getMeshByName("vlsT4").setEnabled(true); } })); But the first time that i turn off the lights the scene is paused and then continue, what is the best way to do that? maybe I am doing something wrong. the complete source is: https://github.com/flelix/entorno-models.git the project path is: entorno-models/code/proyBabylon/p2/ thanks and regards
  25. Hi. Thinks for reading my question. I am first on babylon.js I am developing viewer can load obj on babylon.js How to set backfaceculling of loaded obj file in babylon.js? My viewer showed backfaceculling state. Therefore I did work as follow. mesh = loader.addMeshTask("bane", "", "Assets/"+ type +"/", id + ".obj"); mesh.onSuccess = function (task) { allMesh = task.loadedMeshes; for(i=0; i<task.loadedMeshes.length;i++) { submesh = allMesh[i]; submesh.material.backFaceCulling = false; ... } but it didn't work rightly. http://localhost/shedbuilder/sheds/ also. To set hasAlpha didn't work. submesh.material.diffuseTexture.hasAlpha = true; please help me. I uploaded my obj file. myfile.rar Best regards.