• Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Dad72

  1. Dad72

    where is BabylonExporter.exe?

    You must install Microsoft XNA Framework Redistributable 4.0 Download here:
  2. Dad72

    FBX to Babylon export problem

    You must generate. I explain on this post:
  3. Dad72

    Skybox - edge show

    This does not correct the problem. I always have a side with a line. This is not all around, but on a single side. This is may be the texture?
  4. Here is an example of what i would do. var objectFind = scene.getMeshByName("CubeName") ; // Find the cube by nameSphere.parent = objectFind; // Attach sphere in cubeobjectFind.isVisible = false; //Cube not visible
  5. Dad72

    Create a mini-map

    I've corrected the code here with everything that you say: - I removed camera2.viewport.renderGroupId - camera2.position and camera2.rotation at each frame is removed and camera2.parent = cube; in place. - rotateCamera.attachControl(canvas) Rather than scene.activeCameras[0] - Math.PI/2 Rather than 1.57 - And added scene.activeCamera.__fxaa_cookie = new BABYLON.FxaaPostProcess("fxaa", 1.0, scene.activeCamera); Thanks you
  6. Dad72

    Create a mini-map

    Someone would have an idea of how to create a mini-map. I imagine that it must be a different camera in spelling which am the main camera. But how do i do that? Is there a second canvas? I would like to be able to display in the top right corner, a mini map that takes into account the displacement of the main camera or character that the camera follow. Thank you for your councils.
  7. Dad72

    Picking result & increment a variable

    I fact as this : pickResult = scene.pick(event.clientX, event.clientY - tbl.offsetTop); if (pickResult.pickedMesh) { if( == "BoxName") { Result += 1; } }or If you have several models : for(a=0; a < mesh.length; a++) { if( == mesh[a].name) { Result += 1 } }
  8. Dad72

    Skybox - edge show

    for antialiasing, i find this, but this does not correct the problem entirely. scene.activeCamera.__fxaa_cookie = new BABYLON.FxaaPostProcess("fxaa", 1.0, scene.activeCamera);
  9. Dad72

    Skybox - edge show

    I have the same problem also.
  10. is the same, this also works. You seem always to want to me resume.
  11. Dad72

    Create a mini-map

    You ask me to send my code and now you are telling me to send less. I not understand well what you expect. I send all the code in full, me ca i have no problem. I sends the amount of code that I want.
  12. As I said the code is already on this forum. I did a search 'forward' and i am falling on the part of code which interessai me. I always share the results, you should not persecuting me for that I share my code. This is always what I have done. Of other, by contrast, have never share their codes. I agree to the community sharing. I do not agree that the people to tell me what I should do and not to do. I am here since the opening of the forum, you arrive here to tell me how I should do on this forum. You you deceive of person. Thank You
  13. Why not search for the name of the box to replace. Then make the box invisible and attach (.parent) the sphere to this cube. What should be simpler and more direct and resoudras your problem. your sphere attached to the cube which is invisible will take into account the movement of os. in Frensh: Pourquoi ne pas rechercher le nom du cube à remplacer. puis le rendre invisible et attacher la sphère à ce cube. Ce qui devrais être plus simple et plus direct et résoudras votre probleme. votre sphère attaché au cube qui est invisible prendra en compte les mouvement des os.
  14. oops, Yes i had reverse the camera. It works like this. scene.activeCameras.push(rotateCamera);scene.activeCameras.push(camera2);scene.activeCameras[0].attachControl(canvas);What solves all the problem. Thank You Nico
  15. Dad72

    Create a mini-map

    This code, allows you to display a mini-map, to control a character and displays the shadows on the scene. Camera.js var canvas = document.getElementById("renderCanvas");var parentCamera;var keys={letft:0,right:0,arriere:0,forward:0};var orbite = false;function createScene() { var engine = new BABYLON.Engine(canvas, true); var scene = new BABYLON.Scene(engine); var LightDirectional = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(-1, -4, -1), scene); LightDirectional.diffuse = new BABYLON.Color3(1, 1, 1); LightDirectional.specular = new BABYLON.Color3(0, 0, 0); LightDirectional.position = new BABYLON.Vector3(250, 400, 0); LightDirectional.intensity = 1.8; var rotateCamera = new BABYLON.ArcRotateCamera("ArcRotateCamera", 4.7, Math.PI/2, 30, new BABYLON.Vector3(0, 10, 0), scene); var camera2 = new BABYLON.FreeCamera("Camera2", new BABYLON.Vector3(0, 0, 0), scene); camera2.fov = 2; scene.activeCameras.push(rotateCamera); scene.activeCameras.push(camera2); rotateCamera.attachControl(canvas); scene.activeCamera.__fxaa_cookie = new BABYLON.FxaaPostProcess("fxaa", 1.0, scene.activeCamera); rotateCamera.viewport = new BABYLON.Viewport(0, 0, 1.0, 1.0); camera2.viewport = new BABYLON.Viewport(0.85, 0.75, 0.145, 0.24); var ground = BABYLON.Mesh.CreateGround("terrain", 500, 500, 50, scene, true); ground.position.y = -0.1; var matGround = new BABYLON.StandardMaterial("MaterialCamera", scene); matGround.diffuseTexture = new BABYLON.Texture("terre.png", scene); matGround.diffuseTexture.uScale = 50.0; matGround.diffuseTexture.vScale = 50.0; ground.material = matGround; var cube = BABYLON.Mesh.CreateBox("Box", 2, scene); cube.scaling.y = 3; cube.position.y = 3; cube.position.z = 0; var materialCube = new BABYLON.StandardMaterial("default", scene); materialCube.diffuseColor = new BABYLON.Color3(0.76, 0, 0); cube.material = materialCube; camera2.position = new BABYLON.Vector3(cube.position.x, 120, cube.position.z); camera2.rotation = new BABYLON.Vector3(Math.PI/2, 0, 0); camera2.parent = cube; var maison = BABYLON.Mesh.CreateBox("Box", 6, scene); maison.position.y = 3; maison.position.z = 100; var materialCube = new BABYLON.StandardMaterial("default", scene); materialCube.diffuseColor = new BABYLON.Color3(0.76, 0, 0); maison.material = materialCube; var skybox = BABYLON.Mesh.CreateBox("skyBox", 1000, scene); skybox.infiniteDistance = true; var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene); skyboxMaterial.backFaceCulling = false; skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("skybox/skybox", scene); skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE; skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0); skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0); skybox.material = skyboxMaterial; var shadowGenerator = new BABYLON.ShadowGenerator(4096, LightDirectional); shadowGenerator.getShadowMap().renderList.push(cube); shadowGenerator.getShadowMap().renderList.push(maison); ground.receiveShadows = true; engine.runRenderLoop(function () { scene.render(); if(orbite == false) cube.rotation.y = 4.7 - rotateCamera.alpha; = new BABYLON.Vector3(cube.position.x, 10, cube.position.z); }); scene.registerBeforeRender(function(){ if (keys.forward==1){ var posX = Math.sin(cube.rotation.y); var posZ = Math.cos(cube.rotation.y); cube.position.x += posX; cube.position.z += posZ; } if (keys.left==1) cube.rotation.y=cube.rotation.y+0.1; if (keys.arriere==1){ var posX = Math.sin(cube.rotation.y); var posZ = Math.cos(cube.rotation.y); cube.position.x -= posX; cube.position.z -= posZ; } if (keys.right==1) cube.rotation.y=cube.rotation.y-0.1; }); window.oncontextmenu = function () { return false; }; window.addEventListener('mousedown',function(e){ e.preventDefault(); var rightclick; if (!e) var e = window.event; if (e.which) rightclick = (e.which == 3); else if (e.button) rightclick = (e.button == 2); if(rightclick == true) { cube.rotation.y = 0; orbite = true; } else if(rightclick == false) { orbite = false; } }); window.addEventListener('mouseup',function(e){ orbite = false; }); window.addEventListener('keydown',function(event){ var ch = String.fromCharCode(event.keyCode); if (ch == "Q") keys.left=1; if (ch == "D") keys.right=1; if (ch == "S") keys.arriere=1; if (ch == "Z") keys.forward=1; }); window.addEventListener('keyup',function(event){ var ch = String.fromCharCode(event.keyCode); if (ch == "Q") keys.left=0; if (ch == "D") keys.right=0; if (ch == "S") keys.arriere=0; if (ch == "Z") keys.forward=0; }); window.addEventListener("resize", function () { engine.resize(); });} index.html (You must change the image of the part of the mini-map) <!DOCTYPE html><html xmlns=""><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>BABYLON - Mini-Map</title> <script src="../hand.js"></script> <style> html, body, canvas { width: 100%; height: 100%; padding: 0; margin: 0; overflow: hidden; } </style></head><body> <canvas id="renderCanvas"></canvas> <div style="background:url(Radar_Border.png);background-size:100% 100%;width:14.5%;height:24.2%;right:0.5%; top:0.87%; position:absolute;"></div> <script src="./../babylon.js"></script> <script src="Camera.js"></script> <script>createScene();</script></body></html>
  16. Thank You Deltakosh. For the shadows is ok. work. but the viewport does not work anymore, I no longer mini-map display. The viewport appears and disappears immediately when I refresh the browser. And I do not have more control on the camera.
  17. Dad72

    Skybox textures - do they have to jpg?

    You can do so: Babylon.js-master\Tools\BuildOurOwnBabylonJS\BuildOurOwnBabylonJS\executables\BuildOurOwnBabylonJS.bat Then you will find the file here: Babylon.js-master\Tools\BuildOurOwnBabylonJS\BuildOurOwnBabylonJS\ourOwnBabylon.js
  18. This is not a plane that I used, but the viewport which passes behind the ground. camera2.viewport = new BABYLON.Viewport(0.85, 0.75, 0.145, 0.24);rotateCamera.viewport = new BABYLON.Viewport(0, 0, 1.0, 1.0); camera2.viewport.renderGroupId = 1; // not workAnd the shadow why disappears it?
  19. I find the answer on the forum.
  20. Dad72

    Create a mini-map

    As I was saying earlier, I again uses the multi-views, and I am come to a satisfactory result. index.html I thank you very much
  21. Dad72

    Create a mini-map

    Thank you for advice. I have a lot to teach of this motor. I obtain a texture black, I do not know if what I made is correct. var myRenderTarget = new BABYLON.RenderTargetTexture("TextureMiniMap", 512, scene, true); scene.customRenderTargets.push(myRenderTarget); var MiniMap = BABYLON.Mesh.CreatePlane("SupportMiniMap", 9, scene); var materialMap = new BABYLON.StandardMaterial("MaterialMiniMap", scene); materialMap.diffuseTexture = myRenderTarget; MiniMap.material = materialMap; myRenderTarget.onBeforeRender = function() { }; myRenderTarget.onAfterRender = function() { };I think that the viewport props better and is more to adapt to make it, but I had of problems to regulate the height of camera2 which was above the head of of actor. I am going to leave again on a viewport, i had succeeded in having something to compare has now or I acquire nothing that works and or I do not understand much without more study by tutoriel. There should be more of tutoriel for Babylon, especially when we start with and that we do not have an expert level.
  22. Dad72

  23. Dad72

    Graphique user interface (GUI) ?

    I understand that this is not on the agenda. I was wondering if this was provided for in the future. Thank you for your reply.
  24. Is this that Babylon integreras in the future a GUI of ways to make windows and other interface components of game more beautiful that the html components As well as the functionality such as: Radar mini-map, compass, progressebar ... These are elements necessary to create a game. Examples of code (This is just an idea) new BABYLON.GUI.DrawTexture(new BABYLON.Rect(x, y, width, height), new BABYLON.Texture(), className);new BABYLON.GUI.Window(id, new BABYLON.Rect(x, y, width, height), function, "Title form", className);BABYLON.GUI.DragWindow(id);// Form dragablenew BABYLON.GUI.Label(new BABYLON.Rect(x, y, width, height), "My label", className);new BABYLON.GUI.text(new BABYLON.Rect(x, y, width, height), "My text", className);new BABYLON.GUI.textarea(new BABYLON.Rect(x, y, width, height), "My text multi line", className);new BABYLON.GUI.Button(new BABYLON.Rect(x, y, width, height), function, "My button", className);new BABYLON.GUI.progressBar(new BABYLON.Rect(x, y, width, height), function, className);".className{}");...All this would allow to build friendly interface.
  25. Dad72

    BabylonHx - Haxe/OpenFL port of BabylonJs

    I agree with this. I have also test Three.js and i am able to go further with Babylon.js which is more modern.