Athelios

Members
  • Content Count

    13
  • Joined

  • Last visited

About Athelios

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    Czech Republic

Recent Profile Visitors

717 profile views
  1. Hi! @Quadear I was able to do this by code: var assets = loader.addTextFileTask("", "/static/assets.json") loader.load(); loader.onFinish = function (tasks) { assets = JSON.parse(assets.text); load(); }; load = function() { for (var i in assets.textures) { assets.textures[i] = loader.addTextureTask("", "/static/"+assets.textures[i]); } loader.onFinish = function (tasks) { console.log("Done! Textures loaded!"); }; loader.load(); }
  2. Probably yes, I'm not a JS specialist. I try something - it works - I implement it.
  3. Hey! I was able to clone mesh from first scene into second. var loaderScene = new BABYLON.Scene(engine); var loader = new BABYLON.AssetsManager(loaderScene); var assets = { "your_mesh_name":loader.addMeshTask("name", "", "/static/models/hand/", "hand.babylon") }; loader.load(); loader.onFinish = function (tasks) { scene = createScene(); }; var clone = function (name) { var clone = assets[name].loadedMeshes[0].clone(""); clone._scene = scene; if(clone.material) { clone.material._scene = scene; if(clone.material.subMaterials) { for (var i = 0; i < clone.material.subMaterials.length; i++) { clone.material.subMaterials[i]._scene = scene; } } } scene.addMesh(clone); return clone; } var mesh = clone('your_mesh_name');
  4. Or you can load them into second scene and clone them. var loaderScene = new BABYLON.Scene(engine); var loader = new BABYLON.AssetsManager(loaderScene); var assets = { "your_mesh_name":loader.addMeshTask("name", "", "/static/models/hand/", "hand.babylon") }; loader.load(); loader.onFinish = function (tasks) { scene = createScene(); }; var clone = function (name) { var clone = assets[name].loadedMeshes[0].clone(""); clone._scene = scene; if(clone.material) { clone.material._scene = scene; if(clone.material.subMaterials) { for (var i = 0; i < clone.material.subMaterials.length; i++) { clone.material.subMaterials[i]._scene = scene; } } } scene.addMesh(clone); return clone; } var mesh = clone('your_mesh_name');
  5. I have WRAP_ADDRESSMODE of 1 by default. Changing wrapU and wrapV didn't help. Textrures are exact power of two (1024x512). The seam is only in one direction because texture tile transitions are only on one side: Image shows how UV map is repeated. My guess is that far UVs are resized or texture is compressed which result to UVs intersection to grass texture.
  6. The chunk mesh is generated by script, not from by Blender. Can be this setting changed?
  7. Changing UVs inside about 1 or 2 pixels doesn't affect result, but 50 pixels inside changed result: You can see far blocks still have green edges. It can be a solution but I think there must be clearer solutions. Thanks!
  8. Hello, I have got procedurally generated terrain. Terrain is divided into chunks. There is texture atlas image which contains all block textures. UVs of certain block are set to appropriate positions in texture. But it renders also edges of neighbour block texture: Atlas texture: Any help appreciated!
  9. Thanks! You should probably change 10 coefficient too because Math.sqrt will speed up player.
  10. I just tested it and with Math.sqrt is works exactly as it should. Players now move same speed regardless different FPS.
  11. public _computeLocalCameraSpeed(): number { var engine = this.getEngine(); return this.speed * ((engine.getDeltaTime() / (engine.getFps() * 10.0))); } In my opinion this function isn't correct. Example: FPS = 40, DeltaTime = 25 Result is 0.0625 FPS = 20, DeltaTime = 50 Result is 0.25 This makes player with 20 FPS 4 times faster, but he should be 2 times faster. Shouldn't be Math.sqrt((engine.getDeltaTime() / (engine.getFps() * 10.0))) ?
  12. It is using same move as this: http://www.babylonjs-playground.com/#1N4XAN In this example on PC with low FPS you move much faster.
  13. Hello, Don't know if it is a bug but players with different FPS move by different speed. I use FreeCamera. I have got 60 FPS and I move about three times slower then other player with 20 FPS. That's weird because players with lower FPS should move slowly. I guess there is some speed compensating code. Also if player is for some time in another browser window and switch to game immediately holding move button he move for a while by huge speed. Sorry for my English. Thanks!