Search the Community

Showing results for tags 'custom mesh'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 5 results

  1. Hi! I have created a custom mesh like this: new BABYLON.Mesh("custom", this.scene) And after added simplify() method, nothing has been changed. I have created a playground for testing this issue. As you can see, the same settings in simplify() method change the structure of sphere, but do not change my custom mesh: https://playground.babylonjs.com/#JT9SFV#4 Is it a bug, or it is impossible to add simplify() method to custom mesh?
  2. Hello, noob back Just wanted to ask what may be the best way to approach creating something like a maze from 2D positional data. (Image below to show what im trying to accomplish) I had created something by creating custom meshes which mapped to 2D data but even creating 7 or so planes makes the performance extremely slow. I'm guessing this has something to do with computing normals or creating new vertex data... Not sure. So far each of the custom planes you see below are cloned from a base custom mesh object and then a new vertexData is created for each one based on the XY coordinates of the map and applied on the mesh. Because of the huge performance hit, I'm thinking that this isn't the best way. Can anyone provide any expertise on this please? Thank you. function linedef(startVertex, endVertex, material) { this.startVertex = startVertex; this.endVertex = endVertex; let customMesh = bustomMesh.clone(); const {x, y, z} = startVertex; var positions = [ x, 5, z, x, 0, z, endVertex.x, 0, endVertex.z, x, 5, z, endVertex.x, 0, endVertex.z, endVertex.x, 5, endVertex.z ]; var indices = [0, 1, 2, 3, 4, 5] var vertexData = new BABYLON.VertexData(); vertexData.positions = positions; vertexData.indices = indices; vertexData.applyToMesh(customMesh); var normals = []; //Calculations of normals added BABYLON.VertexData.ComputeNormals(positions, indices, normals); var vertexData = new BABYLON.VertexData(); vertexData.positions = positions; vertexData.indices = indices; //normals = normals.map((n) => {return -(n)}) vertexData.normals = normals; //Assignment of normal to vertexData added var uvs = [0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1]; vertexData.uvs = uvs; vertexData.applyToMesh(customMesh); //var redMat = new BABYLON.StandardMaterial("redMat", scene); //redMat.diffuseTexture = new BABYLON.Texture("textures/e1m1wall.png", scene); //redMat.bumpTexture = new BABYLON.Texture("http://i.imgur.com/wGyk6os.png", scene); //customMesh.material = redMat; //customMesh.material.backFaceCulling = true; //showNormals(customMesh, 5, null, scene); customMesh.checkCollisions = true; return customMesh; }
  3. Why isn't a collision triggering and stopping the camera ellipsoid prior to passing through the custom mesh in this scene: https://www.babylonjs-playground.com/#T4NQX2
  4. Hi Readers, I am building a game using Babylonjs (amazing framework), but I am struggling to create a simple "artistict" mountain. What I am aiming for in the simplest terms is a skewed box, where the bottom 4 positions can have any x and y coordinates while the upper 4 positions can have any x, y, and z coordinates. Preferably in the future I would like to have any number of sides. My original approach was to try and create two arrays of paths (base and peak "rings") and use the MeshBuilder.CreateRibbon to join the two together. Unfortunately though I couldn't find a method to "cap all" faces, only close the ribbon making a hollow mountain with no top. I was planing to make my own custom mesh for mountains, but thought it better I turn here first to get some advice. The inspiration for the mountains can be found in the attached image. Kind Regards Erik Hughes Ps. first time posting, YAY!
  5. Hello , I search for this topic a lot but i don't get any similaire. I find an example for a plan in this topic : So ,I'm trying to apply a texture for my custom mesh. I've got failure and i don't why . If I apply it with a sphere or any Babylon meshes it runs ok. this is a playground link : http://www.babylonjs-playground.com/#VTDRC#1 I noticed that there is an [uvs] table and I don't have any idea how to make it and is it necessary to implement the texture ?