Jump to content

Search the Community

Showing results for tags 'Mesh'.

  • 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 Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

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

  1. Hi, when I set mesh.drawMode = PIXI.DRAW_MODES.POINTS, If I use TextureCoord for the coord, the texture is pixelated but with fragCoord.xy / Resolution.xy it's ok in the shader. what's the reason ?
  2. Hello, I'm trying to export a model which is about 400,000 Polys. I know the maximum export is somewhere around 60, 000 for any one mesh. I am thinking about breaking and exporting the mesh in different parts. Will this lead to issues in the scene? Also, what is the best polygon count for a babylon scene for efficiency in web and mobile? Finaly, what is the maximum polygon count for a babylon scene before it crashes? Thank you in advance!
  3. Hi all While working on my game I encountered some obstacles, of which I'm not sure how to solve them. 1: For my game I have created an animated tree with a particle container for leaves and a normal container for a tree trunk SimpleRope. The tree has some moving animation, as shaking and being chopped, and a simultaneous parallel copy of the tree containing normal map images. However, I cant just recreate the tree as it requires some performance. RenderTexture was a great solution to just create one tree and render it multiple times as texture, but obviously this way the animation will happen on all the trees. Now, for this I thought of a solution but I'm not sure if its good. I figured that when there is interaction with the tree, I could replace it with a new container of the tree, do the animation and erase it or keep it in a pool afterwards. This still could increase performance issues drastically, when multiple trees are interacted with. What do you think is a good solution? Or maybe I could extract the different frames and make an animation loop out of it at the start of the game. 2. I build a character system for the game, which builds a character out of different parts. with the legs, arms and torso as a SimpleRope. this works fine for one character, but I think that when there are more on the map, it will become laggy. Since these SimpleRopes are meshes, these body parts all have separate individual render calls I think, which would amount to a lot, if there are more characters. Would it be doable to create this code of the characters movement of the different body parts inside 1 mesh? if yes, how could I approach it? Thank you for thinking with me for an approach. If you think of something, let me know!
  4. Hi everyone, I have recently been learning to code and currently am creating a 2d game using PIXI v5. I want to implement some interactive shadows, based on different light points on the map(lights) or "above" the map(sunlight). I still have a lot to learn about Webgl and the insides of PIXI, and I got some questions about some different approaches. I noticed that there is a plugin, PIXI lights, but unfortunately it does not work with PIXI v5. On different forums and tutorials I encountered some shader ideas that create a shadow of particular objects. This works perfectly. However, when applied to my object container, it will render the container as a single texture and create shadows that are of course not in sync with the place of the objects itself, but will appear as a combined shadow of the total combination textures. I have also tried some shadowing through normal mapping, could work great as well, but if feel is mostly suitable for creating shadows for the terrain of the map. As far as i could tell, PIXI lights is using some form of flexible normal map rendering. Im curious what you all think is the best approach to create simple moving shadows for a container of display objects. some questions: I dont understand a lot about the batch renderer, and if that would be the right area to find a solution? I noticed some thing about a batch renderer that uses a %forloop% in the shader and 'uSamplers', could this be usefull to implement inside a shader to id the textures of the individual sprites which are inside the container? Would it even make a performance difference to use the shadow shader on every object in the container or using 1 shader? Would it be beneficial to put the shader inside a PIXI.program in that case? Im looking forward to hear your perspectives. Thank in advance
  5. I'm researching about creating a visual " algebra geometry " desktop game-oriented app for students which the user can create 2D primitive shapes and parametric shape patterns with help of numeric-nodes. the similar application would be something like " grasshopper " plugin for " rhino 3d ". In parametric patterns user may create some thing around 1000 to 1500 user-defined shapes which each shape: - has its own animation for vertices, position, rotation - may response to mouse interactions - has its own color or texture and stroke - will be generated dynamically in runtime base on user input also I have to code a mini node base editor . I've seen and study web-techs and precious libs and frameworks like Pixi and searched alot about best practices. I have some questions and I'll be grateful if you help me to find the answers: - is web-techs suitable for the application? - according to what I absorbed from API docs, PIXI.Graphics is designed for none-continues changing shapes so should I instead extend PIXI.Mesh or the Graphics does the job? what is the best way of creating such a shape? - should the custom-shape class be my biggest concern or there are other performance related things I need to take care of? - any further suggestion ? thanks ?
  6. I'm trying to create a mesh that consists of a few dozen triangles that are going to change every frame (hopefully performs okay....) How do I actually do that though? Create mesh: const shader = Shader.from(vertexSrc, fragSrc) const geometry = new Geometry() .addAttribute('aVertexPosition', [initialVerts]) .addAttribute('aVertexColor', [initialColors]) const mesh = new Mesh(geometry, shader, null, DRAW_MODES.TRIANGLES) Attempt at changing aVertexPosition and aVertexColor each frame: mesh.geometry.addAttribute('aVertexPosition', newVertices) mesh.geometry.addAttribute('aVertexColor', newColors) Error: Cannot read property 'updateID' of undefined; originating from GeometrySystem.updateBuffers.
  7. Hello, please how can I attach a bone to meshes with out importing meshes from file?
  8. http://babylonjs-playground.com/#RC9CZ Hello, I'm currently developing a small game and need to rotate a mesh to a point. I want to set the rotation of a mesh to face a specific point in the "3D-Room". I hope anyone can get this cylinder in the playground to face to (0|0|0). Thanks a lot, Josh
  9. Hello guys , As i unity developer i just want to ask a quick question Which method in mesh class Match update function in unity .. What it means i want each mesh to have it's own update method rather use scene.registerBeforeRender() Which controls every update/render happens in the scene I've used those func's mesh.onBeforeDrawObservable() mesh.onAfterRenderObservable() But Explicitly i don't know if it's best choice or not and i have little problem with it .. Also those methods can't be executed behind camera view (the mesh must be in the view of camera to allow those type of functions to be executed) so guys what do u think ? Thanks in advance
  10. If you have seen my collision with stls post, please disregard it unless you have a solution. recently I stated using Clara.io instead of sketchup, and I made a house for testing. The problem is is that when I use BABYLON.SceneLoader.ImportMesh("", "assets/", "Clara_th.babylon", scene, function (newMeshes) { let house = newMeshes[0]; house.checkCollisions = true; house.position = new BABYLON.Vector3(75, 14, 50); }); I get collision with my walls, but only 1 of them move. I used boxes to make the walls and floor, all seperate objects, but the don't move as one. Is there any way to fix this? I tried this: BABYLON.SceneLoader.ImportMesh("", "assets/", "Clara_th.babylon", scene, function (newMeshes) { let house = newMeshes[0,1,2,3,4,5]; house.checkCollisions = true; house.position = new BABYLON.Vector3(75, 14, 50); }); But that didn't work. My site is here: http://giv0.gitlab.io/fpoy The terrain is for testing purposes. Thanks for any help! Givo
  11. I'm having an issue with collision. While messing around with terrain, I wanted to make a house, for said terrain. I made a little hexagonal house and exported a STL (I use sketchup web). It imported just fine, but I can't get any collision. My test site is here : (giv0.gitlab.io/Fpoy). I use gitlab because I love the Gitlab web ide and github has nothing like it. Thanks for any help, but if possible, I also need to size it down. I could probably do that on my own, but any efficient was is helpful. Ignore the terrain you spawn on, I was testing height maps and mixmaps and textures. Thanks in advance!
  12. Hi, I want to create city map with 3D buildings. I have GeoJSON with building data. I'm using this data to make 2D polygonal mesh (building shape). http://www.babylonjs-playground.com/#10IOII#14 (I've used example values) Is there way to add 3'rd dimension to it? I want to use my 2D mesh as base for 3D Object. Is it possible to store this 3D object as Vector3? I want to map all verticles and keep them around for future use. (I'm starting with babylon.js, i don't know is this proper way to do it.) { "type":"FeatureCollection", "features":[ { "id":"w26358613", "properties":{ "levels":8 }, "geometry":{ "type":"Polygon", "coordinates":[ [ [ 13.426143, 52.51832 ], [ 13.426195, 52.518392 ], [ 13.426155, 52.518423 ], [ 13.426192, 52.518479 ], [ 13.426252, 52.518476 ], [ 13.426296, 52.51854 ], [ 13.426473, 52.518496 ], [ 13.426319, 52.518275 ], [ 13.426143, 52.51832 ] ] ] }, "type":"Feature" } ] }
  13. I have an invisible mesh that is the parent of a few child boxes, ordered horizontally one near the other. I'm using the following line to figure out the size of a mesh: getBoundingInfo().boundingBox.extendSize.scale(2) When called on each of the child boxes, the vector returned is correct. When called on the parent mesh, (0, 0, 0) is returned. Is there a way to get the size of the parent, taking into account all of its children?
  14. Hi, I would like to create an environment with several objects (in the playground, 2 objects) that cannot be at the same position at the same time (cannot be superimposed). I used the moveWithCollisions method for the Mesh objects, and while it works as expected, when two objects collide and the ellipsoids around them are not identical in size, one of the objects goes to the top or to the bottom of the other. I would like for them to just stay in the same vertical position, and if they collide, simply prevent them from moving, not moving to the top or to the bottom of the other object. Is there any thing you recommend? Playground: https://playground.babylonjs.com/#1UK40Z If you move the red object towards the purple one, when they contact, the red object moves to the top of the purple one, and I would like them to stay one next to the other. Thanks!
  15. Refer to the playground url below, if we press Up arrow to move the camera ahead and we'll see that the GUI.Multiline is still visible. Is there any way to hide the GUI.Multiline when all the connected meshes are behind the camera? https://www.babylonjs-playground.com/#XCPP9Y#723
  16. Refer to the demo below, a GUI line can connect a mesh & a control at the same time by using: line.linkWithMesh(sphere); line.connectedControl = rect1; However, what I want to achieve is that let GUI line link with 2 meshes, each at the end of the line. (eg. line.linkWithMesh(sphere1, sphere2); Is there any way to achieve this? https://www.babylonjs-playground.com/#XCPP9Y#39
  17. I am getting the error: "Cannot merge vertex data that do not have the same set of attributes." when I try to merge a BABYLON.Mesh created using Vertex data with ones created with MeshBuilder. What attributes are different/am I missing? https://playground.babylonjs.com/#AGL702 (Line 26) Thanks
  18. I want to stop the animation but this code doesn't work please help my. var createScene = function () { var scene = new BABYLON.Scene(engine); var camera = new BABYLON.ArcRotateCamera("Camera", 3 * Math.PI / 2, Math.PI / 8, 50, BABYLON.Vector3.Zero(), scene); camera.attachControl(canvas, false); var light = new BABYLON.HemisphericLight("hemi", new BABYLON.Vector3(0, 1, 0), scene); BABYLON.SceneLoader.ImportMesh("a", "scenes/", "ww.babylon", scene, function (newMeshes) { newMeshes[0].position = BABYLON.Vector3.Zero(); newMeshes[0].autoAnimate = false; newMeshes[0].autoAnimateLoop = false; }); return scene;}
  19. Hello, I have a use case where I would want to - create a mesh (for example- Cube) remove a vertex on some event (say mouse click) reconstruct the mesh I am able to remove the vertex from the mesh's verdata but when I use Delaunay triangulation to find the new Indices, the mesh geometry gets distorted. Not sure what to do here? Any help is much appreciated.
  20. I'm trying to add shadows and its not coming out too well. I think the high-poly count (100k) and lack of soft shadowing is producing some weird affects. This is the result from Babylon.js http://www.punkoffice.com/babylon/luke.html What I'm trying to do is find out if Babylon.js is suitable for animated photogrammetry-made humans. The only framework that I've gotten this working with so far is Unity 5, which you can see here http://www.punkoffice.com/luke/ My shadows are set up like this var shadowGenerator = new BABYLON.ShadowGenerator(4096, light); var mesh = newScene.meshes[0]; shadowGenerator.getShadowMap().renderList.push(mesh); shadowGenerator.useVarianceShadowMap = true; shadowGenerator.usePoissonSampling = true; mesh.receiveShadows = true; ground.receiveShadows = true; (using directional light as light source) Is there any way to make the Babylon.js shadow look like the Unity 5 one?
  21. Hello community, I'm new to babylonjs and I have a question concerning to the collision detection of holes in meshes. I want to recognize that a sphere flies through a hole (any kind of shape possible). I prepared a example with an cylinder which contains some holes (different shapes) at a random position. A sphere is moving up and down to collide with the cylinder and I want to know, if that sphere collides with a hole or with the surface of the mesh object. https://www.babylonjs-playground.com/indexStable.html#1ZQS9W#6 At the moment, the collision with the mesh object changes the color of the sphere on any 'collision'. My goal is, that the sphere changes the color only passing/flying through a hole, but the holes can be random positioned and could also have a random shape. It would be great if you guys can help/teach me how to achieves this.
  22. Hello all, I am trying to learn Babylon.js by making a simple game. But I have a problem. Some of the tiles I drew in Max2017 export wrong to babylon.js. Export to Substance Painter using a .FBX works and gives no problems. They are simple models and I don't see any faults, I have attached an image how it looks in Max and made a playground how it looks in Babylon.js, at some angles you can see through the faces to see the parts behind it. http://www.babylonjs-playground.com/#1UQADD#6 Can anybody see what I am doing wrong?
  23. Hi, Just found this bug: an error broke the scene if we try to clone a mesh when we are in VR mode. Here's a PG: https://www.babylonjs-playground.com/#K7YG35 Thanks !!
  24. Hello, I am new to babylonjs and am trying to extrude a non regular polygon towards the positive y direction. Going through the doc I couldn't find a way, it always extrudes it in the negative y direction. I found a hack using mesh.position.y += depth; but is there any other way of doing this ? Playground link : http://www.babylonjs-playground.com/#2EYZPE#7 Thanks.
  25. When creating a Box using BABYLON.MeshBuilder.CreateBox() I can pass it parameters like width, height and depth, but I don't see widthSegments, or heightSegments for example. Is there a way to do that?
×
×
  • Create New...