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 268 results

  1. I am using Blender 2.79 version and Blender2Babylon-5.4 exporter. I am getting error while exporting it to .babylon scene Attaching the blend file as well as the log file. Please help. -Ashish pump_oil_blendswap.blend pump_oil_blendswap.log
  2. QUESTION: How to animate all the things? GOAL: review ALL types of Animation Options available. Reduce various animations into Patterns or Templates or MINIMUMS. There are great docs on this... what follows are the practices of each. RESULT: Animation-Type-Templates Examples: - Wingnut wants a backhoe first thing? Ok.... um. : ) - eyes to look at stuff - mesh.lookAt() - a generic low-poly arm to grab stuff: bone animation - scene.beginAnimation() - a generic IK arm - constraints - a morphing eyebrow - morph targets - interpolate - random attributes like color, or opacity - a motion path - Blender Animation Ranges like: idle, jump, attack, die, win ADDITIONS: - Bone Animations - Review from docs - mesh.spinTo(), moveTo(), scaleTo() - Dynamic Animation (powerful?) - BABYLON.Animation.createAndStartAnimation() There are a ton a great resources on all of these. Point is: They are all different Animation Types. So needed: an all of the above approach. Where a review of each, generates QUESTION's and methodology. Highlighting the tricky spots, referencing solutions, and... the great docs and playgrounds that already exist. Please supply tips or improvements ... Thanks!
  3. Hi, was testing my personal project: a low poly mesh with a few actions exported using the b2b exporter v5.4. The animation range in the start frames are off by 1. My actions start from frame 1, exported babylon file shows frame 0 and testing confirms the animation when triggered doesn't loop nicely. Currently, the mesh has 4~5 actions, project upon completion should have a few hundred or so. Just curious, is this bug from the exporter or blender ? Should I start thinking about coding a fix when ImportMesh is called from babylon ? Or is this like a quick 2s fix on the exporter ? Pls do not tell me that I have to edit it manually... Thanks for reading and hope it helps, cheers
  4. 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.
  5. Hello! So this is weird.... I've got a rigged character in Blender that I want to duplicate so that I can animate a scene with two characters interacting. The issue I'm having is that when I duplicate that mesh in Blender (by selecting both the mesh and the armature and pressing Shift + D) and export it, the duplicated character is rotated differently in my BJS scene than it was in Blender. If I rotate the duplicated mesh 45 degrees (along the Z axis) in Blender, then export it to a .babylon file, it renders as being rotated 90 degrees in BJS. Rotating him 90 degrees in Blender gets even weirder: the mesh starts rotating along a different axis. And if I rotate him further then he starts doing all sorts of crazy acrobatics. Here's a few screenshots of what I'm talking about: Any ideas why it's rotating like this or how I might fix it? I have a hunch it's something to do with how I duplicated the mesh (maybe Shift + D was a bad idea? Is there a better way to duplicate this rigged mesh?) but I'm a newbie to Blender and BJS and I'm at a loss here. My log file didn't return any errors when I exported the .babylon file too, for what that might be worth. I'd be happy to attach the .blend and .babylon files too if that'd help diagnose it, just let me know! As a side note, I've been lurking these forums for a while and its incredible how helpful everyone here has been. Your answers on all these countless old topics has helped me get this far, I feel like I already owe you guys big time.
  6. How would I reference a light imported from Blender? I'm appending a scene with a directional light (sun) as follows: BABYLON.SceneLoader.Append("", "museumScene.babylon", scene); Now, if I add a "fire when fully imported" function to return the array of lights in the scene, I see my sun in the console just as I'd expect: BABYLON.SceneLoader.Append("", "museumScene.babylon", scene, console.log(scene.lights)); However, if I try to reference the sun in the normal way, I only get null: BABYLON.SceneLoader.Append("", "museumScene.babylon", scene, console.log(scene.getLightByName("sun")));
  7. Hello community, i am new here, because i have any questions about blender + babylon.js I want to create a game (oh, really ? :D), write the logic in JavaScript and the design stuff in blender. Now i am an point i dont know how to group objects in blender, so in can use them in babylon.js I am great in Webdevelopment but terrible in blender (no experience) I am able to add stuff like tubes, cubes, etc. but not shure about how to group them so babylon.js can create meshes out of the groups. It seems to babylon.js create for every item (cubes, tubes, ...) i add in blender a new mesh. I want that when i group things, that only for the group are meshes created. (See screenshot) BTW i export every thing as *.obj And (for this point not necessary), how can in group, groups to an whole "item", like an building, car, or something else ? Thanks guys!
  8. 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
  9. Blender to babylon export error

    Hi @Deltakosh@JCPalmer @Wingnut @RaananW@JohnK I am trying to export a model from blender to babylon and I am getting the below error while exporting. ========= An error was encountered ========= File "C:\Users\Raghav\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\babylon-js\json_exporter.py", line 152, in execute self.to_scene_file() File "C:\Users\Raghav\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\babylon-js\json_exporter.py", line 212, in to_scene_file mesh.to_scene_file(file_handler) File "C:\Users\Raghav\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\babylon-js\mesh.py", line 634, in to_scene_file if self.hasSkeleton: ERROR: 'Mesh' object has no attribute 'hasSkeleton' ========= end of processing ========= I attached the log file that is generated while exporting. Thanks, Raghavender Mylagary untitled.log
  10. I am just learning blender and babylon. blenderpic.tiff shows what it looks like in blender, which is what I am trying to do. Babylon.tiff shows what it looks like in babylon, which is a mixed up mess. Getting frustrated and found the butterfly_shpere_TEXTURE.jpg, which I am guessing the export is creating and then using in babylon which is wrong. Again I don't know much, but would appreciate any help. In blender I am only using material, texture and the uv map editor. I would gladly provide other information if it would help, but don't know what is needed. blenderpic.tiff babylon.tiff speretext.tiff it works if the wings are all one texture and the body is just a color.
  11. Hello I want to load a scene generated from blender, the generated file is .babylon, in my local, I have no a problem loadding the sene but in the host I can´t, in the console I have the next problem: Uncaught Error: Error status: 404 - Unable to load models/scene1/landScape.babylon at XMLHttpRequest.e.onreadystatechange (babylon.custom.js:3) Searching in google I se that I need to add mime types but I don´t know how. my html code is: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Entorno Mexicano</title> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> </head> <body> <canvas id="renderCanvas"></canvas> <!-- Carga de los js que se utilizan --> <!-- Babylon.js --> <script src="js/babylon.custom.js"></script> <script src="js/jquery-3.1.0.min.js"></script> <!-- codigo js personalizado --> <script src="js/main.js"></script> </body> </html> and my js file is: if (BABYLON.Engine.isSupported()) { canvas = document.getElementById("renderCanvas"); engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("models/scene1/", "landScape.babylon", engine, function (newScene) { scene = newScene; // Wait for textures and shaders to be ready scene.executeWhenReady(function () { // Once the scene is loaded, just register a render loop to render it engine.runRenderLoop(function() { scene.render(); }); // Funcion para cuando se redimensiona la ventana $(window).on('resize', function() { engine.resize(); }); }); }, function (progress) { $(".textoCarga").text( ((progress.loaded/progress.total)*100).toFixed(2) + "%"); }); } Any idea why I can do Thanks an regards
  12. I want a help with a small problem. The problem is How I can load a 3d model into a babylonjs scene. for example: I use blender to open a 3d air conditioner model and then export to babylonjs. Now I have the model as points. I want to load them into a babylonjs scene. I want to be able to position them according to another object in the scene, (for example, a wall). Is there any guidelines? any references? If it is a complicated problem, please guide me to the path I have to follow to solve this problem. Thanks in advance
  13. Hi, I'm fairly new to javascript/blender/babylon as a whole, and I came across this website: https://us2.cupprint.com/personalize/index/index/id/34/selection/prod_27_1502984627_78/idProduct/27/qty/1000/o/47/form_key/KjUBWujiFqxt1AKz/product/27/fixed-quantities/1000/bttg/1/ And I would like to mimic the setup they have, I've managed to get as far as creating an object in blender, exporting it out as a babylon file, and inserting it into a scene that shows on a web browser, however doing the next bit is completely lost to me. Is there a simple (simpler) way of doing it compared to how it's done on the above link or am I way out of my depth?
  14. Blender sandbox

    I am working thru the Intro. to WebGl by micosoft. I can get Babylon to run with my node.js server. When I try to just use blender and the sandbox, the sandbox is black. In blender the camera persp shows something. There are two lights and a camera. I am exporting the file using export and the Babylon.js. This is the top of the .babylon file {"autoClear":true,"clearColor":[0.0000,0.0000,0.0000],"ambientColor":[0.0000,0.0000,0.0000],"gravity":[0.0000,-9.8100,0.0000],"cameras":[{"name":"Camera","id":"Camera","position":[12.8773,11.3313,-7.9031],"target":[-0.3240,0.8954,0.3054],"fov":0.8576,"minZ":0.1000,"maxZ":100.0000,"speed":1.0000,"inertia":0.9000,"checkCollisions":false,"applyGravity":false,"ellipsoid":[0.2000,0.9000,0.2000]}],"activeCamera":"Camera","lights":[{"name":"Area","id":"Area","type":0.0000,"data":[0.1107,8.9662,-0.2007],"intensity":1.0000,"diffuse":[1.0000,1.0000,1.0000],"specular":[1.0000,1.0000,1.0000]},{"name":"Hemi.001","id":"Hemi.001","type":0.0000,"data":[0.0159,10.6325,2.7594],"intensity":1.0000,"diffuse":[1.0000,1.0000,1.0000],"specular":[1.0000,1.0000,1.0000]}],"materials":[{"name":"Material","id":"Material","ambient":[0.8000,0.8000,0.8000],"diffuse":[0.6400,0.6400,0.6400],"specular":[0.5000,0.5000,0.5000],"specularPower":50.0000,"emissive":[0.0000,0.0000,0.0000],"alpha":1.0000,"backFaceCulling":true},{"name":"Material.001","id":"Material.001","ambient":[0.8000,0.0371,0.0207],"diffuse":[0.6400,0.0297,0.0166],"specular":[0.4281,0.5000,0.0483],"specularPower":50.0000,"emissive":[0.0000,0.0000,0.0000],"alpha":1.0000,"backFaceCulling":true},{"name":"Material.002","id":"Material.002","ambient":[0.8000,0.0338,0.5966],"diffuse":[0.6400,0.0271,0.4773],"specular":[0.5000,0.5000,0.5000],"specularPower":50.0000,"emissive":[0.0000,0.0000,0.0000],"alpha":1.0000,"backFaceCulling":true},{"name":"Material.003","id":"Material.003","ambient":[0.8000,0.7543,0.0833],"diffuse":[0.6400,0.6034,0.0667],"specular":[0.5000,0.5000,0.5000],"specularPower":50.0000,"emissive":[0.0000,0.0000,0.0000],"alpha":1.0000,"backFaceCulling":true}],"meshes":[{"name":"Cube","id":"Cube","materialId":"Material.002","position":[-0.1417,0.6998,3.2061],"rotation":[0.0000,0.0000,0.0000],"scaling":[1.0000,1.0000,1.0000],"isVisible":true,"isEnabled":true,"checkCollisions":false,"billboardMode":0,"uvCount":0,"vertices":[-1.0000,1.0000,-1.0000,-0.5773,0.5773,-0.5773,-1.0000,-1.0000,1.0000,-0.5773,-0.5773,0.5773,-1.0000,-1.0000,-1.0000,-0.5773,-0.5773,-0.5773,-1.0000,1.0000,1.0000,-0.5773,0.5773,0.5773,1.0000,-1.0000,1.0000,0.5773,-0.5773,0.5773,1.0000,1.0000,1.0000,0.5773,0.5773,0.5773,1.0000,-1.0000,-1.0000,0.5773,-0.5773,-0.5773,1.0000,1.0000,-1.0000,0.5773,0.5773,-0.5773].... I know I am doing something stupid, please help.
  15. Hi all, I have a problem when I try to export a model that I downloaded from the web, using blender to babylon exporter as the model seems to lose it's skeleton, I don't know the correct term for that so I'm sorry but it seems like it just puts the texture on it, the animation is working but I don't know what did happen when I tried to export it to babylon, Also I don't know anything in blender except the process of exporting the model into babylon so any guide or help would be very much appreciated. I attached the model before and after exporting it in blender and when I used it in babylon. Thanks in advance
  16. Hello! I created a simple semi cylinder on Blender and imported it inside my game but for some reason the .checkCollisions of the model is not working. It is set to true , and the free camera's .checkCollisions is also set to true but the camera can still go through the model. I've tried with babylon meshes and checkCollisions is working fine. I even enabled collisions in the physics tab in Blender but nothing seems to be working. I am guessing the problem is with the model itself. But any thoughts on why it's not working? I attached the model here if you need to check it. Help would be really appreciated. cylinder1.blend
  17. Just something to consider... It could be helpful if custom properties could be attached to objects. Currently we're using an additional JSON file to add information on how the objects should behave/render. It does work, but ofc complicates the workflow.
  18. Hi my friends, Recently I read the tutorial of PBRMaterial here https://doc.babylonjs.com/overviews/physically_based_rendering_master I wanna display the object exporting from Blender by Tower of Babel (TOB) However, it comes out with all-black on my object(mesh) The code is jus like the following : var texture_from_file = new BABYLON.Texture("dress.jpg", scene); var pbr = new BABYLON.PBRSpecularGlossinessMaterial("pbr", scene); for (var i = 0; i < scene.meshes.length; i++){ scene.meshes[i].material.diffuseTexture = texture_from_file; } Any advice to let me display the mesh with PBRMaterial (or similar texture) ? Thank you so much
  19. Hi there! I've been busy working on a modification to the Blender exporter and Babylon in an effort to support smooth interpolation natively, based on FCurve handles, as opposed to having to bake every frame of every animation prior to export, which can be rather time and space-consuming. So far, I have a system which works fairly well, feeding the "right handle" offset of each keyframe to Babylon which then packs that information into the inTangent and outTangent properties of each imported keyframe. This has smoothed out my animations considerably, but it's not a 1:1 reproduction, and I feel like I could do more. inTangent and outTangent data is currently fed to Babylon's Hermite interpolation equation, which is certainly better than the Linear default, but still not as sweet as it would be if it used Bezier just as Blender does. Unfortunately, my Bezier kung-fu is weak, and making the translation from X/Y handle coordinates to Bezier coordinates for each axis is confusing me. So, in summary, I'm now able to import the key and handle coordinates for each frame in Blender animations. I'm just having some trouble figuring out how to translate those into a contiguous Bezier curve at the time of animation. I'm familiar with the vector3InterpolateFunctionWithTangents() function, but inTangent and outTangent data doesn't seem to be enough for a full Bezier calculation. I could add more easily enough; I'm just a little fuzzy on how to go about it, and my experiments so far have resulted in some pretty crazy animations. Any thoughts? I would love to be able to wrap this up into a nice and tidy pull request.
  20. Hello This is my first Time in this forum. I am doing a scene with babylon js and I am using water material for some elements, when the mesh is created in code with createGround function it works fine, but when I import scene from blender, and add water material to any mesh, the result is not the expected. some one know what is the process to do that. thanks
  21. Hello Everyone, I am seeing an error in chrome debug panel which says "Uncaught SyntaxError: Unexpected end of JSON input error on browser tool " I have also attached the screenshot of the error. I am using Babylon .5.4 exporter with the latest version of Babylon js on 2.78a blender. I am using screenimportmesh and asset manager to load 2 of my Babylon file. But Asset manager is failing to achieve onsuccess event. so scene is not rendering, But if i am calling render scene on assetmanager onerror scene is rendering which is a bit confusing, why The asset manager calling error when it is able to load models. For reproducing the issue : Reload the below link for 2nd time ,it will regenerate syntax error on browser debugger. https://s3.amazonaws.com/sudha.xyz/buggy/screen.html Reproducing scene not rendering problem : remove below code from line number 111(visual studio code) run(gamescene); This function is calling my scene rendering. But it should be fire up from mesh load onsuccess .if it is firing up from onerror . if i remove calling the above function from error call scene will never load I think it is linked to the Uncaught SyntaxError: Unexpected end of JSON input error on browser tool error. Kindly help me with this bug . please note: There are some other errors for manifest and one of startup function which I am aware of, and as much as I know manifest are not really responsible for this issue Thank you
  22. Hello, I'm wodering why colors in Blender are diferent shown as in BJS-Sandbox? Even the color picker is showing a different color, is there a different color model ? The image below is showing the BJS-sandbox (orange) and the Blender-Picker (more yellowish), the numerical values are identical. Thanks in advance. PS: I verified the image below with the color-picker from Gimp and the values matches the BJS-color :). So the problem seems to be on the Blender side.
  23. Hello. I'm new to BabylonJS and Blender but I've already played a little bit with both. I've downloaded a table (.3ds file) from www.steelcase.com and imported it into Blender. Then I've exported it as a .babylon file and tried to use this file in my .html. But it looks weird (because the table is build with planes I guess?) Can anyone help me to solve this?
  24. Hi all, I'm using blender-BJS-Exporter 5.4.0 and have a blender scene with a keyframed animation starting from start Frame:0 to Frame:120. Unfortunately there are much more frames exported than expected (up to 640 but with gaps). It seems the scene is looped a second time but with some garbage and some gaps inbetween. I'm new to blender but I'm quite sure to have a consistent scene. Any ideas? Thanks in advance cubecircle.blend testbabylon17.babylon