Search the Community
Showing results for tags 'solved'.
-
Hello everyone, I am trying to find a way to properly occlude the glow effect. Consider: from the other side: The glow effects are not occluded by the walls and other opaque objects. Related code: const lamps = scene.getMeshByName("hotel_lower_lamp"); const glow = new BABYLON.GlowLayer("glow", scene); glow.addIncludedOnlyMesh(lamps); Just to be sure, I have also set opaque materials: material.transparencyMode = 0; Hope someone can point me to the right direction. Thanks alot!
-
Hello, I have and object that i cannot figure out how to remove the aliasing. I tried with FxaaPostProcess but the aliasing is still there. Example: https://www.babylonjs-playground.com/#2L35ZN#1 Any suggestions?
-
Yo @Deltakosh and @Sebavan I saw a few scenes on the Babylon Website that when you load them they have a actual PROGRESS PERCENT BAR and I even say one that said something like: "Loading 3 of 40 MB ..." How the heck could you possibly know how much total MB for all the the scene assets, and how you possibly know know how much of it has been downloaded ??
-
@Deltakosh Hello, sorry for the trouble, I red the Doku "Master the Physically Based Rendering" again and again, but I can't figure out the flags "FromMetallicRoughness to PBRMaterial": First of all I think there is something semantically wrong, maybe a typus?: Besides this, there are some other points unclear, I also analyzed the sourcecode, but without having success. Ok, starting easy with Roughness: can be either in Alpha or Green in the MT, so far so clear. But what happens on 1) ? Suggestion: only one flag: "useRoughnessFromGreenInsteadFromAlpha" ? Regarding the statement below, does this mean if UMFMTB==false the Red channel is used for Metallness? If this is the case then 7) is conflicting or there must be another statement: if UAOFMTR==true then metallness must be in BLUE ??? And at least, I cannot figure out the meaning of "UseAmbientInGrayscale" ==true (9). It seems to be a redundant flag? Perhaps it would be good to know about the priority how these flags are processed, maybe this gives a bit light in my darkness Anyway, I put my insights into a truth table, thanks in advance. PS: Maybe a much better way to give a clear overview is to define three selectors: a RoughnessSelector, MetallinessSelector and AOSelector. Each of these selectors can then be assigned with a number representing the channel of the Metallic/Ambient Texture.
-
I noticed this recent problem with the water making some area of the land transparent. It's about a week ago basically. IF I try the version from 3.2, it does not work anymore. If I remove the soil from the refraction with: water.addToRenderList (ground); it works, but the water is not pretty. https://www.babylonjs-playground.com/index.html#1SLLOJ#517 If I try with the previous Stable version, it tells me BABYLON.WaterMaterial is not a constructor. On my project, it makes half of my land transparent.
-
camera.lowerAlphaLimit;camera.upperAlphaLimit;camera.lowerBetaLimit;camera.upperBetaLimit;I know these guys handle the bounding angles for the camera's angles on the azimuth and elevation (took me a while finding this out!), but how about zoom ? 1) I want to disable or limit the zoom on the camera (the one you have when using wheel up/down) how do I do that ? 2) also, how do I invert the direction that the camera moves when I drag the mouse on screen ? I mean right now I hold the mouse key and drag right and the camera turns right... it should turn left, like every touch interface in the world do I need to go into babylon.js and change it manually, or is there something I don't know about ? Thanks for the help !
-
Hello pixijs forum and devs. I´m currently working on a multiplayer 2d Game. Problem: I'm using pivot for main game scene to follow the Player (in center) everything works okay when i have resolution at 1. -- Thanks for every reply, my english is not very well so ill try to explain throu the photos &code I'll attach some photos to show u my problem PIXIJS Inspector: - Pivot point does not scale properly with resolution. My code for resize and App I have my app declared here as static export class Game { //Create a Pixi Application public static app:any = new PIXI.Application({ antialias: false, // default: false transparent: false, // default: false autoDensity: true, autoResize: true, resolution: window.devicePixelRatio, }); // Resolution & Camera public static WIDTH:number = 728; public static HEIGHT:number = 540; I have own container which contain Game (everything expect UI) dynamic content Game.scene /** Game -> Dynamic container */ public static scene:any = new PIXI.Container(); public static init():void { // Initialize Display.Stage (Layers support) Game.app.stage = new PIXI.display.Stage(); Game.app.stage.addChild(Game.scene); Game.resize(); // call resize funct. .... Game.app.renderer.render(Game.app.stage); } // i took those function from Pixi Forum /* Helper function to resize the game to fit the full screen */ public static resize():void { const WIDTH:number = Game.WIDTH; const HEIGHT:number = Game.HEIGHT; const vpw:number = window.innerWidth; // Width of the viewport const vph:number = window.innerHeight; // Height of the viewport let nvw:number; // New game width let nvh:number; // New game height // The aspect ratio is the ratio of the screen's sizes in different dimensions. // The height-to-width aspect ratio of the game is HEIGHT / WIDTH. if (vph / vpw < HEIGHT / WIDTH) { // If height-to-width ratio of the viewport is less than the height-to-width ratio // of the game, then the height will be equal to the height of the viewport, and // the width will be scaled. nvh = vph; nvw = (nvh * WIDTH) / HEIGHT; } else { // In the else case, the opposite is happening. nvw = vpw; nvh = (nvw * HEIGHT) / WIDTH; } // Set the game screen size to the new values. // This command only makes the screen bigger --- it does not scale the contents of the Game. // There will be a lot of extra room --- or missing room --- if we don't scale the scene. Game.app.renderer.resize(vpw, vph); // This command scales the scene to fit the new size of the Game. let zoom = Camera.activeCamera ? Camera.activeCamera.zoom : 1; Game.scene.scale.set(zoom * (nvw / WIDTH), zoom * (nvh / HEIGHT)); Game.scene.filterArea = new PIXI.Rectangle(0,0, vpw, vph) } export class Camera { .... public static updateView() { if (Camera.activeCamera) Game.scene.pivot.set(Camera.activeCamera.position.x, Camera.activeCamera.position.y); } public setFocus(obj:any):void { this._cameraFocus = obj.position; } // On Update / GameLoop Camera.activeCamera.setPosition(Camera.activeCamera._cameraFocus.x, Camera.activeCamera._cameraFocus.y); ... } Camera.activeCamera._cameraFocus.x is bounded to (referenced) container position - For some reason pivoting player position (container) is not centering container to the middle if resolution is higher. in PlayerInit i have Game.camera.setFocus(this.container) -- My HTML Viewport is: <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui" />
- 12 replies
-
- solved
- resolution
-
(and 1 more)
Tagged with:
-
Can anyone please tell me if it is possible to load a *.glb file off a local drive with Babylon.viewer.js? Note: I have a valid glb file I named part2.glb... and it works fine to display locally in the Mixed Reality viewer in Windows 10... and also up in Remix 3D community models page. However, when I try to open it off a local drive with the simple 2 line HTML syntax (see below) I receive an error in the browser page display "Error loading the model". <head> <title>Babylon.js Viewer - Display a 3D model</title> <!-- <script src="https://preview.babylonjs.com/viewer/babylon.viewer.js"></script> --> <script src="C:\Babylon.js\Babylon.js-master\dist\viewer\babylon.viewer.js"></script> </head> <body> <!-- <babylon model="https://models.babylonjs.com/boombox.glb" templates.main.params.fill-screen="true"></babylon> --> <babylon model="C:\part2.glb" templates.main.params.fill-screen="true"></babylon> --> </body>
- 7 replies
-
- babylon.viewer.js
- glb
-
(and 2 more)
Tagged with:
-
I downloaded the latest blender exporter for Babylon (currently 5.6.2), but I noticed that when I try to export there are no options for the exporter. See here: I tried with blender versions 2.79 and 2.80, and while the exporter does work in 2.79 I can only export with the default options. I've always hated Python so I'm not clear exactly what's happening, but I did notice that if I combine the contents of the JsonMain and ExportSettingsPanel classes I do see the options panel as intended. Does anyone know what's going wrong here?
-
I am under the suspicion that there is something I am missing in the Sky material. I am able to use the sky material in the playground as depicted in this link: https://www.babylonjs-playground.com/#ZU3JQZ#5 I also followed this doc link to the T: https://doc.babylonjs.com/extensions/sky However when I download the code, and run it on a local server, it is nothing but a blank screen. Any thoughts?
-
solved [SOLVED]+ How to rotate object around it's local axis
dbawel posted a topic in Questions & Answers
Hello, How might I rotate the propeller in the following scene: http://qedsoft.com/DEMOS2017/bjs_loader/index8.html I'm obviously not defining the variable for the prop correctly. Below is the full code: Thanks, DB -
https://www.babylonjs-playground.com/#A3M2K3 That is a really really simple example that works ok with the providen url boxMaterial.reflectionTexture = new BABYLON.CubeTexture("http://babylonjsguide.github.io/img/", scene, ["cubeSide_nx.jpg", "cubeSide_nx.jpg", "cubeSide_nx.jpg", "cubeSide_nx.jpg", "cubeSide_nx.jpg", "cubeSide_nx.jpg"]); but fails using my own server boxMaterial.reflectionTexture = new BABYLON.CubeTexture("http://www.motivacg.com/temporal/victor/CubeBabylon/", scene, ["SalonA_nx.jpg", "SalonA_nx.jpg", "SalonA_nx.jpg", "SalonA_nx.jpg", "SalonA_nx.jpg", "SalonA_nx.jpg"]); Obviously you can get the SalonA_nx.jpg file without problem using that url. Any tip about this? thank you in advance and sorry for being such newbie!
-
Hello, Does anyone know why I get the error 'Earcut was not found, the polygon will not be built.' when using BABYLON.MeshBuilder.ExtrudePolygon? I created a PG with the exact same function, but on the PG it works fine: https://www.babylonjs-playground.com/#3DDQSZ ...click on the plane to create a shape. It does not work in my code though which is annoying.. here's the error: BJS - [06:47:49]: Earcut was not found, the polygon will not be built. Uncaught TypeError: i is not a function at t.build (babylon.js:44) at Function.t.CreatePolygon (babylon.js:32) at Function.t.ExtrudePolygon (babylon.js:32) at r.scene.onPointerDown (scene.js:60) at r._processPointerDown (babylon.js:12) at HTMLCanvasElement._onPointerDown (babylon.js:13) Thank you.
-
solved Updating Exporter
freetoplay posted a topic in Content creation (3dsMax, Maya, Blender, glTF)
This is a question coming from an artist that I am working with. He is using the 3D Studio Max version and he downloaded the zip version from Github, but it's not updating him to the 1.3.1 version, instead he seems stuck on version 1.2.4. Is there something else that he is suppose to be doing besides just downloading and running the code inside of the .zip file? -
I'm trying to load the following GLTF (https://github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.filesInput.ts#L161) in a sandbox-like manner but without using the drop monitor or an standard file input. I do have the file instance for each file, and when I manually set the lowercased-name of the file + the file instance on the FilesToLoad object, the GLTF will fail to load with the following error: n {cameras: Array(0), lights: Array(0), meshes: Array(2), skeletons: Array(0), particleSystems: Array(0), …} "Unable to load from blob:http://localhost:3000/2a140a19-0e8d-47a6-bad0-d4d8b2e0c1c7: #/bufferViews/6: Invalid typed array length: 288" Error: #/bufferViews/6: Invalid typed array length: 288 at preview.js:36 preview.js:36 Uncaught (in promise) Error: #/bufferViews/6: Invalid typed array length: 288 at preview.js:36 [...] bundle.js:162382 BJS - [09:58:31]: Error while trying to load image: [object Blob] I've been trying to load GLTFs and GLBs with texture dependencies (with no luck). The error while loading a blob is common as well. Any ideas on where to start to debug this? The scene is loading with the standard scene loader pointing to an object url with the file extension correctly forced. It works for any gltf/glb with bundled base64 materials. Update (relevant gltf parts): { "bufferView" : 6, "byteOffset" : 0, "componentType" : 5126, "count" : 36, "max" : [ 1.000000, 1.000000 ], "min" : [ -1.000000, -1.000000 ], "type" : "VEC2" } [...] { "buffer" : 0, "byteLength" : 288, "byteOffset" : 1572, "target" : 34962 }
-
Hi All, Do you have any idea how I can select edges/vertices on mouse over? http://www.babylonjs-playground.com/#35HAW1 I appreciate your time and effort to help me out. Arte
- 43 replies
-
- mouse over
- vertices
-
(and 1 more)
Tagged with:
-
Language: TypeScript Physics Engine: CannonJS Hey all, I would appreciate it if someone would help me solve these 2 mesh physics problems that I feel are related. I spent a lot of time trying to solve these related issues on my own and could not figure out what was going wrong. RELEVANT NOTE: BOTH problems occur right after switching from 1 scene to another scene. They only happen right after a scene loads. I have a video that demonstrates the error below. Problem 1: After loading each mesh (each with its own physics impostor), each mesh jumps a little (and then afterwards, they start falling because of gravity). I was wondering why/how to prevent it from happening. Note: I suspected that it is because they load too close to the ground and bounce because the computer erroneously thinks that the meshes/ground are touching. I am able to lessen the jump by making the ground’s position.y = -0.5 (so it is even clearer to the computer that the objects are not touching because all objects right now load at position.y = 0 (and I move objects before the next object loads so they don't intersect and start a collision)), but the jump still occurs, just less of a jump and still noticeable. Problem 2: After loading a certain scene, after being loaded, each instance of a special object I created (a class I created that includes a mesh) jumps in opposite directions from each other. I’m not sure why. I have a feeling it has to do with having multiple instances of the same class, each with their own mesh. After the scene loads, I am able to individually access each mesh and have them move individually, so their movement isn’t intertwined. Code/Video in Link: Relevant code and 1 video demonstrating error are in the Dropbox link. Note: The video shows both errors happening at the same time. Note: The code in this folder are not in the same directory/folder structure that I normally use for this program (so that is not the cause of my issues) [Link Removed] Thank you to all who read/and might help me with this issue!
-
I want to generate multiple textures from one base texture. The multiple textures would have different color of a specific attribute (skin, shirt, pants, hair..). I looked at one example (https://www.goodboydigital.com/pixijs/bunnymark/), but the bunnies it uses are extracted from the image and not dynamically generated with Pixi... So, how do I generate multiple textures with different color specific attributes with Pixi? Example code would be greatly appreciated.
-
Hi, I am trying to import an animated character from mixamo.com but without success. I am a developer, not a 3D Designer so I don't really understand what happening ^^ I go on mixamo.com, select a character and an animation (walking) I check "in place" animation", export with ".dae" extension, 24 frames/s, uniform key frames reduction, with skin, and finally download the the character (zip), I import the .dae in Blender, then export it with the BabylonJS exporter I go an error in log : can't export because of armature I read I just have to ctrl+A in Blender then scale => indeed, after that, the export is working, but it breaks the animation If I continue, load the .babylon in babylon I see the character loaded, with textures But... animation make absurd things, the character is not "moving in place" but totally go away It is not a direct Babylon problem : the problem is this "ctrl +A > scale" that breaks the animation. My question is simple : after imported the .dae in Blender, what I have to do to export it correctly, with animation, in .babylon format ? My goal is just to load ANY animated character in BabylonJS, ideally, a character moving, jumping, and crouching. That could be another question : how to get many animations from mixamo in a single export ? I understood we then just have to select frame index and play the good animation. So, loading few times the same character for different animation seems not very smart ^^ Thank you for your help
-
I was looking at the pg in the above post, and noticed that the near plane is positioned incorrectly. It seems that passing in a source plane to meshBuilder's createPlane function translates the plane in the wrong direction, and also rotates it so that it is facing the wrong way. For a plane with normal (0,0,1), and a point on the plane (0,0,10), meshBuilder will position the plane at (0,0,-10) and face it looking along the -ve Z axis. Example pg, with what I believe are fixes here.
-
solved Blender Babylon Question
DylanD posted a topic in Content creation (3dsMax, Maya, Blender, glTF)
Hello everyone , I'm looking for help with getting a .FBX into my Babylon scene and applying textures to it. The original model was made by someone else, I am just tasked with putting it into the Babylon scene. I can not show the actual file either as it is not my property which I am very sorry about, I understand it would help a lot to post it here, that way you could all help me better, but I am not able to. Again sorry . Hopefully my description will be enough . I dont know very much about blender, so I'm not sure exactly what I am doing wrong. I have a model in blender, specifically a .FBX, which uses many different materials and pieces. When I try to export it to a .babylon and then import it into my scene it becomes mis aligned. As in, instead if all of the pieces being one on top the other and positioned correctly, they seem to be rotated or repositioned. Not only that but I get many errors that tell me I am missing materials, but when I look at the files directory for those missing materials I cannot find them. I am using blender version: Version 2.79b (2.79b 2018-03-22, Blender The Babylon exporter I am using is version: 4.6.1 The code I use to to import the model is: BABYLON.SceneLoader.ImportMesh("","models/","Test3.babylon",this.scene,(meshes)=>{ importFunc(meshes); }); The errors I get are: BJS - [11:10:38]: Error while trying to load image: models/AlbedoTransparency.png But 8 of these errors, all with different materials Any ideas what I am doing wrong? Thanks for reading -
I am trying to stop an object to pass through another object but the ball(centre sphere) is still going through another ball(left sphere). I am trying to slide the sphere in the middle towards the left in speed as soon as it collides with the pink sphere. I have tried how to increase decrease speed of the blue sphere but it still passes though the centre sphere. My source code file is attached and can be found below. Please help me. Thank You 3d.zip
-
Hello everyone, I have a strange problem with waterMaterial in my scene, its hard to reproduce it in a playground so here are images : The problem is that the reflection part of the water becomes suddenly opaque. The ground becomes no more visible at some frontier (along x axis on this image). I made a video to make it more clear, focus on the transparency of the water : babylonjs.webm I don't know how to fix this ? Any idea ?
- 6 replies
-
- reflection
- watermaterial
-
(and 1 more)
Tagged with:
-
Hey everyone, I was wondering is there a way to fill a gui image? What i mean by fill is if i set fill horizontal and 50% half of the image would be gone. something like this playground however gui and not textures/shaders: https://playground.babylonjs.com/#411D8A#8 edit: it does not need to have the fade effect like this shaders.