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

  1. 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.
  2. Ok I make two animation actions. ElevatorComponent1 (timeframe 0-240) ->Elevator1Action and ElevartorComponent2->Elevator2Action (timeframe 0-200). In Blender it looks fine/OK. Each elevator animate (loop animation of each object 1.ElevatorComponent1 and 2.ElevartorComponent2) Play look fine in blender. You can see it. (I attach blender file) I use only (Visual Location) for both animations. When I export from blender to .babylon. Exporter doesn't export as it should! Range and positions values are not OK !! WHY? IS THERE ANY BUG IN BLENDER->BABYLON EXPORTER ? (IS THERE ANY WAY TO MAKE FOR EACH OBJECT ITS OWN TIME_LINE FOR ANIMATION? HOW?) Can anybody take a look (ATTACHED FILE) and export it into babylon.js and see what is with range and positions values - is there bug??? Here is video https://www.dropbox.com/pri/get/Public/Screencast 2017-06-26 10%3A49%3A24.mp4?_subject_uid=20766916&w=AADvbTlbugqn3hWDvW0TvcKrFlvCsAGWkYMR1IlRIqyGdg (if I export to .babylon (ATTACHED FILE) file and put load it or put in sandbox it is confusion !! @gryff @JCPalmer @Deltakosh Maybe we can fix with editor inside babylon file. BUT IF I BUILD MODEL OVER AND OVER (WORKFLOW) THAN IF EXPORTER DOES NOT WORK OK. THAN THIS IS USELESS. Is possible to fix exporter? Greetings Ian ModelFInish_1.blend.zip ModelFInish.babylon
  3. 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
  4. 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
  5. Hello everyone, I'm trying to get my head around how to work with animations in Blender and Babylon. I have no trouble exporting/loading etc and my animations works except in one aspect. I have added some movements to my object in Blender and with movement I mean that my object changes position. My problem now is that if I "walk" with my object in the browser each animation will begin where the object is added during the initialization. I have tried to find some data giving me the new position of the object when one animation is finished. Problem seems to be that the position of the object (mesh) doesn't actually change during the animation even though the object "moves". Does anyone have any suggestions of how to solve this issue? Or aren't you supposed to change position in Blender, only make animations where the object stays in the same spot all the time? Just seems strange if that would be the case...
  6. 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
  7. 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.
  8. 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
  9. 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
  10. 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.
  11. 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
  12. 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?
  13. 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.
  14. 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
  15. Hi folks, I am a beginner for babylon.js and blender. So I imported a cube with one face textured from blender to babylon js using BABYLON.SceneLoader.Load. The scene has the default point light in blender and the HemisphericLight I created using babylon.js. Everything looks good (please see the 2.jpg in the attachment), but after I resize the cube to make the cube flat (using cube.scaling.y = 0.1), the lower part of the textured face will be always shadowed, no matter how i adjust the light or how to move the cube (please see the 1.jpg). I already made the scene as simple as possible to narrow down the cause of the issue, but I still cannot figure out why the lighting cannot be rendered properly. So any help will be much appreciated!
  16. Hi there! I'm new to the community, and also to Blender and Babylon.js. I made my first model in Blender v 2.78 (a basic creature, humanoid type), rigged it and animated a simple walk movement (or a half one, right foot forward, left foot back). I baked my IKs, then exported the whole animation and mesh with the babylon exporter (v. 4.6.1). When I import the animation in Babylon it gets distorted. When the arms and legs goes forward/backward, they move too much upwards. I attached the .blend file, and i have a working online demo also: http://thyalie.ro/node/babylon/ It is password protected: thyalie:iso88591 First of all, I want to find out that the babylon settings cause this, or the blender exporter, or i did something wrong in blender (this last seems the most likely, but i dont know what i missed). Thanks for helping in advance! cube.blend cube_baked.blend
  17. Hello all, I found this tutorial for, what seems like, a good way to create terrain textures in blender: https://www.youtube.com/watch?v=p4Dt2S6uMGM My question is about exporting this type of texture. If you don't watch the video, what is being done is a UV Map is being created, and a material with several tiled textures. There is also a stencil layer that masks layers of tiled textures. This seems to work great, since you get the benefit of a tiled textured. My questions are about how the current Blender Export to Babylon JS (4.6.1) works and if there is another way. I have not found this information yet. 1) When exporting this type of material with multiple textures, they seemed to get baked into a [filename]_[meshName]_TEXTURE.jpg. Not ideal, but this can work for now, but I am having troubles specifying the output resolution. Is there any documentation or tutorials on this? 2) Is there a way to achieve the method above without baking the textures? Such as blending different textures, if so is there documentation on this? I'm not currently trying to do infinite terrains, so I'm trying to work within this problem set at hand. Thank you, amorgan
  18. I have a Blender file with some meshes with Actions assigned to them. I'm exporting it using version 5.3.-1 of the Babylon.JS exporter and loading the resulting .babylon file with Scene.ImportMesh. There are no bones in this scene; all animations are applied directly to meshes. I can trigger my animations without issue; everything behaves as expected (more or less). However, after loading the file, the orientation and positions of all of my animated meshes begin at the final frame of their Actions, as opposed to frame 0, as I would expect. My first thought was that the animations were playing automatically upon loading. I scoured the forums here and discovered the autoAnimate flag. I opened my .babylon file, but no such flag was present. I re-exported and checked autoAnimate intentionally, opened the .babylon file again, and explicitly set each autoAnimate flag to false. No effect. Next, I set breakpoints at all relevant beginAnimation functions in my babylon.js, but none were triggered. As far as I can tell, none of these animations are being automatically played, yet the problem persists. Any thoughts? I can work around this issue by making sure that the keyframes at the first and final frames of my Actions are exactly the same (and simply not play that final frame), but it seems there might be a bug in play here.
  19. Does the Blender exporting process still require de-parenting rig from mesh, resizing and rotating, then parenting back again? When I do that it messes up my weights so I'm wondering if there's a better way yet.
  20. I maked simple hexagon in blender and i want change colour on click button "Click me". How I can refer to the specific id (In this case - Cube) from blender in my script? Can you check my html file? I'm not sure that all it's good. It's blender file {"producer":{"name":"Blender","version":"2.78 (sub 0)","exporter_version":"4.6.1","file":"szescian.babylon"}, "autoClear":true,"clearColor":[0.0509,0.0509,0.0509],"ambientColor":[0,0,0],"gravity":[0,-9.81,0], "materials":[{"name":"szescian.Material","id":"szescian.Material","ambient":[0.8,0.7048,0.0663],"diffuse":[0.64,0.5639,0.0531],"specular":[0.5,0.5,0.5],"emissive":[0,0,0],"specularPower":50,"alpha":1,"backFaceCulling":true,"checkReadyOnlyOnce":false}], "multiMaterials":[], "skeletons":[], "meshes":[{"name":"Plane","id":"Plane","billboardMode":0,"position":[0.2658,0.2489,1.9542],"rotation":[0,0,0],"scaling":[5,5,5],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[1,0,-1,-1,0,1,-1,0,-1,1,0,1] ,"normals":[0,1,0,0,1,0,0,1,0,0,1,0] ,"indices":[0,1,2,0,3,1] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":4,"indexStart":0,"indexCount":6}] ,"instances":[]} ,{"name":"Cube","id":"Cube","materialId":"szescian.Material","billboardMode":0,"position":[0,1,0],"rotation":[0,0,0],"scaling":[1,1,1],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1] ,"normals":[0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773] ,"indices":[0,1,2,3,4,5,5,0,2,4,6,0,6,3,1,2,3,5,0,6,1,3,7,4,5,4,0,4,7,6,6,7,3,2,1,3] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":8,"indexStart":0,"indexCount":36}] ,"instances":[]} ], "cameras":[{"name":"Camera","id":"Camera","position":[7.4811,5.3437,-6.5076],"rotation":[0.4615,-0.8149,0],"fov":0.8576,"minZ":0.1,"maxZ":100,"speed":1,"inertia":0.9,"checkCollisions":false,"applyGravity":false,"ellipsoid":[0.2,0.9,0.2],"cameraRigMode":0,"interaxial_distance":0.0637,"type":"FreeCamera"}],"activeCamera":"Camera", "lights":[{"name":"Lamp","id":"Lamp","type":0,"position":[4.0762,5.9039,1.0055],"intensity":8.22,"diffuse":[0.1138,1,0.1492],"specular":[0.1138,1,0.1492]}], "shadowGenerators":[] } My html code <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"/> <title>Babylon - Getting Started</title> <!-- link to the last version of babylon --> <script src="js/babylon.2.5.js"></script> <link rel="stylesheet" href="css/style.css"> </head> <body> <canvas id="renderCanvas"></canvas> <button id="sweetButton">Click me</button> <script> window.addEventListener('DOMContentLoaded', function(){ var canvas = document.getElementById('renderCanvas'); var engine = new BABYLON.Engine(canvas, true); engine.enableOfflineSupport = false; var createScene = function(){ var scene = new BABYLON.Scene(engine); // create a FreeCamera, and set its position to (x:0, y:5, z:-10) var camera = new BABYLON.FreeCamera('camera1', new BABYLON.Vector3(0, 5,-10), scene); // target the camera to scene origin camera.setTarget(BABYLON.Vector3.Zero()); // attach the camera to the canvas camera.attachControl(canvas, false); // create a basic light, aiming 0,1,0 - meaning, to the sky var light = new BABYLON.HemisphericLight('light1', new BABYLON.Vector3(0,1,0), scene); BABYLON.SceneLoader.ImportMesh("","","szescian.babylon",scene); return scene; } var scene = createScene(); engine.runRenderLoop(function(){ scene.render(); }); window.addEventListener('resize', function() { engine.resize(); }); }); </script> </body> </html>
  21. 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!
  22. Grouping objects

    Some time ago I started optimize my scene. After some fixes, now I have problem with grouping objects in BabylonJS. For export I use tower of Babel. I experimented with linking, parenting and joining. Linking When objects is linked in Babylon i can see only one object. Parenting This method do not change anything about draw calls - it is same without parenting. Joining This method show all objects correct with smaller draw calls. But i must divide to smaller groupis to avoid inncorect collisions (check link https://ibb.co/gVcROQ to show how bounding boxes are builded). In this screen it is not perfect, so i must divide to more groups my trees. Can anyone help me to export/import my scene to Babylon with optimal perfomance? I think about one object for all tress for example.
  23. Parser for .babylon

    Hi everyone, Has anyone written a babylonjs parser for blender or any other application like 3Ds Max or Sketchup. I was looking to convert a serialised file from babylonjs from our 3D BIM editor (https://youtu.be/BYRdX2SpQHw) into other file formats like .fbx or .obj etc. We are building a full fledged 3D BIM editor (http://snaptrude.com/demo) with babylonjs and would be needing a way to export the updated models out of our environment. I am interested to know if anyone in the community has already written it and willing to share to make the task easier for us and many others. However, if its not been done then we would have to build one on our own and will be willing to share it here :). Thanks in advance!
  24. 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).