Search the Community

Showing results for tags 'mesh'.



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

  1. for example i have: html button <button id="objButton" onclick="fileExport()"></button> result of var objtext = BABYLON.OBJExport.OBJ(OBJexport); // this is *.obj file syntax with meshes from scene what syntax should i use inside fileExport function, that popup window savefile in browser? I have syntax with link a href which work , but i need use button, because the program gui with buttons usually, but not with text links. this is a href syntax: function download(text, name, type) { var a = document.getElementById("a"); var file = new Blob([text], {type: type}); a.href = URL.createObjectURL(file); a.download = name; } after this, click link and can save file. I need button way. If possible not way where button press call a.click()
  2. Strange flickering on a glTF mesh with DefaultEnvironment www.babylonjs-playground.com/#T7A2L7#3
  3. Hello, I noticed that when I am working with a pre-existing model in some 3D creating environment, like 3DS Max, there are a lot of objects have what appear to be layers or children (not sure what the terminology is here). In the environment you're able to turn on and off the visibility of these layers. Like in the picture attached. I want to emulate what is in the picture but using Babylon Js. So that a user can load up a model and decide which layers are visible. Is there an example that already exists that does this? Appreciate the help.
  4. Good day folks! Im completely brand new to Babylon (3D site building in general) and have become an instant fan! Im having a few issues and would like to see if folks can help: 1. I want to have 4 boxes on my site and align 2 on the right and 2 on the left (Such as the "Fashion Show" demo on the main page), how to go about doing this? 2. I want to make my logo and place it between the boxes, any recommendations on how to make this happen? 3. Also I want to place images on the boxes and link them to another site when a person clicks them, how do an ahref in this type enviorment? 4. I would like to change the canvas to black, how to do this? Thank you for all your helpđź’‹ Meka
  5. Hi everybody ! I'm importing .obj files in my application, and I want to change their color. However, the color seems to be changed when the page is loading, but when it's finally loaded the mesh still has its basic grey material (so while the whole scene is loading we can see the mesh being pink for half a second and then takes back its basic color/texture/material). I've seen something about UV maps etc.. but I checked it in Blender and it is activated when I import into obj. Here's a pg trying to reproduce my problem ( first you will need to help me importing my object into the pg because it doesn't seem to be working, I can't see it on scene); I added a skull.babylon to show that the code I provide is supposed to work : https://www.babylonjs-playground.com/#V9KE7I#7 Thanks for your time !
  6. shen

    clone mesh from GLTF

    I tried to clone meshes imported from GLTF file and found that meshes were cloned twice. https://www.babylonjs-playground.com/#PSR2ZX#38 https://www.babylonjs-playground.com/#PSR2ZX#39 use the debug layer, you can find that the original root mesh was used as the parent of a set of cloned meshes. I also wonder whether the scale of the cloned meshes is correct?
  7. Hey everyone I'm back! I have a mesh that rotates around the Y axis whenever I click and drag along the screen: var currRotationY = 0, currPositionX = 0, clicked = false, originalRotation; canvas.addEventListener("pointerdown", function(evt) { currPositionX = evt.clientX; currRotationY = player.mesh.rotation.y; originalRotation = player.axis.rads; clicked = true; }); canvas.addEventListener("pointermove", function(evt) { if (!clicked) return; //player.mesh is my mesh player.mesh.rotation.y = currRotationY + (evt.clientX - currPositionX) / 500.0; }); canvas.addEventListener("pointerup", function(evt) { clicked = false; }); Whenever my mesh completes a 360deg turn, its rotation.y value continues to grow beyond Math.PI*2. I'd like it to be reset to 0 whenever that happens.
  8. Doug

    Hi Rich.  @rgk mentioned that you might be able to please add a "patron" badge to my forum profile?  Thanks very much!

  9. Hi, I would like to animate a big machine and I have got some questions. The machine has got some rigid bodies (like a robot) and each other have some kinematic relations. rotation/translation ....depending on the physic axis Can I load the whole scene in blender and then export it to a babylon file or is it better to load each mesh as single components in a js file scene ? . Or any other way ? at moment, the machine comtains almost 10 meshes ,that are almost 1 to 2Mbytes stl ascii files each. Once the machine is loaded, there will be animation. The position values of each meshes are computed by a cnc post processor and the positions are available in an array for each ms. I don't know exactly how I will share these values to the babylon js model at the moment . any idea ? Regarding the vision of this project, I would need some advices on the way to implement it right in babylonjs . To give you a better overview of what I want ot achieve , here is a video of my actual project : https://drive.google.com/open?id=1OQf1YTQnIdTWPBMFzlP1J2653ZjPyVkY Regards, Steph
  10. Hi everyone hope you doing great ! I'm doing a project where I want to create complex objects from more simple or "atomic" ones. For example, I create a vertical rectangle and a horizontal rectangle, I merge them and I have a "L" shape. But when I try to merge my "L" shape with another rectangle to make a "U" for example it doesn't work :/ My question is : is there any way to do what I want to do or am I stuck with only one level of merging ? Thanks a lot for your time
  11. hi i am new to babylonjs,this is the first post i made. my problem is that i make a camera,no matter the ArcRotate Camera ,FollowCamera or ArcFollowCamera the target mesh just fixed the position in the center of the screen that is very good for lots of game however i just want to make my game the target mesh a little offset at the center of screen like :at the middle bottom left screen. or any other position i want is there a simply way or a api to make it ? thanks
  12. Hi everyone, I'm just discovering BabylonJS and this is my first post ever on a forum so please be patient with me So, I'm working on a small project which consists at the moment in creating meshes via a funtion addMesh(), and I wanted to add a "selection animation" to all my meshes, basically by changing their color to an emissive white one. However, this seems not to be working, and I saw on other topics that I needed to create an actionManager for every mesh of my scene. Is there any way to make my code bellow work and have an actionManager associated to all meshes created by my function addMesh()? Here are the 2 main functions : var makeOverOut = function (mesh) { mesh.actionManager.registerAction(new BABYLON.SetValueAction (BABYLON.ActionManager.OnPointerOutTrigger, mesh.material, "emissiveColor", mesh.material.emissiveColor)); mesh.actionManager.registerAction(new BABYLON.SetValueAction (BABYLON.ActionManager.OnPointerOverTrigger, mesh.material, "emissiveColor", BABYLON.Color3.White())); mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction (BABYLON.ActionManager.OnPointerOutTrigger, mesh, "scaling", new BABYLON.Vector3(1, 1, 1), 150)); mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction (BABYLON.ActionManager.OnPointerOverTrigger, mesh, "scaling", new BABYLON.Vector3(1.1, 1.1, 1.1), 150)); } function addMesh() { var box = BABYLON.Mesh.CreateBox('box', 100, scene); box.position = new BABYLON.Vector3( Math.random() * 480, 50, Math.random() * 480, ); makeOverOut(box); } Thank you for you time, any suggestion would be appreciated ! ps : Sorry for my English .
  13. Hello, Say I have ParentName > ChildName1 > ChildName2 > ChildName3, is there a quick way to have Babylon tell me the name of the ultimate parent, no matter which child I choose? I can get immediate parent using... scene.meshes[i].parent ... but I need to go right to the top. Cheers,
  14. http://www.babylonjs-playground.com/#PFCYT#1 This playground makes 9 meshes and tries to delete them all at once in a loop. It does not work. Am I missing something? I defeated the problem via this unholy function ... function deleteAllMeshes(scene){ var countMesh = 0; scene.meshes.forEach(function(m) { countMesh++; console.log(m.name); m.dispose(); }); console.log(countMesh + " meshes deleted"); var x = countMeshes(scene); if(x > 0) { deleteAllMeshes(scene); } } Here is the output of the unholy function proving only half of the meshes are deleted per function call.
  15. Emiya0306

    Mesh instance Question

    Hey everyone! Here is another demo to show that I failed to create the instance from mesh. Is something I missing? Please give me a hand, thanks!
  16. lars

    Spine and mesh

    Hello First of all. I m so glad to see Panda on the road again :-) I have just bought the full version and playing around with Spritesheets developed in Spine 3.6.52 professional. It seems like mesh is not supported in panda 2 version 1.5.0. When I export from spine as a spritesheet with mesh animations it won´t show the spritesheet, If i remove the Mesh animation it shows the animation fine: game.module( 'game.main' ) .require( 'plugin.spine' ) .body(function() { //game.addAsset('panda.png'); game.addAsset('sheep.atlas'); game.addAsset('sheep.json'); game.createScene('Main', { init: function() { var player = new game.Player(); player.sprite.addTo(this.stage); } }); game.createClass('Player', { init: function() { //this.sprite = new game.Sprite('panda.png'); this.sprite = new game.Spine('sheep.json'); this.sprite.position.x = 200; this.sprite.position.y = 800; this.sprite.play('idle', true); } }); });
  17. Hi, is it possible to show a timer indicator when the gaze is pointing at a plane in VR mode? Would like to do it like the video that i've attached here loading.mp4
  18. Hello everyone After a long time i am back and with something for you maybe a banal issue but for me it's a nightmare . I am trying to make little adventure game and I have issue with my charakter.babylon... when i import him to the game without skeleton everything is ok but with skeleton is wrong everything, like some parts of his clothes is missing... the console is showing me endless error lines etc. I am struggling with this 1/2 weeks . I tried everything like remake my charakter.babylon and skeleton ....I treid google, youtube ... ect. Can you guys help me ? ... sorry for my bad english . I added a photo and a blende file helpblend.rar
  19. I have simple Filter and need to make access in shader to data: - position of sprite / mesh of Stage - textureRegion rectangle info How to do this? var fragSrc = ` precision mediump float; varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform vec2 dimensions; uniform vec4 filterArea; uniform vec4 texRegion; vec2 mapCoord( vec2 coord ) { return coord * filterArea.xy; } vec2 unmapCoord( vec2 coord ) { return coord / filterArea.xy; } void main() { vec2 coord = vTextureCoord; coord = mapCoord(coord) / dimensions; coord = unmapCoord(coord * dimensions); vec4 color = texture2D( uSampler, coord ); gl_FragColor = color; } `.split('\n').reduce( (c, a) => c + a.trim() + '\n' ); module.exports = RepeatRegionFilter = function RepeatRegionFilter() { RepeatRegionFilter.super_.call(this, null, fragSrc); } Util.inherits(RepeatRegionFilter, PIXI.Filter); RepeatRegionFilter.prototype.apply = function(filterManager, input, output) { this.uniforms.dimensions[0] = input.sourceFrame.width; this.uniforms.dimensions[1] = input.sourceFrame.height; filterManager.applyFilter(this, input, output); }
  20. Hello everyone, I have little issue with my mesh : When i load it, it get "auto smoothed", and also get "cutted" apart. Basically when I save my mesh in blender it looks like this : But when I load it with babylonjs Please help me to fix this, Thank you !
  21. I've been checking this documentation, but didn't find anything I can use. Please, help.
  22. Hi ! I am trying to set 2 different textures _by code_ on a loaded mesh exported of Blender. There is no problem on "creating" a mesh from MeshBuilder and set it faceUV with options, but from a "loaded" mesh (created from blender, without any texture) I don't manage to do it. I give this playground for a start (my code is too complicated to put it in a playground) : https://www.babylonjs-playground.com/index.html#YYQ1LC#39 The goal : set any texture (from internet) to the loaded mesh to any face of the Dude.babylon. I tried few things like VertexBuffer.UVKind but... it should not be the way to go More details : My Blender object is a single plane : 6 vertices, 2 faces. My goal is to dynamically set different texture on each face . The wireframe show me the 2 faces but I have no idea how to set them the texture. Thanks for any help
  23. Hi! I'm completely a newbie in 3D world and BabylonJs. What I'd like to do is to be able to select a given mesh by clicking on it and change it's color to show that it has been selected. I've created a really basic scene with 2 meshes and googled my problem but couldn't find anything about that. Maybe it's super trivial (?) Here's my example, thanks for any help or any useful resource to get started on this task https://playground.babylonjs.com/#TC2K69
  24. Hi ! I precise that my question is only about meshes Should we prefer to load small objects (between 0 and 10 units for example, with a high precision like 5.554) or it does not impact performance at all and we can work with huge numbers as well (10k, 100k) ? I speak about width/height of a box for example. I guess the more important things are the number of vertices/edges/facets and how impostors are used (mesh vs box), but I would like to know regardless of that, if the size of meshes matters. Same for textures : should we prefer a texture repeated 1000 times on a plane or a bigger texture repeated 10 times for example ? Thank you
  25. Hi, I am trying to rotate a mesh with a custom pivot, using setPivotMatrix function. In the sample below, the pivot (red box) "seems" to be in the right position, but the rotation done is not as expected (green and grey box should be superposed on the corner). I dont understand the setPivotMatrix http://www.babylonjs-playground.com/#4FNAXM#2 Why the pivot point (red box) is not inside the green box in this sample ? I just would like something like : X X [X] X X X Where [x] is the superposed part of the 2 meshes. Thanks