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

  1. I have imported a Blender scene which has a mesh with an animation (consisting of just a few keyframes) and I am looking to control the animation, however I have been unsuccessful. The only resources I have been able to find relate to using skeletons imported from Blender, not basic keyframe animations (unless I am missing something?). Example playground: http://www.babylonjs-playground.com/#ONZNB The animation data is located on line 20 of the playground. I have tried calling scene.beginAnimation('rotation animation', 0, 30, true); in the scene.executeWhenReady function to no avail. Hopefully somebody can help? Thanks!
  2. I want to add a new feature in the Blender Exporter but it seems like from this conversation that you guys do not want to have userData. I already made a pull request for tags, but I want to set more special variables specific to my project in Blender using Custom Properties. Tags is limited and I was wondering if I should try to make userData export from Blender, similar to what the Threejs exporter does. I already have part of this done here. I only implemented the export and not the import. I stopped when I saw the conversation about userData.
  3. I am seeking help to solve this issue that has been a real challenge to me. I have a scene with an interactive car. The model was updated in Blender 2.78 and Blender exporter 5.1.2. The body, doors, hood, and trunk are separate meshes that use the same material. Everything seem to be okay when I view the scene in the sandbox. (All the meshes, materials and textures seem to be just right.) When I view the scene locally, a couple of the meshes will have the correct material and textures applied to them while they would be missing from other meshes that use the same material. When I view the scene live online, all the the textures will be missing. I have attached a couple of screen captures to explain what I mean. Here is the link to the online scene. Here is a link to the Babylon Scene and Blend File download. Note: I applied new materials to the meshes via the html file. I am not sure if this is an issue. The scene does not load in Firefox 50.1.0 The scene works in Google Chrome, Microsoft Edge and Opera.
  4. Hey! I will just link the relevant code and then ask the question (ignore the material parameter, is from an older build still have to get rid of it): function GenerateRandomObject(scene, material){ var nekej = BABYLON.Mesh.CreateBox("box1", 1, scene); nekej.position = new BABYLON.Vector3(getRandom(8, 90, true), 0.5, 90); nekej.rotation.y = getRandom(0, 360, true); nekej.isVisible = false; BABYLON.SceneLoader.ImportMesh("", "_resources/", "Drevo2.babylon", scene, function (newMeshes, particleSystems) { newMeshes[0].parent = nekej; }); return nekej; } So this is the way I create every new instance of a background object. This happens about 0.5 - 2 times every second for this type of object. More with others that I create with similar functions just different imported meshes. So my question is if there is a better way to import/use an imported mesh so i would not need to import the same mesh over and over again every single time i create a new object with that mesh. Thank you very much for any answers you might provide, with best regards, Satiana
  5. On Christmas day I was chatting to a gaming friend and he reminded me that Quake, a game released by Id Software in 1996, was 20 years old in 2016. Like Babylon.JS, there was an active community around Quake that produced new game maps, better textures, weapons, monsters - and still does today. So on Boxing day, rather than fight the rampaging hordes in the shopping malls, I decided to spend a few hours seeing if I could bring the world of Quake to BJS I started here - Quaddicted - a site that features some downloadable game maps and reviews. As I was experimenting, I wanted a reasonably small file with a reasonable review, and came in a .bsp format (game maps also come in a .pak format but that involves a longer extraction process). So I chose a map named "REoL TOUGH: Demise!" by "George J. Fiffy II" . Ironically Mr Fiffy released the map on Boxing Day 1996 - another 20 year anniversary ! Extraction of the .bsp file For this I used this Blender add on - Blender Quake BSP Importer. It works in Blender 2.71 but not in Blender 2.76. The extraction went nicely and I saved the blend file and opened it in Blender2.76. Then I hit a snag. When I exported the scene to BJS there were no textures! . Looking at the list of textures used in the scene, I noticed none of them had a file type - just a name (eg: "sfloor1" instead of "sfloor1.png"). So I had to rename all the textures in my .blend file and then save them - not hard just a bit tedious. I can explain in another post if people want to know how. And here is the result: Quake1 The only things I have added are : CheckCollisions, on certain meshes (walls but not most doors). And of course there no monsters/weapons/traps/teleportation yet. Maybe when I feel like doing something different again - I can look at those features And just a couple of comments. In these days of MB textures, the largest texture file in this demo is 45 KB and there are only 3 textures over 10KB. It shows of course - but not nearly as badly as I thought it would. Looking at the file in Blender it has 32,915 verts but 23,000+ are duplicates but removing them all at once with Blender's "Remove Doubles" leads to some odd shading - so it looks like will have to be done with just specific parts (tedious again). If you want to see this Quake Map being played, here is a YouTube video : Demise!. Start at about 1 minute. Anyway Happy New Year to all cheers, gryff
  6. Hi, I'm very glad to greet all of you. I'm new. I'm not a programmer. I dedicate myself to the artistic part. I'm a 3d designer. But a few months ago, I'm in a project. In which we have a problem I hope you can give me some of your time and have answers that help to dispel my doubts. The direct question is possible to export an object either obj, threejs or some other format that is loaded in the code and to be able to apply the cloth function that is found in the physical motors either babylon.js cannon.js oimo.js etc I hope you can understand my question Thank you
  7. Hi, I want to know if its possible to create a mesh using Blender and then to define its properties in the BabylonJS code. For example i want to create a wall using the cube in the blender and name it as WALL1. Then after loading the .babylon file generated the blender i want to define the color, texture and materials of the wall using the name of the wall WALL1. Thanks, Raghavender Mylagary
  8. 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...
  9. In a blender scene one of the character meshes has an armature with an animation. After exporting to a .babylon file and loading it, if the character with the skeleton armature is visible when the scene starts , the animation plays and the scene works as normal, If the camera is facing away from the animated character when the scene starts this error occurs Uncaught TypeError: Failed to execute 'uniformMatrix4fv' on 'WebGLRenderingContext' : No function was found that matched the signature provided.(using nw.js based on Chromium 41.0.2272.76.) This is how the scene is loaded BABYLON.SceneLoader.Load("", "TheBlenderScene.babylon", engine, function (newScene) { newScene.executeWhenReady(function () {It's happened in 3 projects, my current workaround has been to include all the animated meshes in the view when the game starts. Has any one else has had this problem, or have an idea of how to avoid the error? thanks
  10. I have a blender model which seems to have been exported to .babylon with no errors (1 warning regarding no active camera which can be ignored). It is not rendered when I try to load it into bjs. On blender everything seems fine - model, texture, rig, animations... What am I missing? If you'll change the model variable in the PG from "sheep" to "croc" you'll notice everything works well, thus eliminating the possibility of a script malfunction. PG: http://www.babylonjs-playground.com/#1SVN3I#23 .babylon: http://runeslots.com/misc/sheep/sheep.babylon .blend: https://www.dropbox.com/s/jf71nao8qbtwumz/sheep.blend?dl=0
  11. What's the best (though feasible) polycount for lowpoly models in bjs assuming I want to have 10 lowpoly meshes rendered at the same time on mobile with dynamic lighting? (no rigs/animations) Is 600 per model reasonable or is it too much?
  12. 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
  13. Hi, I am trying to build a basic room by exporting the design from blender to .babylon file and opening the file using Babylon.JS in a browser. When i am using ARCRotate camera the blender is not able to generate the .babylon file. Please find the attached blend file. sofa set1.blend blender.html
  14. I'm using Construct2(C2) for my games. A developer is doing a plugin to use Babylon.js that allow us do 3D games. This was my first test, it's not a big thing but for something we have to start: Here to play: https://kronbits.itch.io/proto3d Preview: - The actual plugin is a "Scene Loader". You do the level on a 3D editor and export the .Babylon file to C2. There you set camera controls and actions using events to do the game. One of the problems is how to solve the action for a group of duplicate mesh objects that have different name. Now, for every mesh we have to create an object on C2 layout, set the 3D name on editor and add all the properties or behaviours we want. The problem is, if the level have 100 coins, each coin have a different mesh name, so we will have to add 100 objects on the layout to set the behaviours or actions, which will be pain. The unique thing we made is more a patch than a solution, some kind of array on we set: Name: Coin Start of index: 0 Ending Index: 100 Padding: (true) So for a Coin and Coin001, Coin002, etc... until Coin100 will set the properties or behaviours or whatever but limit other options to other plugins and other stuff in C2. Also only will works for Blender and 3Dmax, the Unity nomenclature breaks this solution. Here are how the Duplicate models looks in the 3D Editors Babylon can be exported: Blender: Coin, Coin.001, Coin.002, etc... 3Dmax : Coin, Coin001, Coin002, etc... Unity5 : Coin, Coin(1), Coin(2), etc... Maybe there is a solution that we not found, or a Babylon function that solve this, but if not i want to make a request if is possible. Request for Babylon exporters: ------------------------------------------------------------ Add some kind of ID for all the objects, maybe "Babylon_Mesh_ID" or whatever that are the same for all the mesh with the same properties. Then for: Coin, Coin.001, Coin.002,etc... will have the "Babylon_Mesh_ID=COIN". So in the C2 we only will have to create an unique object that refers to "COIN" and add an actions like: On Player collides with COIN > Destroy COIN / Add 1 to COIN.Counter, etc... When the player collides with a mesh with the ID "COIN" will do the events/actions no matter the mesh name. No arrays, patch or other stuff. Is possible?
  15. I have 3 meshes in a Blender scene. Each mesh has its own origin and animation. The meshes animate as expected when viewed in Blender, i.e. they move as distinct meshes and have their own distinct animation. When I export to Babylon JS and test it in the sandbox at "http://www.babylonjs.com/sandbox/", all meshes seem to share the same origin and all 3 animations are applied automatically to them. I am not sure if this a bug but I have tried exporting different animated meshes in the same scene from blender and I keep getting the same results. Could someone please give some advice on this. I am using Blender 2.78a and Babylon.js 5.0.6 exporter. Please find below the .blend and Babylon JS files. . Thanks 3 Mesh Animation.blend 3MeshAnimation.babylon
  16. Hi, I use new version of Blender(2.78a) and I have my model in it, so I tried to export it to .babylon file. I got exporter file from Github just now and I have already move io_export_babylon.py to Blender's addons. When I tried to export my model it got this error(in the picture that I have attached), but when I tried to export a normal cube, I could do it. With the same model, I can do it with the babylon exporter that come with babylon v2.4 and previous version of Blender. But for both new version of Blender and Babylon i can't. Thank you in advance Peace
  17. Hello guys, Just started using babylon JS more than a week ago at work. Everything was going quite smooth so far. However I am struggling to export .babylon file from blender. Most probably it's because I have pretty much no experience with blender and 3D models in general. The mesh gets exported correctly but the main problem is with animations/animations actions, when I import .babylon file to the babylon engine and start any of the animations the mesh goes all over the place... I add .fbx file and .babylon file I get when I export it form blender. I hope someone can help me. I really need a help on this one. ArmyPilot_babylon.rar ArmyPilot_fbx.rar
  18. Hi everybody, I am very new to both Blender and Babylon. Basically I am trying to load a scene exported from Blender and create a skybox afterward, the scene is nothing more than a default blender scene(the one consists of a box, camera and light, I load this scene just to make sure I hadn't added or modified anything in the scene that may leads to other issues once I export the scene into babylon file). I try to create a skybox after loading the scene, using code below: =============================================== var canvas; var engine; var scene; function initScene() { canvas = document.getElementById("renderCanvas"); engine = new BABYLON.Engine(canvas, true); scene = new BABYLON.Scene(engine); BABYLON.SceneLoader.Load("babylon/","testScene.babylon",engine,function(newScene){ newScene.executeWhenReady(function(){ newScene.activeCamera.attachControl(canvas,false); var ground = BABYLON.Mesh.CreateGround("ground", 10, 10, 2, newScene); var skybox = BABYLON.Mesh.CreateBox("skyBox",1000.0,newScene); var skyboxMaterial = new BABYLON.StandardMaterial("skyBox",newScene); skyboxMaterial.backFaceCulling = false; skybox.infiniteDistance = true; skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("images/skybox/cloudSkyBox/DaySkybox", newScene); skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE; skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0); skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0); skyboxMaterial.disableLighting = true; skybox.material = skyboxMaterial; engine.runRenderLoop(function(){ newScene.render(); }); }); },function(progress){}); } function initBB(){ if (BABYLON.Engine.isSupported()){ initScene(); }else{ console.log("not support BB"); } } document.addEventListener("DOMContentLoaded",initBB,false); document.addEventListener("resize",function(){ engine.resize(); }); =============================================== The blender scene "newScene" is loaded(I can see the box, a directional light of the blender default scene, I can use the free camera preset in blender scene), the ground mesh added into the newScene can be seen as well, but the skybox is not shown! There is no error message shown on the browser console, I had tried to google for similar problem but couldn't find the solution... I am not sure if I set up the blender scene wrongly before I export or there is other factor that cause this issue. Any help would be greatly appreciated! TestProject.zip
  19. Edit (3): After analyzing why it's not working I have created a bug report over at the bug-forum with a playground example. (http://www.html5gamedevs.com/topic/26166-bug-report-gotoframe-has-no-effect-on-running-animation-with-playground-example/) Hi, I am new to babylon.js - so I might be doing something wrong. Edit (2): I have debugged the code to the best of my knowladge, please see my first reply. My problem: When I call goToFrame on the animatable returend by beginAnimation nothing happens. I try this on already running animations during the runRenderLoop function, and also while setting up the animations. For example, during the runRenderLoop function, I do the following: Output the current frame of the first animation inside the animatable, it's for example 109.9123 Now I call: animateable.goToFrame(10); Now the current frame is actually 10, but during the next call of runRenderLoop the current frame is right back where it was before calling goToFrame. And the animation just loops on, as if gotoFrame hasn't been called at all. Setting up the animation: var anim = scene.skeletons[0].beginAnimation("Idle", true, 1.0); Code to output the current frame: console.log(anim.getAnimations()[0].currentFrame); gotoCode: anim.goToFrame(10); Example output on the console: 77.15608 77.56336 Set to 10! 10 77.96092 77.96092 Edit: Using Babylon.2.4.js from the dist directory on github.
  20. Hi everybody, I'm in a training period of a study and i'm working on making a 3D animated avatar. So i went for blender 2.78 , the Manuel Bastioni Lab and the 5.0.6 exporter. The export was working fine with a freshly created model and when i want to export a finalised one with animations i have this error showing up and the file is not created. All the other format export works tho. I'm still discovering Blender so if you guys have any tips for that issue :). Traceback (most recent call last): File "/home/dok/.config/blender/2.78/scripts/addons/babylon-js/__init__.py", line 81, in execute exporter.execute(context, self.filepath) File "/home/dok/.config/blender/2.78/scripts/addons/babylon-js/json_exporter.py", line 99, in execute mesh = Mesh(object, scene, nextStartFace, forcedParent, nameID, self) File "/home/dok/.config/blender/2.78/scripts/addons/babylon-js/mesh.py", line 151, in __init__ bakedMat = BakedMaterial(exporter, object, recipe) File "/home/dok/.config/blender/2.78/scripts/addons/babylon-js/material.py", line 426, in __init__ bpy.ops.object.select_all(action='DESELECT') File "/home/dok/Downloads/blender-2.78-linux-glibc211-x86_64/2.78/scripts/modules/bpy/ops.py", line 189, in __call__ ret = op_call(self.idname_py(), None, kw) RuntimeError: Operator bpy.ops.object.select_all.poll() failed, context is incorrect Thanks! avatar.rar
  21. Hi, I`m working with some models exported from blender, some have animations and some not, is there a way in javascript to know if a model have animations after using importMesh? Thank you all.
  22. Blender exporter ver 5.0 has been completed. Below are highlights: New in 5.0 Now distributed as a .ZIP file. This format allows the addon to be multiple files / directories, as well as enables other types of files to be included (even .BLEND files). Meshes can now be directed to ignore that they have a skeleton for export purposes. Certain things will now prohibit the generation of an export file, in order to reduce reports of known problems / un-necessary support: Minumim Blender version checking. Current minimum is 2.76. Meshes with un-applied rotation or scale which also have skeletons. The `This Layer Only` checkbox on the Light data properites tab is now used. When checked, the `includedOnlyMeshesIds` property of the light is now exported with the values of those meshes that are also on the same layer as the light. Maximum Simultaneous Lights property has been added to the mesh data properties tab. This is applied to all materials of the mesh. Fixed in 5.0 Cycles exports now work for Blender 2.77. There was an API syntax change for 2.77. The exporter now detects the version of Blender and makes API calls appropriately. When there are multiple meshes with actions in a .BLEND, it is not possible to determine which meshes participate in which actions. When there is an action which is only done by one Mesh, place the mesh name then a '-' in the name of the action to isolate it. Now that the media is a ZIP file, you need to adjust installation. First there is an easy way to get a file of this type to your machine. Just try to view it. You do not un-zip it your self. Just select it from the 'Load File' button in preferences as before. It does not overwrite the older one. For more on how to delete the old one, see
  23. Material reflection in Blender (Blender Render), is not loadinig from exporterd .babylon file. How to enable reflection. If we set it on material in blender and export it dosn't work. Where in blender should we set it and does blender-exporter export data for reflection (Blender Render)? Any help? greetings Ian
  24. Hi, I often have some backup objects in my scene on a different layer. Is it possible to exclude specific objects from export?
  25. This time we have a serious and broad theme! "Retro cars" contains many different styles, and there are many different ways to try to express them. You can also experiment with steampunk (Don't do war cars though, we are peaceful and all!) Considering that the theme implies complex objects to be modelled, we'll raise the maximum polygon count! Now, it'll be up to 100k tris, however, don't neglect the optimization factor! It will still be an important aspect of the judging. I recommend checking your scene on mobile devices! Contest's main page