• Content Count

  • Joined

  • Last visited

  1. @RaananW @Sebavan @dbawel @Nabroski The function "templates.main.param.fill-screen =" true" is a great help, and solves a big problem with a single line of code, thank you very much. So, I understand that the original problem of my publication is in the 3DS Max model used, as Nabroski commented. Now I am making my own models and maps and everything works very well. And with your new contribution everything works better ...
  2. @Nabroski You say my shampu.3ds model? The original is a .obj that I downloaded from Internet. Now I will make my own designs to continue learning to use Babylon.
  3. @Nabroski @Sebavan @dbawel I think my original code ( here ) works fine. My problem is in the 3D model. Here is a new one (simpler), exported in .gltf and there is no aliasing. Open your Chrome / Opera browser on your mobile phone and try: https://alboenergy.com/ar/probar-7 Now I'm going to review my 3DS MAX project.
  4. @dbawel @Nabroski @Sebavan @RaananW Following the Sebavan link ( https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html ), I was able to make some adjustments (see code bellow) , which now have a good quality of the model, but I can not make it complete all the screen on mobile phones: Question: How can I include my model inside the "canvas" tags? See here: https://alboenergy.com/ar/probar-4 My current code: <!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Shampu</title> <style> html{width:100%;min-height:100%;margin:auto;top:0;left:0;padding:0;overflow:hidden} body {top:0;left:0;margin:0;padding:0;overflow:hidden} .nav-container{display:none !important} canvas { width: 100vw; height: 100vh; display: block } </style> </head> <body> <babylon> <model url="models/shampu/shampu.gltf"> <scaling x="1" y="1" z="1"></scaling> </model> <camera> <behaviors> <auto-rotate type="1"></auto-rotate> </behaviors> </camera> </babylon> <!--<canvas id="c"></canvas>--> <script> function resize(canvas) { var cssToRealPixels = window.devicePixelRatio || 2; // Lookup the size the browser is displaying the canvas in CSS pixels // and compute a size needed to make our drawingbuffer match it in // device pixels. var displayWidth = Math.floor(canvas.clientWidth * cssToRealPixels); var displayHeight = Math.floor(canvas.clientHeight * cssToRealPixels); // Check if the canvas is not the same size. if (canvas.width !== displayWidth || canvas.height !== displayHeight) { // Make the canvas the same size canvas.width = displayWidth; canvas.height = displayHeight; } }; </script> <script src="js/visor-2.js"></script> </body></html>
  5. @dbawel @Sebavan @Nabroski Yes, I think the problem is in my lack of experience with Babylon. I will verify my work and I will make new tests. If someone here wants to try it (above are the links), I will appreciate a copy of the code. I'm just looking that my model to look clean on mobile devices and tablets. Thanks again.
  6. Hi @Nabroski Sounds great. I will go to study the links with the details. A pity that the Playground Site does not download the .ZIP (the system does not work). :( Thanks
  7. @dbawel Thanks for the interest in helping me. I appreciate your knowledge and your time in this. I could not post it on playground.babylonjs.com ( I still do not know how to do). Here the .zip with the complete project (2.1Mb). https://goo.gl/TVnmDe ----------- Here are the other formats, exported from Babylon exporter for 3DS Max: Babylon: https://goo.gl/b7R3q9 GLB: https://goo.gl/mqyooQ And the 3DS Max file of the project: https://goo.gl/PQHZpi ----------- So, how should I use in my code what Sebavan has commented? And this is my current code: <!DOCTYPE html> <html lang="es" class="no-js"> <head> <meta charset="UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="robots" content="noindex, nofollow"> <title itemprop=name>Shampu 2</title> <meta name="HandheldFriendly" content="True"/> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0"/> <style> html{width:100%;min-height:100%;margin:auto;top:0;left:0;padding:0;overflow:hidden} body {top:0;left:0;margin:0;padding:0;overflow:hidden} .nav-container{display:none !important} babylon{ width:100%; height:720px; /* NOTE: 1100px = Desktop /// 720 = For devices 640 x 480 DPR:2 /// 680 for iPhone 4-5 /// 790 = iPhone 7 plus */ margin:0 auto } canvas { width:100%; min-height:720px; /* NOTE: 1100px = Desktop /// 720 = For devices 640 x 480 DPR:2 /// 680 for iPhone 4-5 /// 790 = iPhone 7 plus */ } </style> </head> <body> <!--<babylon extends="minimal">--> <babylon> <model url="models/shampu.gltf"> <scaling x="1" y="1" z="1"></scaling> </model> <camera> <behaviors> <auto-rotate type="1"></auto-rotate> </behaviors> </camera> </babylon> <script src="js/viewer.js"></script> </body></html> Thanks
  8. @dbawel @Sebavan Tomorrow I will publish my current html code here and ask for help with the script that Sebavan comment. I remember that I only have 24 hours of experience with Babylon, and I never touched its extra code, so it will help me a little bit. Thanks, again.
  9. @dbawel I have tried the 2nd option and I can not find an answer. I do not use Blender, and learn now is more time for me. Q: What is "increase the resolution of the texture" ...? In the Babylon exporter? The bitmap of the material in 3D Max? (it is a .jpg 2,000 x 2,000 px). If you say increase "the resolution" in 3Ds Max I do not know how to do it. My project in 3ds has no cameras or lights... Should I add them? I think that perhaps remove the background from the Babylon stage, or replace it with another image, but I do not know how to do it (I am a newbie in Babylon). Mmmm...
  10. @dbawel Thanks for your help. I will test the 2 options, and comment on the result.
  11. @dbawel Thanks for your help. I have problems to see it on Android (5-6) with all browsers installed. In PC's there are no problems. Everything looks good, but in my phones there is a "sawtooth" around the object (artifacts), which are annoying (edges with blinking, etc). I am using the Babylon exporter for 3DS Max 2017, and I have the same problems with .gltf and with .glb Q: Anyone else that visits the demo and can check it with their phones? https://alboenergy.com/ar/shampu-2.html Thanks.
  12. Hi all. I am a very new user in Babylon (I started yesterday), and I already have a project running, but you can see some error in the .gltf model: https://alboenergy.com/ar/shampu-2.html My question: How can I eliminate the aliasing that appears in my model when it is loaded on phones and tablets? I will appreciate any help for this newbie. Thanks.