Xav

Members
  • Content count

    38
  • Joined

  • Last visited

About Xav

  • Rank
    Advanced Member

Recent Profile Visitors

449 profile views
  1. Update shape with heightmap

    Hello, I found time to explore this idea a bit more. Sorry but I can not get the script to export a mesh to .obj extension for the playground. This works perfectly on my local machine. https://www.babylonjs-playground.com/#P9UZG#14 My question is how to save everything in a file mesh.obj and mesh.mtl? If possible locally at the moment. If anyone has an idea or a track to do that. Thank you
  2. Convert image to NormalMap

    Hello and thank you for the answer. Yes I agree with you it is better to generate its normal map either. However for the project on which I work it to be interesting to have a sysytem which generates these normal map automatically. So I am a taker of a solution if you want to share it . Thanks again.
  3. Convert image to NormalMap

    Thanks Dad72. I found this link :https://gamedevelopment.tutsplus.com/tutorials/building-shaders-with-babylonjs-and-webgl-theory-and-examples--cms-24146. May be i can try to find a solution like this ....
  4. like this materialSphere1.diffuseTexture.hasAlpha = true; ?
  5. Hello You can do this: https://playground.babylonjs.com/#QTKGJB It work in vr camera...
  6. Hello, You can do the same project with babylon , html and css with some javascript to control your viewer...
  7. Convert image to NormalMap

    Yes NormalMap Online can do it but it works with three.js and the idea it's to integrate the same function directly into Babyon.js as in this example threejs exemple. I'm almost sure it should be possible to do it with Babylon and maybe it already exists? Thank you.
  8. Hello, I am looking to convert a diffuse type image to normal map directly in babylon.js. I found this option in the editor as in the attached image and I wanted to know if anyone know if this option is already integrated into the framework so as not to have to redo what already exists;). Thank you.
  9. Update shape with heightmap

    Hello Thanks Wingnut I had actually started looking at this. I will continue to develop this idea in parallel and obviously if I get something convincing I would share it ;). Thanks Deltakosh actually I saw this especially that there is a post on this subject that runs on the forum: http: //www.html5gamedevs.com/topic/29587-babylon-objects-to-obj-file/ Again thank you for the time you give us to answer. Babylon.js is really a great tool very polyvalent Thank you for everything !
  10. Update shape with heightmap

    Is possible to rotate and translate the displacement map inside the obj.applyDisplacementMap() ? thanks
  11. Update shape with heightmap

    Hello, I found the solution: var obj = scene.getMeshByName("piece001"); var positions = obj.getVerticesData(BABYLON.VertexBuffer.PositionKind); var vb = obj.getVertexBuffer(BABYLON.VertexBuffer.PositionKind); vb._buffer._updatable = true; obj.applyDisplacementMap("test/test.jpg", 0, 10 , function() { obj.updateVerticesData(vb); console.log("OK!"); }); Babylon.js is PERFECT :)!!!! I think is now possible to export this mesh to an .obj file with the updatable shape ? Thanks.
  12. Update shape with heightmap

    Hello, Like this: http://www.babylonjs-playground.com/index.html#WS3Z9A Thanks.
  13. Update shape with heightmap

    I continued my research on this subject. The problem would not it come that my mesh is not Updatable? As specified In the doc: "The mesh must be set as updatable. Its internal geometry is directly modified, no new buffer are allocated." I found this post : Is it possible to make a mesh updatable if it was created in an external softaware, to modify its mesh with a Heigth map? Thanks
  14. Update shape with heightmap

    Ok sorry, An exemple on picture exemple.jpg. It works very well with: var sphere = BABYLON.Mesh.CreateSphere("Sphere", 32, 3, scene, true); sphere.applyDisplacementMap("Assets/test.jpg", 0, .2); When i want to apply this on an obj create in blender it no longer works... Is my question clearer? Thanks
  15. Hi, I am trying to find out if it is possible to adapt this 'sphere.applyDisplacementMap ("/ assets / amiga.jpg", 0, 1.5);' of this example https://www.babylonjs.com/demos/displacementmap/ on an object create in blender with the adapted uvs. To make it simple I would like to be able to change the shape of my object with a heightmap. I do not need to animate it. I do not find a track to create this effect so I ask the question as to whether it is really possible. Thank you