Jump to content

Search the Community

Showing results for tags '.babylon'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 24 results

  1. Babylonjs has been great so far, but yesterday I ran into an issue that I can't seem to fix. Problem: I'm trying to load in additional animations from .babylon files, however, when playing the animations on the original character it seems the original character's blend pose interferes with the newly loaded animation. The main character is a skinned mesh in a T-Pose without any animations. I then load in the walking animation (code snippet below) Loading the main character: BABYLON.SceneLoader.ImportMesh("", "./assets/models/babylon/", "character.babylon", this._scene, function(meshes, particleSystems, skeletons, animationGroups){ // Init character }); // later BABYLON.SceneLoader.Load("./assets/models/babylon/", "[email protected]", t._engine, function(s) { // Copy all skeletons let children = t._player.getChildMeshes(); for(let i = 0; i < children.length; i++) { if(children[i].skeleton) { children[i].skeleton = s.skeletons[0]; // children[i].updatePoseMatrix(s.skeletons[0].getPoseMatrix()); } } t._scene.beginAnimation(s.skeletons[0], 0, 59, true); }); However, I get this result. The t-pose is blended into the character animations causing this super wide stance; Which would suggest the walking animation transforms are relative? Can I make them absolute? Loading the [email protected] file at the start makes it behave as expected. I simply want to load it in at a later time. Preferably I wouldn't change the skeleton or bones but instead, copy over the animators onto the main rig, but this didn't seem to work either. Any help would be greatly appreciated.
  2. Hi guys ? I have one question about exported .babylon file. Is it posibel chagne alpha(transparency) of exported .babylon file? I want to make it slowly disepeat or sotmhig like that. When i change the aplha to 0 nothing happens. BABYLON.SceneLoader.ImportMesh("", "textures", "myObj.babylon", scene, function (newMeshes) { var myObj = newMeshes[0]; myObj.alpha = 0; } So I looked in the exported property whith console.log(myObj). BABYLON.SceneLoader.ImportMesh("", "textures", "myObj.babylon", scene, function (newMeshes) { var myObj = newMeshes[0]; console.log(myObj); } it shows me, that alpha is set NaN. And when I again change the alpha to 0 and looked in the property ... alpha was set 0 but again nothing happens. Why is like that ? Sorry for my bad english. ?
  3. Hello, I have a .babylon file exported from blender with a rotation animation but when I try to load it (I have tried both addMeshTask() and ImportMesh()) I get a "position animation" with zero values and "scaling animation" with fixed values. This cause me a problem when I call beginAnimation() because I'm not able to scale and position the model in my scene. Moreover when I edit the file and remove the "position animation" and "scaling animation" the engine somehow loads them again (even with cleaning cache). https://www.dropbox.com/s/789lx8gm3v7zrsc/container_ship_sinking.babylon?dl=0 https://www.dropbox.com/s/5odj9orv9cwcshp/container_ship_sinking.blend?dl=0 Why there are these animations added? Is it something wrong with my export in blender?
  4. good afternoon, I had not gone through here for work because I'm already a bit free again and I want to continue learning ^^. Note that they have made many changes so I started again from the basics. That is why I have an animation that a friend made for me made in untity, try to export it to .babylon but I can not do it, so I opened it in blender and exported it from there, the problem is that I can not load it correctly, it is say load the model and its textures if they load, but your animation does not, I tried it in the sandbox and the same thing happens, seeing the element inspector notice this error: "babylon.js:3 BJS - [17:36:30]: Unable to import meshes from Scenes/Planeta/Planeta.babylon: Error in onSuccess callback t._ErrorEnabled @ babylon.js:3 f @ babylon.js:32 p @ babylon.js:32 (anonymous) @ babylon.js:32 m @ babylon.js:32 p @ babylon.js:3 XMLHttpRequest.send (async) s @ babylon.js:3 d @ babylon.js:3 t.LoadFile @ babylon.js:3 b @ babylon.js:32 i @ babylon.js:33 (anonymous) @ babylon.js:33 XMLHttpRequest.send (async) t.checkManifestFile @ babylon.js:33 t @ babylon.js:33 i._loadData @ babylon.js:32 i.ImportMesh @ babylon.js:32 createScene @ (index):71 (anonymous) @ (index):97 babylon.js:3 XHR finished loading: GET "http://babylon-uno/Scenes/Planeta/Planeta.babylon"." here is code. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Babylon.js sample code</title> <!-- Babylon.js --> <script src="https://www.babylonjs.com/hand.minified-1.2.js"></script> <script src="https://preview.babylonjs.com/babylon.js"></script> <script src="https://preview.babylonjs.com/gui/babylon.gui.min.js"></script> <script src="https://preview.babylonjs.com/cannon.js"></script> <script src="https://preview.babylonjs.com/oimo.js"></script> <script src="https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js"></script> <style> html, body { overflow: hidden; width: 100%; height: 100%; margin: 0; padding: 0; } #renderCanvas { width: 100%; height: 100%; touch-action: none; } </style> </head> <body> <canvas id="renderCanvas"></canvas> <script> var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); var createScene = function () { var scene = new BABYLON.Scene(engine); // var camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 5, -10), scene); var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, new BABYLON.Vector3(0, 30, 0), scene); camera.setTarget(BABYLON.Vector3.Zero()); camera.attachControl(canvas, true); var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene); light.intensity = 0.7; var model; var skeleton; BABYLON.SceneLoader.ImportMesh("", "Scenes/Planeta/", "Planeta.babylon", scene, function (newMeshes, particleSystems, skeletons) { model = newMeshes[0]; skeleton = skeletons[0]; model.rotation.y = Math.PI; model.scaling = new BABYLON.Vector3(10,10,10); model.position = new BABYLON.Vector3(0, 0, 0); skeleton.position = new BABYLON.Vector3(0, 0, 0); skeleton.scaling = new BABYLON.Vector3(10,10,10); scene.beginAnimation(skeletons[0], 0, 100, true, 1.0); }); return scene; }; var scene = createScene(); scene.debugLayer.show(); engine.runRenderLoop(function () { scene.render(); }); // Resize window.addEventListener("resize", function () { engine.resize(); }); </script> </body> </html> I tried loading the model Dude and rabbit and these if they load everything well, so I do not know if it's a problem of how I export it, a problem with the plugin or something else I should do: here id the .fbx and de model exported : https://drive.google.com/file/d/1J9BYfEpCm_96cmn9_y4LpkntliEMNqlz/view?usp=sharing
  5. Hello, I import .babylon files to use in scenes regularly; however, there is a bit of knowledge I'm lacking to fully understand how to use each of the elements in my scene independently. As an example, the following is typical code used to import a scene from Blender and clone many hierarchical meshes from this one .babylon file: And this always works - however, I often need to animate several of the meshes from this one scene separately - such as this scene above is an airplane with a propeller on the front which needs to be animated on many clones of the plane. So what I'm not clear on from reading the documentation as well as running many playground searches, is how to access the other meshes in the scene such as the propeller. I have tried to get mesh by name, access different slots in the newMeshes[] array, and every other method I can think of - but have not been able to access the propeller or other objects in the .babylon file in a simple method. The only way I've been able to animate these other meshes is to import each additional mesh separately, parent the mesh to the plane (such as the propeller) back onto the plane, and animate it's rotation separately. However, I assume this is far more effort than is necessary, and I cannot get the information I require to simplify this from the documentation. So in looking at the above code where I'm importing an airplane with a propeller and cloning the airplane and it's children including the propeller - how do I access and animate the propeller in this scene without having to re-import the propeller, parent to the plane, and then animate the rotation? The propeller is already in the scene, but I simply don't know how to access and assign the propeller in the scene to a variable and/or array to then animate as a separate object. Even though I believe the explanation is easy to understand, I've attached the Blender file so that you can see what I'm speaking about in animating the propeller(simply rotating it.) If there is a playground scene which clearly demonstrates this, it would be much appreciated. although I cannot find one. Only the "Dude" scenes, which aren't relevant to my current needs as I need to animate meshes from the scene in the babylon engine - not in Blender. I know this is done by many users on this forum regularly, but I cannot locate the info on how to set this up myself. As always, any help is greatly appreciated. Thank you, DB biplane_model.zip
  6. Hi there, nice to meet you So I have the exact same issue as related in this topic : I understand the problem and the solution. But, I'm currently running my babylon app locally without any HTTP server such as Apache, it's just firefox looking on my computer files. So I'm a little confused : does BabylonJS need a local HTTP server such as WAMP or XAMPP ? Why is that since it's just JavaScript ?
  7. Hello, I have a test scene which loads fine but is a complete mess. So I cleaned it up today, and the .babylon file won't load no matter where I place it. The messy scene that loads fine is: http://www.qedsoft.com/DEMOS2017/build_01/index8.html However, I cleaned the scene up to show, and the .babylon file cannot be loaded no matter where I place it - here is the scene: http://qedsoft.com/DEMOS2017/blimp_test/index_01.html I also get the following console message: The .babylon file and code are exactly the same. This has been a hell of a week, so I just don't know if it's me right now - but I can't see what the heck is different. It claims it cannot load the point light in the exact same .babylon file. DB
  8. Hello All, I have a very serious problem right now, and hope it can be solved. I have 2 scenes; one loads incorrectly, but the model does load. The 2nd scene however does not load, and in both scenes I'm setting a ClearColor for the background just as a test to see what is working, and neither scene loads the skybox or ClearColor background. The 2 links are: http://qedsoft.com/DEMOS2017/bjs_loader/index5.html http://qedsoft.com/DEMOS2017/bjs_loader/index6.html The model in the first link loads, but the skybox does not, nor does the ClearColor background color. In the second link however, which is index6.html, the code is virtually the same as in index5.html, yet the model does not load and the skybox and ClearColor background won't load in either. I have a presentation at 12pm PST time which is in California, and must get both models to load to keep the project going. Otherwise, it will be put to a stop, and I don't then know the future of WegGL at Sony - as this should work. The way the code is written is not what I would normally write, however, I wanted to keep it as simple as possible - so the index.html contains all scripting, and most all assets are in the root directory. However, I placed the skybox images in a separate folder to see if this might provide me with additional information to use to troubleshoot. So again, this is not how I would ever actually write a scene, but I needed to keep it extremely simple. I've tried many different methods to format this, but the results are the same. If anyone out there can help, this is a win or lose situation for me. If I don't demonstrate the models in the browser tomorrow, then the future is unknown, and I will have lost all faith in my guarantee that babylon.js is the solution for Sony. So please help if you are able and have time, and I'm always grateful for any help. @Deltakosh, @davrous, and your teams might be able to see what's happening right away. I know there are issues with the way I'm loading assets, but again, this is just for testing. If I can get this working, then I'll re-write it before the presentation tomorrow. I just hope that I hve the opportunity to solve this one, as everything rides on this - especially after I lost my house to the fires - so I have to make this work. There's nothing more important for me personally right now. Again, thank you all for taking a look. Thanks, DB I've attached some additional files so perhaps @JCPalmer might be able to see what the problem is - or anyone who has time to look at the Blender and the .babylon.js files. Unfortunately, the files are too large and past the limit, so all there is to look at currently are the files you can download from the site and console. I've never needed help as much as I do right now. Everything is riding on this, unfortunately. By the way, both scenes were built quickly in Maya, and exported exactly the same from Blender. Thanks - as always. I can provide any files anyone might request in the morning as I'll be up really early to see if anyone has found any issues other than the obvious. I'll also keep working until the last minute, as I can't fail on this one. That is not an option. Cheers... DB
  9. Hello, I cannot get a .babylon file to load. There are no console errors, and the scene is extremely simple. I tried to load on the playground as well, and it won't load there either. Are there any issues with the Blender .babylon exporter at this time? Please take a look if you can. http://qedsoft.com/DEMOS2017/bjs_loader/index.html Thanks, DB
  10. Hello, I cannot get a .babylon file to load using ImportMesh. Please take a look if you can. http://qedsoft.com/DEMOS2017/bjs_loader/index4.html I do receive a console error: But am not doing anything different than I've repeatedly done in the past. Perhaps I'm not identifying an attribute correctly? Thanks, DB
  11. hello, just started with babylon and got an fbx file exported from blender to .babylon. using `BABYLON.SceneLoader.Load` to get my object. The camera is rotation around its axis and instead I would like it to rotate around the object. Playground: http://www.babylonjs-playground.com/#JR2HVU don't know how to use an external file for the car, but I hope you guys can at least look at the code and maybe spot something i'm doing wrong. thank you
  12. I converted an obj file to an animated fbx with mixamo. I imported it into Unity then exported it using the Babylonjs export utility. While the animation seems intact the model did not fair well. See images. Are there any special considerations or settings I may have missed? I successfully imported a box exported from Unity and a more complex model exported from Clara.io with the same code.
  13. I'm stuck with loading my meshes. I'm new to all the 3D and modelling so any thoughts are highly appreciated. Basically I want to extends Babylons default Mesh class called BaseMesh and add a 'load' function to it to get rid of clutter in my scene code. I'm extending this BaseMesh class for each model I have. My BaseMesh class: (Note that all code examples are written in TypeScript) // BaseMesh.ts class BaseMesh /* extends BABLYON.Mesh */ { public readonly BASE_URL: string; // I want these to be static public readonly MODEL_URL: string; // I want these to be static public readonly NAME: string; // I want these to be static public body; /* constructor( scene ) { // I don't know what to do here super( this.NAME //name scene // scene null // parent ? // source ); } */ public load( assetsManager: BABYLON.AssetsManager ) { return assetsManager.addMeshTask( this.NAME + ' task', // name "", this.BASE_URL, this.MODEL_URL ); } public onLoaded( results ) { // I don't know what to do here this.body = results.loadedMeshes[0]; } public update(): void {} }; A model class would looks like this: // Robot.ts class Robot extends BaseMesh { public readonly BASE_URL: string = '/models/'; public readonly MODEL_URL: string = 'robot.babylon'; public readonly NAME: string = 'robotMesh'; public update(): void { this.body.rotation.y += 0.03; } } In my code above I store the loadedMesh from the AssetsManager into this.body. But here is question 1: why is my model already showing on the scene when the meshtask has run? I'm only loading a mesh, I've not put anything about putting it on the scene. Question 2: How do I extend my BaseMesh class from BABLYON.Mesh so that the result (loadedMeshes) of my load function is "the mesh itself" (instead of an attribute this.body). For example this would mean I could change my update function to 'this.rotation.y += 0.03;' and just generally makes more sense. Question 3: I'm really confused about the relationship between my "code" and my "model/.babylon files". Is there any good documentation/tutorials about this? These questions range from: - when is it healthy to split different parts of a model in different files - do I apply textures in my code or do I do that in my .babylon file - do I apply animations in my blender file or do I code them - ... This was a pain to type, if you have any questions please do ask Thank you in advance!
  14. Hello, I have noticed that there is a problem with UV mapping, if I use a dynamicTexture on my mesh, imported from .babylon file. I am sure that my mesh has proper UV mapping, I have checked it by using standard texture. If I use normal texture on this mesh, everything is ok. If I use dynamic texture on BABYLON.Mesh, everything is ok. If I use dynamic texture on my mesh, I have seen something like that: I can't find an example on the playground with a mesh with proper UV mapping, so I have chosen the skull Playground: http://www.babylonjs-playground.com/#1NQC5D#3
  15. How can i make a .Obj or .Babylon File (without material) from Mesh? any tools or Extension available for that in BABYLONJS?
  16. I'm trying to export a blender file to .babylon, it seems to be exported fine except for the texture part, which is not found by the bjs exporter. e.g. quote from scorpion.log: This seems to happen in many models I encounter (especially in all models downloaded from 3DRT.com), how can I fix these models so they can be exported with the textures? I imagine the author of these models is missing something simple for the textures to be recognized by the bjs exporter. .blend: https://www.dropbox.com/s/vvobw5ga419ocqe/scorpion.blend?dl=0 .log: scorpion.log .babylon: scorpion.babylon
  17. Hi Guys, I notice that most of babylon js demo is compiled into .babylon Just like the demo I want to compile my current javascript code or all javascript folder into 1 file (.babylon). Is there any tutorial on how to do it? Thanks, John
  18. Hello all, I have read through the various posts about fixing this issue but I still cannot seem to figure it out. I am receiving the following error: GET http://localhost:3000/assets/car.babylon.manifest?1459361047809 404 (Not Found) Here is the code that is giving the error: BABYLON.SceneLoader.ImportMesh("car", "assets/", "car.babylon", scene, function (meshes) { var m = meshes[0]; m.scaling = new BABYLON.Vector3(0.5,0.5,0.5); }); In my assets folder I created a file called: scene.babylon.manifest and inserted the following code into it: { "version" : 1, "enableSceneOffline" : true, "enableTexturesOffline" : true } I am not sure why this is not working, I feel like I need to require that babylon.manifest file somewhere but I am not sure where? also, my index.html file looks like this at the top: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Babylon My Scene</title> <link rel="stylesheet" href="style.css"> <script src="http://www.babylonjs.com/cannon.js"></script> <script src="http://www.babylonjs.com/oimo.js"></script> <script src="http://www.babylonjs.com/babylon.js"></script> <script src="script.js" charset="utf-8"></script> </head> Any help would be greatly appreciated, Thanks!
  19. Hi, I've wasted considerable time due to my assumptions and past experience in working with browsers. One of the biggest issues was due to accelerated development; trying to advance to quickly in using the BabylonJS framework. Within a few days, I moved to character driven .babylon files and building my own objects and animating using pushkeys. Thus, I didn't provide enough time to move through a logical development process, which is often a problem when doing what I call "crash developing." So the problems I encountered were entirely my own doing. I doubt this will affect most problems with loading files correctly, however here is what I discovered from viewing so many white browser screens, and especially those WONDERFUL 404 error messages. The following is a response I wrote on another post: What I discovered this last weekend was that the problem is a combination of two issues. First, our server appears to have timing issues, and I assume it's due to traffic but we're looking into this further. Second, and most affecting our problems is that the browser uses it's cache much longer than I thought. I assumed that if I launch a new Chrome browser, that Javascript files were refreshed. However, there is no refreshing of any files that I can find until the refresh button is pressed. I couldn't properly troubleshoot this as the timing problems wouldn't expose a changed file even on refresh for up to 10+ seconds. So, even though the files were correct upon refresh, the browser loaded from cache as the server didn't respond in a timely fashion. The only way I discovered this was to start from a sample scene online. I used the loadScene.html file from paddyschller.com, and copied ALL of the files from the working directory into a new directory on our server. When I found this basic scene loaded correctly (mostly), I then renamed the babylon.js file so that it could not be loaded. I then refreshed the page and of course the scene wouldn't load at all. Then I renamed the babylon.js file correctly on the server, and the scene still would not load with a new Chrome browser and typing the full path to the html file. I refreshed the browser and found the file still wouldn't load - so I retried (refresh button) until it loaded. I have the exact same results when using links with no browser open, and realized that the only way to refresh any files was to press the refresh button. I assume there is a setting in the advanced options in Chrome to change this, but I haven't looked yet. For developing quickly, I hope an automatic refresh can be set. Again, I don't know if this is affecting anyone else, however I'm guessing were all modifying Javascript files as quickly as possible and copying those to the server for immediate testing. So I thought it worth posting - although slightly embarrassing for me. In the posts I read on this forum, many people are receiving a 404 error in their browser, so I assume a potion of these might be due to browser cache refresh. At the minimum, it forced us to encrypt our login info and rewrite our webconfig file. If this helps anyone, please let me know. Cheers, DBawel
  20. Hi, I hadn't yet pushed keys to a .babylon object, so I used "Soul's Rover" from a recent post with a simple cube. However, I'm unable to render a textured cube with keys pushed to translation in Z axis. I changed very little in the HTML file only to reference my scene and scene element. I've attached the files if anyone has time to take a quick look. Thank you, David B. cube_push_keys_test.zip
  21. Hi, I am not able to export UV textures applied to any mesh from Blender. To try and troubleshoot, I have tried to export a simple cube from Blender with a UV texture applied. However, when I export from Blender, there is no path to the texture or texture info in the .babylon file. Any help would be appreciated as I've already lost a week trying to convert FBX files from Motionbuilder with no luck - so I'm using Blender now and can view the exported meshes in Sandbox, but no texture is applied in the export. Thank you, David B. blender_scene.zip
  22. hello ! I have exported a scene from blender it's working fine in web . But i want to change its texture and color dynamically . e.g. Suppose i have a bag object i have exported it from blender its name is test.babylon it has a texture name base.jpg. But i have have 3 another textures . i have create a dropdownlist in my html page. So i want to if i have selected red/black/purple from dropdownlist bag texture should be change . Please do help me out . Thanks in advance .
  23. Hey guys, i'm started my first own blender project for bjs. Now i got the Problem that the .babylon file is 217MB Can someone give me some tipps hoe i can reduce it to like 1%? Here u can get the blender file blender file.zip. Thank you
  • Create New...