aWeirdo

Members
  • Content count

    299
  • Joined

  • Last visited

  • Days Won

    2

aWeirdo last won the day on February 12

aWeirdo had the most liked content!

About aWeirdo

  • Rank
    Advanced Member
  • Birthday

Profile Information

  • Gender
    Male
  • Location
    Denmark

Recent Profile Visitors

883 profile views
  1. Hi @fenomas billboard_all as you pointed out rotates slightly as you move the camera, However, if your camera doesnt rotate, you can you use billboad_x or billboard_z depending on your cameras angle, Otherwise you should look at canvas2d.
  2. Hi @hunts Are you using the default android browser? if you are, it does not fully support webGL, could you try and download chrome from the app store and see if you get the same result?
  3. something is clearly wrong, but i'm not sure it's babylon. this is on a intel i5 4670K 3.40 GHz & Nvidia GTX 760 2GB, with several other heavy programs running in the background..
  4. @Dad72 after some digging, i found this response post from @NasimiAsl and here's a customShader version of the terrainMaterial PG demo, originally also from NasimiAsl ; http://www.babylonjs-playground.com/#E6OZX#84
  5. @Dad72 It seems that the key "flaw" is that it's applying the same resolution, no matter what size the ground has, so the larger the ground mesh, the more pixelated the texture will become. I'm not sure what can be done, perhaps someone with a bit more knowledge on the area has some input.. but in the meantime.. Have you thought about using terrainMaterial instead? with a shader you can have up to 8 textures i believe. so instead of painting texture, you could just paint color, something like this; http://www.html5canvastutorials.com/labs/html5-canvas-paint-application/ and at run-time turn the result into a terrain texture & display it with textures on the ground mesh.
  6. @Dad72 the procedural texture was just an example Could you create a simple PG showing what you're doing in your code?
  7. @hunts Splice and pop are JS "delete" functions, in that case, just do material.dispose(); http://www.babylonjs-playground.com/#1V1HS3#1 But if you want to reduce the "size" of the material/texture; you can change the u & vScale http://www.babylonjs-playground.com/#1V1HS3#2
  8. @Dad72 This looks awesome ! Regarding the pixelation of textures, I haven't looked at the code, but have you tried something like this; http://www.babylonjs-playground.com/#1LDE1U
  9. what you could do is to import your model, clone it one time for each different material, disable them all, and then use them as base meshes for your instances
  10. The thread & PG have been updated to include AbstactMesh.collisionGroup.
  11. @adam a thought struck me, and in that case, a user can just do; mesh.collisionMask = group1: mesh.collisionMask += group2: aslong as the groups are x to the power of 2, starting from 1 ofc. On another note, collisionGroups are being added back for abstactMeshes.
  12. @adam I ment in the collision code itself, this is how it looks at the moment; for (var index = 0; index < this._scene.meshes.length; index++) { var mesh = this._scene.meshes[index]; if (mesh.isEnabled() && mesh.checkCollisions && mesh.subMeshes && mesh !== excludedMesh && ((collisionMask & mesh.collisionMask) !== 0)) { mesh._checkCollision(collider); } } if we turn the collider's collisionMask into an array, we would have to run another loop for each mesh inside the main loop
  13. @adam it would be nice being able to just mesh.collidesWith.push(thisOrThatGroup), I've thought about doing something along those lines to allow more dynamic changes to what should collide. but it would mean that we have to run another loop in the collision code for each single mesh to compare the groups, a short loop, but still a loop.
  14. @hit2501 You shouldn't import the same model several times. Here's one way that should work. // First, we pre-load the model var baseModel; BABYLON.SceneLoader.ImportMesh("", "babylon/", "modelA.babylon", scene, function (newMeshes) { baseModel = newMeshes[0]; baseModel.isVisible = false; }); function import_model() { // Clone baseModel. var model = baseModel.clone('clone_baseModel'); // Make Visible model.isVisible = true; // Set a position, change x y z. model.position = new BABYLON.Vector3(x, y, z); // Add actionManager model.actionManager = new BABYLON.ActionManager(scene); model.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger, function (evt) { model.dispose(); })); }
  15. I'm not a big fan of the collisionGroup setup tbh, it can quickly cause problems and turn into a situation like your example @adam if mesh2 moves it collides with mesh1, but if mesh1 moves it doesn't collide with mesh2 If you guys really want collisionGroups, i do have a PR ready that will add them, but we can also turn around how the masks works. so instead of same masks colliding with each other, same masks would instead ignore collisions. so; ground.collisionMask = 0; // always collides. mesh1.collisionMask = group 1; //mesh1 collides with ground, mesh2 & mesh3. mesh2.collisionMask = group 2; //mesh2 collides with ground & mesh1, but not with mesh3. mesh3.collisionMask = group 2; //mesh3 collides with ground & mesh1, but not with mesh2. http://www.babylonjs-playground.com/#20PQBI#31