Search the Community

Showing results for tags 'blender'.



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.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 234 results

  1. Hi, I'm trying to import meshes with multiple animations (from Blender). Is there any description of correct workflow on how to make Babylon compatible animations in Blender? Single animation works nicely when you just manually fix scaling and rotation problems. But no matter how you append more animations into one Blender file it seems to me that transformations get messed up in export process. I've tried using Action Library and Pose Library, but both strategies produce weird twisting and morphing of the mesh. The result does somewhat resemble the intended animation, but it's hard to say what exactly goes wrong. Of course obvious workaround is to put every animation in separate file but that quickly makes download sizes unpractical (several 100 MBs).
  2. I'm trying to export an fbx model from blender to .babylon but get this error message instead. File "C:\Users\carlb\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_export_babylon.py", line 330, in execute mesh = Mesh(object, scene, nextStartFace, forcedParent, nameID, self) File "C:\Users\carlb\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_export_babylon.py", line 799, in __init__ material = StdMaterial(slot, exporter, object) File "C:\Users\carlb\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_export_babylon.py", line 2069, in __init__ self.textures.append(Texture('bumpTexture', 1.0 / mtex.normal_factor, mtex, mesh, exporter)) ERROR: float division by zero
  3. Hello everyone. I have a question. How can I add just one mesh from Blender into an existing babylon scene? I created a babylon scene with several meshes. Now, I want to add a model of a car from Blender into existing scene. Thank you.
  4. Hello. I don't understand the following thing. I created a Cube in Blender without any material or texture, just the Cube itself, no light, no camera. Then I exported the Cube. The Cube's name is "car" or "Blender car". Then I loaded it into Babylon. Then I applied babylon's StandartMaterial and diffuseColor to the Cube. But, before that, I created a Box mesh in Babylon itself and applied StandartMaterial and diffuseColor to the Box. The DiffuseColor is exactly the same in both the Blender Cube ("Blender car") and the Babylon Box. BUT, they look DIFFERENT !!! WHY ??? Could anybody make the Blender Cube ("Blender car") look exactly the same as the Babylon Box. Because, I applied the Babylon's StandartMaterial and DiffuseColor. to the blender's Cube. Here is the link to the html file with babylon - http://webnurlan3d.uphero.com/rotationradians.html And the html file itself - https://cloud.mail.ru/public/M2H3/TtvbFWRqx Thank you.
  5. I am am experienced developer but a newbie on BabylonJS. I tried to solve a simple problem on my own for the last 5 days and no matter how hard I try it still doesn't work. I am looking for someone who can do it for me, and I am more than happy to pay. So.. work for hire Job: - I have a 3d rigged hand model made in blender with animations through bones. I managed to export it but after doing so, even the mesh looks good the animations look bad. Instead of the hand opening and closing all mesh gets awkwardly deformed. It seems as if the deformers of the bones got all screwed up. I need someone to fix this and show me how can I move programmatically each of the phalanges of the fingers of the hand. Please reply if interested I will post more information as requested. Thanks a million! I have a really bad headache. I have been trying for days with no luck and I have decided this problem is way above my head. So.. please help. Happy to pay!
  6. i have trouble trying to export my animated hand model, i've tried making the scale and rot of the mesh and armature bone the same thing, but it's still not working: here's is my blender file:- https://www.dropbox.com/s/6vjtlylogvkxlz2/new rigged hand model.blend?dl=0
  7. 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 ?
  8. Hello again forum, i hope you have a nice day I would like to build a maze game, The maze will be generated on blender as .obj format. I know this is the code for intersect mesh for babylon mesh object, does blender use the same syntax as this ? Any advice or tips will be greatly appreciated, Thank you Cheers if (snake.intersectsMesh(box1, false)) { up = false; down = false; right = false; moving = false; }
  9. I'm using the preview release of Babylon (3.0. alpha) and the 5.3.-1 exporter in Blender. The Blender scene includes shape keys attached to a mesh called "Cloth": When I export to a babylon file, this information appears to be saved correctly. There is a "MorphTargetManager" entry in the file JSON that looks like this: "MorphTargetManager": { "id": "Cloth", "targets": [ { "name": "Draped", "position": [lots of numbers...], "influence": 0 }, { "name": "testtest", "position": [lots of numbers...], "influence": 0 } ] } I then load the babylon file with BABYLON in the browser, but I can't for the life of me figure out how to access this saved MorphTargetManager. Here are some things I tried: BABYLON.scene.morphTargetManagers; ==> [] BABYLON.scene.getMorphTargetManagerById("Cloth"); ==> null BABYLON.scene.getMorphTargetManagerById(0); ==> null (After setting the "Cloth" mesh to clothMesh...) clothMesh.morphTargetManager; ==> undefined (but present when I inspect the mesh object...) I feel like all the parts are there, I just can't figure out how to access the MorphTargetManager that I think should be present when I import the babylon file. Any help you can offer would be appreciated! Thanks!
  10. exporter

    Hello everybody, We have a problem with Blender Exporter 4.6.1. Let us explain to you : We have two animations : one cube with skeleton and another with a standard animation. In blender, after we export our scene with babylon exporter, it replaces all the animations by one. In the babylon file, we have all animations that are merged one after another. For all meshes that contain animation, the exporter copy all the keys of all the animations in one animation. Please find enclosed the file with source and video to show you this bug. Thank you in advance for your help Letsbro studio team. cubeAnimBug.zip
  11. 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
  12. I have some model and when I would like to export it I get error Traceback (most recent call last): File " .config/blender/2.78/scripts/addons/babylon-js/__init__.py", line 84, in execute exporter.execute(context, self.filepath) File " .config/blender/2.78/scripts/addons/babylon-js/json_exporter.py", line 99, in execute mesh = Mesh(object, scene, nextStartFace, forcedParent, nameID, self) File " .config/blender/2.78/scripts/addons/babylon-js/mesh.py", line 148, in __init__ recipe = BakingRecipe(object) File " .config/blender/2.78/scripts/addons/babylon-js/material.py", line 190, in __init__ self.isBillboard = len(mesh.material_slots) == 1 and mesh.material_slots[0].material.game_settings.face_orientation == 'BILLBOARD' AttributeError: 'NoneType' object has no attribute 'game_settings' location: <unknown location>:-1 Can anybody help me? What could be wrong? Ian
  13. Hello everyone, I am trying to export a scene as a babylonjs file; and I keep getting this error: ERROR: self.backFaceCulling &= material.game_settings.use_backface_culling ERROR: 'NoneType' object has no attribute 'game_settings'. I have unchecked culling for the mesh but it still shows the error. How would you go about this? Thank you for your time.
  14. I have just reverse engineered what happens to a Hair particle system when it is converted to a mesh. No matter how many "segments" you say to use when it is a particle system, you get a block of 65 vertices (for 64 segments) for each strand. In this picture of a system with 2 strands: The output looks like this (already converted to left handed): vert: 0 location: -.7644,1.2222,-.8473 vert: 1 location: -.7644,1.2549,-.8473 vert: 2 location: -.7644,1.2904,-.8473 vert: 3 location: -.7644,1.3285,-.8473 vert: 4 location: -.7644,1.3692,-.8473 vert: 5 location: -.7644,1.4122,-.8473 ... vert: 64 location: -.7644,4.7778,-.8473 ========================================= vert: 65 location: 1.2222,.1286,.33 vert: 66 location: 1.2549,.1286,.33 vert: 67 location: 1.2904,.1286,.33 vert: 68 location: 1.3285,.1286,.33 vert: 69 location: 1.3692,.1286,.33 vert: 70 location: 1.4122,.1286,.33 ... vert: 129 location: 4.7778,.1286,.33 Clearly 65 data points for a 25,000 hairs is not going to be practical for a line system. In this example, it only really needs 2 points per strand. Any ideas on a way to reduce the data points between the first and last, based on some kind of straightness between sets of 3 points tolerance? When the strands are not straight, pulling out data points are going to make them look jagged, but with enough hairs, might this not be obscured? Especially since you are probably not going to get this close. Like most of my topics, I'll probably be talking to myself once again.
  15. I have a Blender test scene with two objects. One is a complex "tube," and the other is a high-resolution test cube. Both have UVs. The test cube has 58,984 verts, and the tube has 62,808 verts. So both come in under the ~65,500 limit for exporting as a single mesh. When I export using the Babylon.js ver 5.2.1 exporter, the test cube is exported as a single mesh, but the tube is divided into multiple meshes. The log file suggests there are far more tube verts that Blender reports: Exporter version: 5.2.1, Blender version: 2.78 (sub 0) ========= Conversion from Blender to Babylon.js ========= Scene settings used: selected layers only: false flat shading entire scene: false inline textures: false texture directory: /Users/jdurrant/Documents/Work/durrant_git/protein-vr/webapp/scenes/influenza/ Python World class constructor completed processing begun of mesh: Cube processing begun of Standard material: Material num positions : 63245 num normals : 63245 num uvs : 126490 num uvs2 : 0 num colors : 0 num indices : 353892 processing begun of mesh: NA_patch_single_tube processing begun of Standard material: Material.003 num positions : 65534 num normals : 65534 num uvs : 131068 num uvs2 : 0 num colors : 0 num indices : 107769 WARNING: The following mesh has exceeded the maximum # of vertex elements & will be broken into multiple Babylon meshes: NA_patch_single_tube processing begun of mesh: NA_patch_single_tube1 registered as also a user of material: Material.003 num positions : 65535 num normals : 65535 num uvs : 131070 num uvs2 : 0 num colors : 0 num indices : 107043 processing begun of mesh: NA_patch_single_tube2 registered as also a user of material: Material.003 num positions : 65533 num normals : 65533 num uvs : 131066 num uvs2 : 0 num colors : 0 num indices : 125214 processing begun of mesh: NA_patch_single_tube3 registered as also a user of material: Material.003 num positions : 21593 num normals : 21593 num uvs : 43186 num uvs2 : 0 num colors : 0 num indices : 29625 processing begun of camera (FreeCamera): cmra ========= Writing of scene file started ========= ========= Writing of scene file completed ========= ========= end of processing ========= elapsed time: 0 min, 16.3766 secs When I view the scene in the browser, it ends up looking checkered (perhaps related): Thanks so much for your help!
  16. I've been following this issue on and off - mainly through @JCPalmer's posts on various threads. There is also a tutorial on the BJS documentation site (written by JCP?) That tutorial gives a little bit of code to let the .babylon engine know that compressed textures are available: var available = ['-astc.ktx', '-dxt.ktx', '-pvrtc.ktx', '-etc2.ktx', '-etc1.ktx']; var formatUsed = engine.setTextureFormatToUse(available); But I have a couple of questions: 1. The BJS Blender Exporter will take the textures I have used in Blender (.png or .jpg usually) and the .babylon file created will include those pngs and jpgs. So will those two lines of automatically use a .ktx version instead - over-riding the .babylon file? 2. " The texture must be encoded with the Y-axis flipped ". Flipped so that is where the X axis was ie, 90 degrees, or mirrored on the Y axis? 3. Is the device being used automatically detected so that a low level compression format (etc1)will be used on certain processors but a higher level format (astc) be used where appropriate? I've done some tests on compression with a simple tiling png texture (570kb) and compressed it using the Mali Compression Tool and the results are impressive - a .ktx file size of 129kb (etc1) cheers, gryff
  17. Hi Forum, First of all, i tried to create a snake game for my project, however i have encountered some difficulties. I can't make the apple dissapear upon contact / collision with the snake. I can make the object dissapear normally if its just mesh from babylon ( sphere, box, etc ) . However, when i tried to do the same to imported blender object, it doesnt work, Any ideas? Any Help given is greatly appreciated. Thank you here's my code : P.S : i tried to upload it to playground, but it seems not working, as my snake and apple are on different file, and i dont know how to upload them in playground. <!DOCTYPE html> <html> <head> <title>Snake Game</title> <script src="babylon.js"></script> <script src="hand-1.3.7.js"></script> <script src="babylonObjLoader.js" ></script> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <canvas id="mycanvas"></canvas> <script> var canvas = document.getElementById("mycanvas"); var engine = new BABYLON.Engine(canvas, true); var createScene = function() { var scene = new BABYLON.Scene(engine); var ground = BABYLON.Mesh.CreateGround("ground1", 100, 100, 100, scene); //var camera = new BABYLON.FreeCamera("camera2", new BABYLON.Vector3(0,5,-10), scene); /*var camera = new BABYLON.FreeCamera("FreeCamera", new BABYLON.Vector3(0, 1, -15), scene); scene.activeCamera = camera;scene.activeCamera.attachControl(canvas); scene.activeCamera.keysUp.push(87); */ var camera = new BABYLON.ArcRotateCamera("camera",0,0,0,BABYLON.Vector3.Zero(0,10,0), scene); //var camera = new BABYLON.TouchCamera("camera2", new BABYLON.Vector3(0, 10, 0), scene); //var camera = new BABYLON.GamepadCamera("camera2", new BABYLON.Vector3(0, 15, -45), scene); //var camera = new BABYLON.DeviceOrientationCamera("camera", new BABYLON.Vector3(0, 1, -15), scene); //var camera = new BABYLON.FollowCamera("camera2", new BABYLON.Vector3(0, 15, -45), scene); //camera.lockedTarget = model; //camera.setPosition(new BABYLON.Vector3(0,5,-10)); camera.setTarget(BABYLON.Vector3.Zero(),scene); camera.attachControl(canvas,false); var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0,1,0), scene); light.intesity = 0.5; var body = BABYLON.MeshBuilder.CreatePolyhedron("body", {type: 10, size: 0.7},scene); var materialBody = new BABYLON.StandardMaterial("bodyMat",scene); materialBody.diffuseColor = new BABYLON.Color3(1,0,0); body.material = materialBody; body.position.y = 5; body.position.x = -50; body.rotation.x = Math.PI/4; body.rotation.z = .19; var head = BABYLON.Mesh.CreateBox("head",0.7,scene); var materialHead = new BABYLON.StandardMaterial("HeadMat",scene); materialHead.diffuseColor = new BABYLON.Color3(.5,.2,0.3); head.material = materialHead; head.position.x = -4.5; head.position.z = -3; head.position.y = 1; var apple; BABYLON.SceneLoader.ImportMesh("","Finalproject/", "apple1.obj", scene, function (meshes) { apple = meshes[0]; apple.parent = sphere1; /*engine.runRenderLoop(function() { //scene.activeCamera.alpha += .01; apple.rotation.y +=0.1; scene.render(); }); */ }); /*var sphere1 = BABYLON.Mesh.CreateSphere("sphere1",1,1, scene); sphere1.position.y = 0.7; sphere1.material = myMaterial; var myMaterial = new BABYLON.StandardMaterial("myMaterial", scene); myMaterial.diffuseColor = new BABYLON.Color3(0, 1, 0); */ //sphere1.parent = apple; var snake ; BABYLON.SceneLoader.ImportMesh("","Finalproject/", "alphaSnake.babylon", scene, function (newMeshes, particleSystems, skeletons) { snake = newMeshes[0]; snake.position.y = 2; snake.rotation.z = -0.07; snake.rotation.y = 10; snake.rotation.x = 25; snake.position = new BABYLON.Vector3(0, 0, 0); head.parent = snake; var isvisible = false; window.onkeyup = function(event) { event = event || window.event; var keyCode = event.which || event.keyCode; switch(keyCode) { // W key case 87: snake.position.x +=3; //scene.beginAnimation(skeletons[0], 0, 60, true, 1.0); if (head.intersectsMesh(apple, false)) { isvisible = true; } break; // A Key case 65: snake.position.z +=3; //scene.beginAnimation(skeletons[0], 0, 60, true, 1.0); break; // S key case 83: snake.position.x -=3; //scene.beginAnimation(skeletons[0], 0, 60, true, 1.0); break; // D key case 68: snake.position.z -=3; //scene.beginAnimation(skeletons[0], 0, 60, true, 1.0); break; } }; scene.registerBeforeRender(function(){ if(isvisible == true) { apple.dispose(); /*sphere1.scaling.x = 5; sphere1.scaling.y = 5; sphere1.scaling.z = 5; sphere1.position.y = 2.5; sphere1.material = myMaterial; apple.scaling.x = 0; apple.scaling.y = 0; apple.scaling.y = 0; */ } }); }); return scene; }; var scene = createScene(); engine.runRenderLoop(function() { //scene.activeCamera.alpha += .01; /* if(isvisible == true) { sphere1.scaling.x = 0; } */ scene.render(); }); window.addEventListener("resize",function(){ engine.resize(); }); </script> </body> </html>
  18. Are texture atlases currently supported in conjunction with cycles baking? If i use the blender plugin that allows to map multiple objects to one atlas and then bake some lighting layers in there it renders fine in blender. The plugin apparently assigns UV maps to the mesh. After that, subsequent exports will trigger baking and it seems they try to use the existing UVs somehow and somehow the baked textures don't match or are blank. Removing the UVs then makes things work again. In general: i couldn't find any good material on how to export baked lighting (cycles) in conjunction with diffuse textures how can the UVs of on-the-fly-baked maps coexist with hand-made textures UVs? Thank you!
  19. I've been experimenting with the ability to use the opacityTexture with materials. And I have a couple of questions. First, what is the functionality of the opacityTexture in BJS. In the PG demo of fire, it appears to be acting as an alpha map that gives a general shape of the flame. Candle stick However, when I try to use the same flame and alpha map on a simple plane in a playground - I just get the square image of fire Simple plane Why? Does the use of .opacityTextures require the fireMaterial script? If it does, that is not indicated in the docs. Secondly, I tried using the same two textures in Blender - see result below. A simple plane has one material with two textures - flame and opacity.- and as you can see both have an impact on what is rendered. However, when I export the plane to .babylon I get this curious comment: Looking at the .babylon file the material only contains the flame texture - no reference at all to the opacity texture used. What does that mean? And how do I export these alpha map textures from Blender ? Edit: I have the opacity texture exporting now by changing the value of the "alpha" in image below to 1. But I still get the warning message and the result viewed in the sandbox is just the square plane with the flame texture cheers, gryff
  20. I'm getting this error when trying to import a babylon file Uncaught ReferenceError: camera is not defined at Observer.callback (localhost/:33) at Observable.notifyObservers (babylon.max.js:3399) at Scene._checkIsReady (babylon.max.js:15546) at babylon.max.js:15540 You can see the code on attachment. Help please index.html
  21. Hello everyone, I am working on a game project using BabylonJS (thank you for your hardwork on this amazing framework!) and using Blender to create model. I've been following this guy to create model and animation for my character: After I was done and ran the animation in BabylonJS, the model was fucked up and stretched everywhere unlike in Blender. I've looked for a lot of similar questions in the forum but still can't solve it (set LocRot, scale to 1, loc and rot to 0,...). Can you guys help me figure out what is wrong with the blender file? Blender file: https://www.dropbox.com/s/n5ab6jg0s9a5qz5/Dave.blend?dl=0 Babylon file: https://www.dropbox.com/s/mwi4dar41irvjyy/Dave.babylon?dl=0 This is the model from the guy above, if you can find the problem with this file, I can fix it on my (terrible) model too. You can drop the babylon file in sandbox to see the problem since I checked the autolaunch animation box. Thank you all! P/S: The file doesn't come with a texture sorry, it's not really important though.
  22. Hi, some time ago i started learn babylonJS, which some experience in phaser I made this: http://babylon.furcatomasz.pl. And now i have two problem to resolve: 1. Animation of walk of character stretching char - you can check it using keys WASD. 2. Mesh character have bones. I think about bone right hand, when i use function attachToBone sword has been attached in different position than bone. Thanks for help Tom
  23. Hi, I hope someone can help me. I want to export my Blender model with the Babylon.js Blender Exporter and import it in my App. In general this works fine, but I have one problem that I can't solve. In Blender I added a parent connection between a plane and a bone of my armature. The idea is that the plane should move if the bone moves. In Blender this works fine, but not with Babylon if I import the exported scene (tried my app and the BABYLON sandbox). Now I have two problems (which may be related to each other ?) 1. The plane is in a different place in Babylon (compared to the Blender model) 2. The parent connection is not exported and if I set the connection in my app directly after the import the plane moves to a weird place (but it follows the bone) Would be nice if someone can have a look at my Blender model. In my model there are actually two planes LED.L and LED.R and a want to attach these planes to the Neck bone of my ReetiArmature. Reeti.blend Reeti.babylon
  24. Hello every one, Thanks you fr your help, trying to import a mesh from blender to my scene but failed... Here's my code : var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); var createScene = function() { // This creates a basic Babylon Scene object (non-mesh) var scene = new BABYLON.Scene(engine); // The first parameter can be used to specify which mesh to import. Here we import all meshes BABYLON.SceneLoader.ImportMesh("", "scenes/", "untitled.babylon", scene, function (newMeshes) { // Set the target of the camera to the first imported mesh camera.target = newMeshes[0]; }); scene.registerBeforeRender(animate); var LinesRed = BABYLON.Mesh.CreateLines("LinesRed", [ new BABYLON.Vector3(boxRed.position.x, boxRed.position.y, boxRed.position.z), new BABYLON.Vector3(planeRed.position.x, planeRed.position.y, planeRed.position.z), ], scene); // Our built-in 'ground' shape. Params: name, width, depth, subdivs, scene var ground = BABYLON.Mesh.CreateGround("ground1", 15, 15, 5, scene); return scene; }; var scene = createScene(); engine.runRenderLoop(function() { scene.render(); }); // Resize window.addEventListener("resize", function() { engine.resize(); }); }); At first I kept my previous light, camera and so on but nothing showed up I used the importmesh from teh playground, it appears on sandbox Do I have to delete the camera, light from blender and keep it on my code because i only want the mesh Here is the browser console Thank you all
  25. Hey, all! I've noticed that Firefox (51.0.1 is my version) throws errors when loading all .babylon files that were exported from Blender. The files load fine, though. Should I be concerned with this? It doesn't happen in Chrome, but I'd like to remove the clutter from the Inspector so I don't lose any actual issues in Firefox. Error: (all .babylon files cause this) XML Parsing Error: not well-formed Location: http://whirlinggizmo.com/skintest/assets/wearables/m_shirt_fireman/m_shirt_fireman.babylon Line Number 1, Column 1: Playground Link: http://babylonjs-playground.com/#WDMRY#17 Thanks!