Search the Community

Showing results for tags 'solved'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 1639 results

  1. I explain the problem: I record a first camera position in a variable. Then I move the camera to compare in the state the new position of the camera and the variable in the old position. The problem is that the variable is reassigned in real time when the camera is moving, which I find very strange. The variable should not be changed. See in this PG and the console. Click once on the button to save the variable. Then move the camera, the variable changes all alone. So at the second click on the button, the alert is never reached, because the variable has the same value as the new position of the camera, while the record was made on an old camera position. If we look at this PG more simple, it's the same thing : It's something I saw a long time ago, but that did not bother me, but here I can not record a camera position to compare it to a new position without the variable being rewritten by the Holy Spirit, LOL. [Edite] : This does not seem to be related to Chrome 71. I have tried FireFox and Opera too and it's the same thing. So I think that the Babylon reassigns the variables that it has to assign, maybe the light as well as something else in Babylon reassigns the variables that it has to assign. I will check it Yes, the lights too. As soon as the light is moved, it rewritten the variable that it has assigned previously. I think that all entities in Babylon are rewritten the variables automatically. So currently, we can no longer record transformations (position, rotation, scale and other modifications) in a variable to preserve previous states and compare them with new transformations. This is a big problem for the editor that one develops
  2. Hi Is it possible to make videoTexture with rtsp stream on it or shader that can show rtsp stream?
  3. Hi Can I somehow make distance for LODs to count from the target position of ArcRotateCamera? I'm making sort of map application and when I tilt the camera down, visible meshes on the map is under the camera and I want them to be where camera is looking
  4. On my project the buttons (BABYLON.GUI.Button.CreateSimpleButton(null, "Fixer cette vue");) do not show the text totally. I am forced to point to any GUI element so that the text of the button is completely displayed. It is possible that this problem is not on that the buttons. But if a text has more than one word, every word goes to the line. The button text that this gets is "cette" instead of "Fixer cette vue". Move the mouse over the button (cursorHover) and this is normal text ("Fixer cette vue") . Repeat play and another parentElement error happens After when I go on the playground I get this error : cannot read property 'parentElement' of undefined
  5. From the version of the Blender exporter that deltaKosh wrote, the value for specular hardness was designated as the value for specularPower. This has to change for processing Cycles nodes, without baking. Ignoring the principled shader for now, this value now has an analog in the roughness value of a Glossy node. Problem is this is a value from 0 to 1. Also a value of 0 is shiniest while 1 is dullest. The default value is 64. MakeHuman imports to Blender change based on the render currently assigned. The eye mesh is the glossiest. When using the internal render the hardness is 500. Roughness in cycles is 0. Does a range of 500 (0) to 64 (1) make sense? There is very little in the way of documentation for this.
  6. Hi, When we place lights in our scene, the lights are not visible but their lighting is visible. I want to show light the light also and write code in such a way that when the user clicks on the light, the light should be switched off. Is there any built-in functionality sometjing like, myLight.renderAsMesh=true or mYLight.mesh=someLightMesh; Thanks in advance.
  7. Does anyone know how to extend the default babylon.js file parser? I'm successfuly loading a scene with the JSON data I have (Babylon File Format), but my JSON contains some custom metadata, which I'd like to handle when i load/parse. I'm aware of Scene.AddParser, but I feel like that is too far down the chain (my custom properties have been stripped out by the time it hits my parser function). Another thing I've noticed is you can do the following: BABYLON.SceneLoader.OnPluginActivatedObservable.add(function (loader:ISceneLoaderPlugin) { }); Is there anything I can hijack at that point? I can see loader has an extensions property..... Any help would be appreciated, thanks!
  8. Hi, Hope I'm clear with my explanation: I have a Babylon scene and when it is alone (no other div on the html that has the canvas) the OnPointerOverTrigger works perfectly. However, when I put the canvas inside a <div> the OnPointerOverTrigger seems shifted, I mean, when I hover over the mouse over the mesh the action starts outside the mesh. I need the scene to be inside a div as I'm using w2ui as the GUI interface of the application. Attached one example: camera.html and cameraGood.html camera.html is the one with the issue, it only adds these lines: <div> <h2>Title</h2> </div> <div> <canvas id="renderCanvas" touch-action="none"></canvas> </div> cameraGood.html has no divs <canvas id="renderCanvas" touch-action="none"></canvas> I create a sphere every time you click on the surface. Without the div it works great, but when I add a div for a title and another for the canvas it fails, it picks another position. It seems the mouse coordinates are being used for the complete web browser and not the canvas. Any recommendation? camera.html cameraGood.html
  9. Hello there. What is intended method of playing the same sound multiple times *concurrently* without re-downloading the sound file from the server? const gunshot = new BABYLON.Sound('foo', "sounds/gun_semi_etc.wav", scene, null, { volume: 1 }) If I have multiple players or bots in my game, any of them can produce gunfire. As each of them shoots, I end up with a separate web request per entity: I'm accustomed to howler, where the first time a sound is created, like 'foo.wav' it will load it from the server. Any subsequent sound objects created that play 'foo.wav' will build themselves from the same sound data without an xhr. How do I accomplish the equivalent? TY TY
  10. I have an arc camera attached and have removed the mousewheel zooming from it. Instead I've intercepted the mousewheel event and I'm trying to scale all of the particles via the parent mesh so that the scene stays the same, but the particles all zoom in / out. Before sps.setParticles is called I update the mesh property scalingDeterminant to try and zoom it, but I'm not seeing any effect. I may be doing this completely the wrong way but can't find anyone else scaling the mesh after initialisation (I'm doing it this way to avoid enumerating the particles as I thought it might be more efficient). I've modded a project in the playground so you can see what I'm trying -> Any advice for a noob? Thanks in advance Ryan
  11. Hello there! I been trying to load my gltf model from it's raw data source, is there anything i might be doing wrong here, the model shows in the sandbox though
  12. I'm seeing a dependency on setTarget() and how an anaglyph camera generates parallax for the left/right images. For example, generates an image where the front box looks like it's coming out of the screen and the back box is behind the screen: Now let's change the setTarget to a different position, but keep everything else the same: Now both boxes appear in front of the screen: I have a couple of questions with respect to this: Is this the expected behavior? If it is, is there a simple way to point the camera without altering the parallax?
  13. Dad72

    Gif Creation

    In the documentation there is an example to create a gif animation: var imgNm = 0; scene.render(); scene.registerAfterRender(function(){ ground.rotation.y += 1 * Math.PI / 90; if(imgNm++ < 90) { BABYLON.Tools.CreateScreenshotUsingRenderTarget(engine, camera, 200); } }); But it does not work at all. This wants to download 90 PNG images instead of a gif image. I think the documentation lacks information here like a PG that shows how to download a Gif image PG here:
  14. Hello, I am playing around with the Solid Particle System (SPS) and the performance looks great! However I would like to show a different letter on the front face of each of my cubes, such as illustrated here: However, it seems that the property uvs (SPS.particles[p].uvs) does not allow me to do that. It is expecting a Vector4, while I was expecting to give an array such as the one given for Mesh.setVerticesData(BABYLON.VertexBuffer.UVKind, array). Is it in theory possible to change the VerticesData of each particle as if they were meshes?
  15. So on this page: planeNormal should be dragPlaneNormal in the PointerDragBehavior section. Also, I couldn't log in with my old user account (I used the twitter login). Is that working for you folk? Thanks, Bryant
  16. On some objs that I import, I'm having to do foo.scaling = new BABYLON.Vector3(-1, 1, 1). For example this zombie needed the torso scaling set (-1, 1, 1) before the left and right hands appeared on the correct sides of the body among other details. The arms are parented to the torso, so I think that is how the scale is factoring into which side they appear on. The head is actually flipped incorrectly at the moment as well, but that doesn't really matter. I'm fine with scaling(-1,1,1) as a solution, but for some reason the gun now has its mesh inside out or something. So my question is two parts: 1) why is the gun inside out? The parent order (child to parent) is weapon -> leftHand -> lowerLeftArm -> upperLeftArm -> torso. In theory everything is inheriting its scale from torso. Each body part is a separate mesh made the same way, yet only the weapon is inside out, not the torso or any of the arm parts (maybe I just have an error in my code, unless there is some reason that this would naturally by the case). 2) is there a babylon function to fix only an individual mesh? I searched the forum and found many pgs dating back up to 3 years, and some mention of including righthand vs lefthand modes in bjs... but I wasn't sure what the current day method would be to fix just the weapon mesh below. It may be a little hard to see that it is in fact inside-out, so here's another picture of what the weapon is supposed to look like: I cannot use blender+babylon-exporter to make the full model at this point (some complex issues with networking bone animations exported from blender to babylon, a topic for another time). I am still using blender to pose my character as a visual reference before converting the rotations of each body part over to a custom animation system -- so this is perhaps where the conflicting notion of left/right arms is coming from originally. Thanks
  17. Hi! I am very new to Babylon. I am hoping to switch to Babylon for a game that's already well underway after trying two other engines. I am really liking it so far! For now my game is a lot of 2D and one of my requirements is nice text rendering (which I haven't found in the other engines). I want to render text on Planes like that, with dynamic backgrounds. This is how for I got with what I want (my camera will be straight facing and stationary) but as you can see if you zoom in, the canvas text's alpha values are mixed with black. The orange part is how I want it to look, but of course that is not a dynamic background. How can I preserve those alpha values coming from the Canvas? Thanks a lot!
  18. My aim is to render a 3D model on a web page and change its textures. I am using Babylon.js for the same. So far I am able to render the 3D model and change its texture but I am stuck in end beautification of the final view also known as post processing. I want to improve the quality of my rendered 3D model. I am enclosing the screenshot of what I have done(Figure 1) and what I want to achieve(Figure 2) so that you can get a clear picture of the issue.
  19. Hi, I am creating a scene which will have a huge translucent sphere around a mesh and I want to be able to walk through the sphere to look at the mesh. I am using VR helper methods but I am not able to teleport inside sphere. I tried overriding the raySelectionPredicate method and returned false for the specific sphere so that the ray doesn't collide with the sphere, but its not helping. Any leads will be appreciated. Thanks.
  20. Is there a simple way to check if a mesh is in the frustum and not hidden by other meshes? It seems pretty easy to check if the camera is aimed at the mesh in general: scene.isActiveMesh(mesh) But I want to check if the mesh is not hidden by other meshes. I'm creating a 3-D maze and need to move/lock the camera temporarily when certain objects hidden in the maze come into view. If I have to, I can determine a geometric area where if the free camera is in that area and the mesh is active it is visible, but I'd prefer to do it an easier / better way if possible.
  21. Hello ! I need some help, after looking through many threads relating to rotation/orientation/translation, I still couldn't manage to find a solution... I made a playground : There is a Ground with a height map, when you click on the ground, a flat Plane appears where you click. With pickingInfo, I could modify the position of the plane, but I'd like also the plane to change its orientation to match the orientation of the ground. Any help with this script would be greatly appreciated 😀
  22. This is the base code, as simple as it could possibly be: <!DOCTYPE html> <html> <head> <meta charset = "UTF-8"> <title>Babylon.js Bare Minimum Setup</title> <style type="text/css"> <!-- You NEED these styles --> html, body { margin:0; padding:0; width:100%; height:100%; overflow:hidden; background-color: #000000; } #my_canvas { width:100%; height:100%; touch-action:none; } </style> <script src="pep.js"></script> <script src="babylon.js"></script> <script> var canvas_id; var engine; var scene; var camera; var light; var sphere; var ground; function init() { if (BABYLON.Engine.isSupported()) { console.log("Babylon.js is supported !"); setup_Babylon_Scene(); } else { console.log("Babylon.js is not supported :-("); } } function setup_Babylon_Scene() { canvas_id = document.getElementById("my_canvas"); engine = new BABYLON.Engine(canvas_id, true); scene = new BABYLON.Scene(engine); scene.clearColor = new BABYLON.Color3(0,0,0); //Background Color. camera = new BABYLON.FreeCamera("Camera1", new BABYLON.Vector3( 0, 6, -15),scene); camera.setTarget(BABYLON.Vector3.Zero()); camera.attachControl(canvas_id,true); light = new BABYLON.HemisphericLight("HemiLight1",new BABYLON.Vector3(0,1,0), scene); light.groundColor = new BABYLON.Color3(1,0,0); light.intensity = 0.8; sphere = BABYLON.Mesh.CreateSphere("Sphere1",16,2,scene); sphere.showBoundingBox = true; sphere.position.y = 1; var material = new BABYLON.StandardMaterial("standardMaterial1", scene); material.diffuseColor = new BABYLON.Color3(0.3,0.2,1); sphere.material = material; ground = BABYLON.Mesh.CreateGround("Ground1",6,6,2,scene); engine.runRenderLoop(function(){scene.render();}); window.addEventListener("resize", function(){engine.resize();}); } </script> </head> <body onLoad="init()"> <canvas id="my_canvas"></canvas> </body> </html> If you just copy and paste this in, you will see that this canvas defaults to a 16:9 ratio leaving the bottom of the browser white and blank EVENTHOUGH I already set the background-color of my body to black through CSS which is very strange. How do I change the ratio of babylon's default screensize to say may 4:3 aspect ratio ? And how do I actually make the rest of my page black ? Thanks.
  23. Hello there, I imported 3x "omni" lights from 3ds max and 2x mesh models (inside one babylon file). place of loading mentioned scene, see on the picture. The problem is that imported lights do not affect objects in the scene. How to do it? How is it possible?
  24. I can't get console error into playground, but the bug is still here: if I want to use KTX compressed textures, BJS don't fallback to source texture if the ktx file isn't found. So inevitably the use of a scene HDR envTexture cancel the scene loading. line 16, set the value to true: (texture files comes from here) In a more gobal way, if a texture miss its KTX version, it could be very convenient to use source texture instead (when you have hundreds of texture, you can't convert files each time you update them). Here an example with a jpg texture which doesn't have its corresponding ktx file: If I well remember (not sure), a few (long?) time ago, BJS was doing this source-texture fallback, am I wrong?
  25. Hello to everyone I have a question again. And I think it's a simple question for you. When you review the following example: 1- How can you add and remove the screen instantly when you select wall or object from html? 2- How does it instantly reflect the screen when it changes dimensions? So how do the lengths on the ground change momentarily? The key point of my 2 questions is the instant calculation of the page without renewing them. Is there a way to control it 60 times a second? And if there is such a control, does it make the project very tired? Or is there another way? Thanks in advance for your answers.