Search the Community

Showing results for tags 'models'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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 10 results

  1. 3d models

    Hi, I didn't understand how do I load/add 3d model to my project. can someone please explain it to me with an example? Thank you its very important!
  2. I'm stuck with loading my meshes. I'm new to all the 3D and modelling so any thoughts are highly appreciated. Basically I want to extends Babylons default Mesh class called BaseMesh and add a 'load' function to it to get rid of clutter in my scene code. I'm extending this BaseMesh class for each model I have. My BaseMesh class: (Note that all code examples are written in TypeScript) // BaseMesh.ts class BaseMesh /* extends BABLYON.Mesh */ { public readonly BASE_URL: string; // I want these to be static public readonly MODEL_URL: string; // I want these to be static public readonly NAME: string; // I want these to be static public body; /* constructor( scene ) { // I don't know what to do here super( this.NAME //name scene // scene null // parent ? // source ); } */ public load( assetsManager: BABYLON.AssetsManager ) { return assetsManager.addMeshTask( this.NAME + ' task', // name "", this.BASE_URL, this.MODEL_URL ); } public onLoaded( results ) { // I don't know what to do here this.body = results.loadedMeshes[0]; } public update(): void {} }; A model class would looks like this: // Robot.ts class Robot extends BaseMesh { public readonly BASE_URL: string = '/models/'; public readonly MODEL_URL: string = 'robot.babylon'; public readonly NAME: string = 'robotMesh'; public update(): void { this.body.rotation.y += 0.03; } } In my code above I store the loadedMesh from the AssetsManager into this.body. But here is question 1: why is my model already showing on the scene when the meshtask has run? I'm only loading a mesh, I've not put anything about putting it on the scene. Question 2: How do I extend my BaseMesh class from BABLYON.Mesh so that the result (loadedMeshes) of my load function is "the mesh itself" (instead of an attribute this.body). For example this would mean I could change my update function to 'this.rotation.y += 0.03;' and just generally makes more sense. Question 3: I'm really confused about the relationship between my "code" and my "model/.babylon files". Is there any good documentation/tutorials about this? These questions range from: - when is it healthy to split different parts of a model in different files - do I apply textures in my code or do I do that in my .babylon file - do I apply animations in my blender file or do I code them - ... This was a pain to type, if you have any questions please do ask Thank you in advance!
  3. 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
  4. SPS with different models

    Hi team, @jerome @Wingnut I have an question relative to solid particle system (SPS). I need to create a SPS composed with different buildings (.obj files). This is my code but i only can add one of them. How can I solve it? var models = function(edificios_texto) { var t = 0; var loader = new BABYLON.AssetsManager(scene); edificios_texto.forEach(function() { if(edificios_texto[t].length!=2){ return; } var edificio = loader.addMeshTask(t, "","<?=$url?>assets/modelos/",edificios_texto[t]+".obj"); var nM; //mesh of building edificio.onSuccess = function (task) { task.loadedMeshes.forEach(function(b) { b.scaling = new BABYLON.Vector3(2.65, 2.65, 2.65); b.rotation.y = Math.PI; b.computeWorldMatrix(true); var vertex_data = BABYLON.VertexData.ExtractFromMesh(b); for (var i = 0; i < vertex_data.normals.length; i+=3) { vertex_data.positions[i] *= -1; } vertex_data.applyToMesh(b); }); nM = BABYLON.Mesh.MergeMeshes(task.loadedMeshes); for (var i = 0; i < edificios.length; i++) { if(edificios[i].descripcion == edificios_texto[]){ var myPositionFunction = function(particle, s) { var utmPlaceX = edificios[i].x; var utmPlaceZ = edificios[i].z; var utmPlaceXFromCentre = utmPlaceX - mapCentreX; var utmPlaceZFromCentre = utmPlaceZ - mapCentreZ; var x = utmPlaceXFromCentre/scaleX; var z = utmPlaceZFromCentre/scaleZ; particle.position.x = x; particle.position.z = z; particle.position.y = alturas[ edificios_texto[]]; particle.color = new BABYLON.Color4(0, 0, 1,0.5); }; spsEdificios.addShape(nM, 1, {positionFunction: myPositionFunction}); nM.dispose(); break; } } var buildings = spsEdificios.buildMesh(); spsEdificios.mesh.hasVertexAlpha = true; } t++; }); loader.load(); }; Thanks!
  5. FREE Nice piece of work for your games Collection of over 50 FREE models from 3DModels-Textures (DEXSOFT-Games) production. Textures are downsized to 512*512px, ideal for mobile environments.
  6. 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?
  7. 3D Models Animations

    1) Is it possible to have 3D models with animations? Perhaps using the OBJ extension? 2) Can 3D models be lightweight or are they always around a few megabytes per model? I need to be able to have multiple animated 3d models in the game at a reasonable size - hopefully the sum of all assets will not exceed a few megabytes, more than that would mean unbearable loading times to the end user.
  8. I was wondering what other people do for there 3ds Max/Blender -> babylon.js workflows? I find that If I create a scene with multiple objects, materials & animation within 3ds max and then export to Babylon.js I will usually need to do some more work on the Babylon.js side (adjust and fine-tune material parameters, add advanced material types, minor repositioning to perfect things in the browser environment, additional animation easing and so on..). I will then re-export my using the SceneSerializer method so that it is saved using the standard format. The annoyance for me is then when I decide to swap out an object or make a change to my animation on the 3ds Max side - I then have to re-work all of the post-export modifications or dive into a huge scene.js file full of mesh vertices and animation keys to merge the two versions. Could there be a way to export from 3ds Max that will produce a folder with a main Scene.js file with references to a separate JS file for each material and each object. This would mean that the materials could be edited without hunting through a file of several megabytes, objects could be changed or added without re-exporting an entire scene and scene files which are a lot more manageable.
  9. Introducing yoanimate online service for 3D animators and Game Artists. Example Participate to the yoanimate 3d animated character Contest and win prizes ranging from $50-$1000! Start uploading your fbx files now at and be among the first 50 talented animators to get $50 just for uploading your models! 2nd prize $250 1st prize $1000 Do you want to find out more? Go to Watch the video tutorials for our 3dpreview editor and for the material editor. 3d preview editor Material Editor Check out specifications to know what to do before uploading your files. Specifications Our site offers an enhanced interactive 3dpreview editor with many features such as: A variety of backgrounds and platforms Adjustment of animation speed Scaling of your characters Hue and saturation of the background Adjustments to materials with our online material editor Preferable lighting settings Save your settings Share your work with your colleagues and friends
  10. Hello) Prompt two things, please: 1. How to add to the scene two .babylon model to one was the surface, and the second can be controlled and moved over the surface? 2. How can we realize switching model? In other words, how to implement the switching from the first vessel to the second. Thanks in advance)