Jump to content

Search the Community

Showing results for tags 'submesh'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 15 results

  1. Hi, I was playing with a model exported from Blender and I can retrieve its submeshes with: var my_model = newMeshes[0]; var my_submesh = my_model.subMeshes[0]; But now I would like to know how can I retrieve a submesh from its name instead its number (like I can see in Blender). Can anybody help me? Thanks in advance.
  2. Hello! I discovered, what i call a bug, with instances and frustum culling. When the original mesh got submeshes the submesh culling of the instances relate to the position of the original mesh. This results in disappearing instances (submeshes) when the original mesh leaves the frustum. My quick hack was BABYLON.SubMesh.prototype.isInFrustum = function (frustumPlanes) { if( this._mesh._isAllwaysInFrustum )return true; var boundingInfo = this.getBoundingInfo(); if (!boundingInfo) { return false; } return boundingInfo.isInFrustum(frustumPlanes); }; //then sett
  3. Hello, No bug, no issue today ! I was just wondering about the choice of linking materialDefines to subMeshes, rather than directly on materials themselves. Does that mean that two subMeshes could have the same material, but different defines ? As the material updates the defines depending on its own properties (not the properties of the subMesh), I can hardly see how it's possible. I would love to see an example of this if you have one. I mean, I'm missing something. I'm quite sure this choice has been made for a good reason. But I don't get why. Thanks for you
  4. Hi Folks, I have a really stupid question about SubMesh. When and where do we need to create SubMeshes instead of a Mesh? In other world, what is the advantage of SubMesh compared to Mesh? I saw that OBJ loader create just one SubMesh under a Mesh and the Material is attached to the SubMesh instead of the Mesh. So, I am a little bit confused.. But I am sure there must be a reason. And what is the materialIndex stands for? It seems that its parent Mesh can only have one Material so that the index should always be zero? Thanks
  5. Hi, I'm trying to show the bounding box of a subMesh only. So I tried: scene.getBoundingBoxRenderer().renderList.push(subMesh.getBoundingInfo().boundingBox); scene.getBoundingBoxRenderer().render(); and the same thing with creating a new BoundingBoxRenderer but nothing append... Using mesh.showBoundingBox = true; and mesh.showSubMeshesBoundingBox = true; always show ALL the bounding boxes... So, is it possible to do what I'm expecting or am I just doing something wrong ?
  6. I'm new to BabylonJS. I've been successful at integrating the framework within an Angular 2 project. Now, I'm trying to integrate 3D models from the Unity Asset Store. I used the Unity exporter to generate a .babylon file. It rendered a gray beagle. The console complained about an old PBR Material version. I removed the albedo property and the error went away. So, did my beagle. I've attached my log from the console. I'm not sure where to start troubleshooting. What is the common approach to integrate 3D models into Babylonjs? Is there some linting tool to troubleshoot t
  7. Is it possible to detect an intersection between a mesh and a submesh of another mesh?
  8. Hey everyone! I'm trying to extract VerticeData from a SubMesh to create an other mesh but i always failed. I want to extract indices, positions, normals and uvs for the moment: Indices: var result = new VertexData(); var indices = subMesh.getMesh().getIndices(); for (var index = subMesh.indexStart; index < subMesh.indexStart + subMesh.indexCount; index++) { result.indices.push(indices[index]); } Positions and normals: var positions = subMesh.getMesh().getVerticesData(BABYLON.VertexBuffer.PositionKind, copyWhenShared); var vertex; for (var index = subMesh.inde
  9. I have observed that sub meshes can solve many issues for dynamically changing materials for parts of meshes. "Dynamic" changing of materials is meant to mean changing the material of parts of the scene content on demand while the application is running. It is understood by me that in order to increase general performance of the BABYLON engine, one should reduce the total number of meshes in the scene. This has certainly been an observed truth in my implementation of BABYLON for our application. We see that this truth, however can become problematic when several large meshes exist, and then
  10. Hello ! In the mesh object, there is an array called subMeshes containing the different materials applied to the mesh. It would be cool to be able to access to the position of the "submesh". For example, a black textured material for the boots and we can get the center position of the boots. It sounds maybe useless because some materials are applied everywhere so : a way to access to the position of a specific part of the mesh, a vertex group (in Blender) for example. Is there a way to access to the position of a bone in world global space and then copy th
  11. Hi Gang! Many questions. (sorry) **** Does anyone know the history-of or reason-for... https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.subMesh.js#L14 During the creation of a SubMesh, it is automatically placed into the mesh.subMeshes array. Is this somewhat new? Anyone know? MY reason for wanting to know? Visit Kostar's cool Tiled Ground Tutorial... particularly playground demo #5. See line 61, where our friend is pushing newly-created subMesh into the tiledGround.subMeshes array? Well... that's no good. Inserting a console.log near line 65, re
  12. Hey guys I am trying to figure something out. I have a scene with a handful of identically sized boxes that can be moved around and rotated independently. When I move a box I can check which other box is closest to it and whether it is "in range" (ie distance is less than a set value) by checking distance between currentBox.position and each boxes.position. If they are in range then I can highlight it somehow (currently I set .visibility on both boxes to 0.5). This works quite well. When boxes are moved out of range again they become unhighlighted (ie .visibility=1 is set to 1);
  13. I'm having issues with parts of my model not showing when it extends beyond the bounding box at the edge of the screen. I tried using the extendSize property, but it doesn't seem to have any effect. Has anyone had any success with updating the size of the bounding box?
  14. Hey ho, another two quick (and hopefully easy) question, please have a look here: http://www.babylonjs-playground.com/#GQDHN 1) I am trying to create a tiles ground with 4 submeshes. I start with zero submeshes. I am pushing submeshes 4 times... I end up with 8 submeshes... ... ... eh? I feel like I am missing something here, please tell me what's going on. I assume the 8 submeshes are the triangles that I see in the wireframe... but why? 2) How can I pick a submesh? The scene.pick returns the clicked mesh, but how would I determine the submesh at the clicked position? (Edit: I search
  15. Hey folks, once again a got a (newbie) question. I made a mesh in Blender, pretty much my first real try, so please don't laugh too hard The Problem is that it consists of 3 meshes: body, face and eyes and if i place the face as submesh (and the eyes as submesh of face). I end up getting the wrong position for the submehes when I load the main mesh in my Babylon scene. http://p215008.mittwaldserver.info/bobbin/ (zoom out a bit and u see the black face and the blue eyes above the body) So... what am I doing wrong? (Hints for better modeling are greatly appreciated as well ) PS: I
  • Create New...