celian-garcia

Members
  • Content count

    57
  • Joined

  • Last visited

About celian-garcia

  • Rank
    Advanced Member
  • Birthday 07/04/1992

Contact Methods

  • Website URL
    https://github.com/celian-garcia

Profile Information

  • Gender
    Male
  • Location
    Cannes

Recent Profile Visitors

406 profile views
  1. tiled mesh and texture

    Oh you saw my tuto about TiledGround ! In fact it is not possible to set elevations of tiled grounds I created. But the wrapU and wrapV trick should work with a classic plane or ground or groundFromHeightMap. If you want elevations, you should have one mesh (ground or groundfromheightmap) by tile. Edit : I read twice your post and I understand whar you're saying about the fact you don't have an image so I can't help you sorry
  2. Nice ! I like it =) Sure I approve it. Aaand I have no edit to make I found it good, you are surely a better writer than me , seeing the big comments you make usually in the forum. Oo I don't know if I can change "kostar111" name in Github but I don't like it I'll probably change it if I can. Thank you very much for your consideration ! And see you in September 'cause I'm in holidays haha
  3. Tiled grounds now in Babylon.js, for anyone who want to use it, here is the tutorial http://makina-corpus.com/blog/metier/how-to-use-multimaterials-with-a-tiled-ground-in-babylonjs
  4. Sure ! Tomorrow I'll do an article about How set MultiMaterials of a TiledGround in Makina Corpus website. Maybe it could be linked in the wiki after, in MultiMaterials section ? Anyway I'll send you the link when it is done.
  5. PR updated ! Mesh is now the parent
  6. I understand, yeah I can make it with mesh. I've just found cool the new groundMesh class in particular the getHeightAtCoordinates() function which is simple but can be useful. I would prefer to find a way to modify the optimize function but for the moment I'll change GroundMesh to Mesh. By the way I found something weird with this last function and I think I resolved it. Here is the topic http://www.html5gamedevs.com/topic/8015-getheightatcoordinates-return-wrong-value/ if you want to see it.
  7. Hello ! I found that the getHeightAtCoordinates function of GroundMesh return wrong value when the ground position has been changed. Here is a playground to illustrate what I'm saying. http://www.babylonjs.com/playground/#RVTBV#4 In the playground the position of the mesh is set to (2, 2, 0) but the function return 4 (it should return 2). We could also consider that the value to return must be in the local space of the ground but even if it is the case, the value should be 0, and not 4. So I modified the function and it returns now the good value. * You can as you want change the ground position with variable groundPosition * You can also easily change the x and z coordinates of intersection with the variable coord Is there something wrong in the way I use the function or is it a bug ? PS: return values are displayed in the console
  8. I made the PR and I think all the things I said are into. Say me if you see something wrong
  9. Oh yes I'll try it I'm not familiar with it but I think it is not "sorcier". (I was not familiar with JS 5 months ago haha) I can include also old cylinder's changings to the Mesh.CreateCylinder() function just to include the subdivisions parameter. And about Geometry I could update the Cylinder one and create a TiledGround one using this code format var Ground = (function (_super) { __extends(Ground, _super); function Ground(id, scene, width, height, subdivisions, canBeRegenerated, mesh) { this.width = width; this.height = height; this.subdivisions = subdivisions; _super.call(this, id, scene, this._regenerateVertexData(), canBeRegenerated, mesh); } Ground.prototype._regenerateVertexData = function () { return BABYLON.VertexData.CreateGround(this.width, this.height, this.subdivisions); }; Ground.prototype.copy = function (id) { return new Ground(id, this.getScene(), this.width, this.height, this.subdivisions, this.canBeRegenerated(), null); }; return Ground;})(_Primitive);Primitives.Ground = Ground; Anyway I'll try it all and see if it working well. And obviously in TypeScript too. Bye
  10. Ok the clamp trick works with the TiledGround now ! Here is the result : http://kostar111.github.io/TiledGroundBJS/map/ -> No jump at all ! The stilling "problem" is I had to duplicates positions which are in the joints : you know, one with u = 1 at the end of the tile and one with u = 0 at the beginning of the next tile (idem with v values), and I don't know what would be the behaviour with collisions or Ray intersections for example if the ray come exactly in the joint. I'll test these kind of situations and come back later. But I'm relatively confident ^^
  11. tiled mesh and texture

    The big idea came from mister deltakosh as usual ^^ If you apply it with your "new mesh for each tile" it should remove the jump ! I did it and it works perfectly.
  12. Ok it fixed the problem with Planes and Grounds so it will be fixed in Geotrek 3D ! Thank you very much =) . but .. not with the TiledGround :/ I'll try to fix it tomorrow. There is something wrong on my uvs values I think or maybe the wrapping behaviour is different with submaterials ? So I made the pull request maybe a little fast ^^
  13. Draw a triangle mesh on both sides

    Hi ! If you want to see both faces of your triangle. You need to apply it a material and set the bacFaceCulling to false. http://www.babylonjs.com/playground/#19LRMI
  14. I precise I'm talking about really thin columns which seem to be no more large than one pixel. You need to zoom to see it.
  15. The code I use in the last example http://kostar111.github.io/TiledGroundBJS/materialBug/ is as simple as that : var ground = new BABYLON.Mesh.CreatePlane("ground", 1, scene);ground.rotation.x = Math.PI/2;var material1 = new BABYLON.StandardMaterial( "material1", scene);material1.diffuseTexture = new BABYLON.Texture( "texture.png", scene);ground.material = material1;And I've console.logged the uvs in the demo and here I have [0, 0, 1, 0, 1, 1, 0, 1]