Quantcast
Channel: Bugs Latest Topics
Viewing all 760 articles
Browse latest View live

parallax mapping, directional light bug

$
0
0

Lighting of parallax mapped object seems to be inverted when using directional light.

playground:  http://babylonjs-playground.azurewebsites.net/#1SGTPA#5
 

The scene contains paralax mapped rectagle and few spheres,  the only light on the scene is directional light with the direction equal to (0,-1,0)
The mirror is not so important here.

When looking from the side of spheres,  light on the plane goes from down,    on spheres it goes from the top
but when we rotate the camera and look on the back face of plane,  suddenly light there goes from the top

same example, but light direction changed to (1,-1,0):
http://babylonjs-playground.azurewebsites.net/#1SGTPA#6
 

 

paralax_dirlight2.jpg

paralax_dirlight1.jpg


[SOLVED] Vector3.Unproject problem with version 2.6

Playground 2.6 do not work anymore in Firefox

$
0
0

Hi

It looks like playground stopped working in newest babylon 2.6.

Firefox 51.0.1 x64  Xubuntu 16.04,  Nvidia NVS 3100m,   proprietary official nvidia driver v340.101
But works fine in chromium 55.0.2883.87

In every scene i opened, even very simple it shows in console something like this:
(for example this one: http://babylonjs-playground.azurewebsites.net/?2# )

BJS - [08:04:01]: Unable to compile effect:   babylon.js:3:21936
BJS - [08:04:01]: Defines: #define SPECULARTERM
#define NORMAL
#define NUM_BONE_INFLUENCERS 0
#define BonesPerMesh 0
#define LIGHT0
#define HEMILIGHT0
  babylon.js:3:21936
BJS - [08:04:01]: Error: 0(4) : error C0203: extension GL_ARB_gpu_shader5 not supported in profile gp4_1vp
  babylon.js:3:21936
BJS - [08:04:01]: Vertex shader:default  babylon.js:3:21936
BJS - [08:04:01]: Fragment shader:default  babylon.js:3:21936
BJS - [08:04:01]: Trying next fallback.  babylon.js:3:21936
BJS - [08:04:01]: Unable to compile effect:   babylon.js:3:21936
BJS - [08:04:01]: Defines: 
#define NORMAL
#define NUM_BONE_INFLUENCERS 0
#define BonesPerMesh 0
#define LIGHT0
#define HEMILIGHT0
  babylon.js:3:21936
BJS - [08:04:01]: Error: 0(4) : error C0203: extension GL_ARB_gpu_shader5 not supported in profile gp4_1vp
  babylon.js:3:21936
BJS - [08:04:01]: Vertex shader:default  babylon.js:3:21936
BJS - [08:04:01]: Fragment shader:default  babylon.js:3:21936
BJS - [08:04:01]: Unable to compile effect:   babylon.js:3:21936
BJS - [08:04:01]: Defines:   babylon.js:3:21936
BJS - [08:04:01]: Error: 0(4) : error C0203: extension GL_ARB_gpu_shader5 not supported in profile gp4_1vp
  babylon.js:3:21936
BJS - [08:04:01]: Vertex shader:color  babylon.js:3:21936
BJS - [08:04:01]: Fragment shader:color  babylon.js:3:21936

 

RenderTargetTexture: aspectRatio, camera, specular position issues

$
0
0

Hi
I created the topic first in questions sections, but it seems to look like a bug now.

so here is the original topic:
 

 

PrimitiveAlignment mechanics is broken when using canvas design size

$
0
0

Here is PG. http://babylonjs-playground.com/#QTNKM#1

When using designSize on canvas alignment properties are unusable.

There are two different use cases:

1. I manually position primitive on some point. I expect it's position to be uniformly scaled from design size to real rendering size. That one is working.

2. I do not position primitive, but I set primitive alignment. Let it be marginHAlignment = BABYLON.PrimitiveAlignment.AlignRight. In that case I expect this primitive to be stuck on the right side of the rendered canvas. That case is not working.

So, building real UI  I have a problem. I can build UI panels using absolute positioning, and it will be OK, but how can I position those panels? Suppose I want one panel to be on left side of the canvas, and one on the right side - not so complex high level layout. Left one will be positioned fine, but with positioning right one I will have a problem. Big one.

@Nockawa, is there any work around for this?

 

Babylon.js + glTF Loader does not support glTF Materials Common?

$
0
0

I added a sample of glTF Materials Common to the sample list below.

However, it was all displayed in gray. Is Babylon.js + glTF Loader unsupported by glTF-MaterialsCommon?

https://cx20.github.io/gltf-test/

glTF-MaterialsCommon_samples.png

glTF-MaterialsCommon/Duck.gltf

glTF-MaterialsCommon_Duck.png

glTF-MaterialsCommon/Box.gltf

glTF-MaterialsCommon_Box.png

HandJs bug on android Google Chrome mobile

$
0
0

Hello community :)

I think that Hand Js not working on last version of google chrome mobile ...

I made some test and i finished by testing this website : http://www.catuhe.com/msdn/handjs/index.html ...

It draw a little line and stop without "touch end".

Thanks for your help,

Letsbro studio team.

@Deltakosh : I ping you because i see that you work on hand js ;)

SerializeMesh with CreateGroundFromHeightMap


Setting renderingGroupId on Spritemanager breaks highlightlayer (PG reproduction provided) Versions 2.5 & 2.6 affected

$
0
0

Hi,

Setting a renderingGroupId on a spritemanager breaks the highlightlayer feature for the whole scene.
I have this bug in 2.5, but it is reproducible in the current playground:

spritemanager without renderingGroupId, everything is fine (see picture 1):

http://www.babylonjs-playground.com/#E3D3Y#6

Result as expected:

desired.png

setting a renderingGroupId on the sprite manager, all highlights break and are now filling out the highlighted objects:

http://www.babylonjs-playground.com/#E3D3Y#5

The only change is line 114 is now commented in, the result is the unexpected and undesired filling of all highlighted objects:

bug.png

Note: This is not about the interaction of sprites with the highlight layer (the whole sprite in front of a highlighted object gets colored) this is only about highlights breaking that are no where near the sprites when the spritemanager has a renderingGroupId.

Any workaround would be great. For my game I need some effect sprites to render above all 3d objects and I also use the highlight layer - this is not possible right now.

BoneIKController and bone orientation

$
0
0

In Babylonejs, BoneIKController assumes that all bones are oriented along the x-axis, like the Dude example http://www.babylonjs-playground.com/#1EVNNB#15

I find that "The bones should be oriented along the y-axis". Here is the demo of using BoneIKController with y-axis http://www.babylonjs-playground.com/#1EVNNB#46. To make it work correctly, you need to change

BABYLON.Matrix.RotationYawPitchRollToRef(0, 0, Math.PI * .5, mat2);

to

BABYLON.Matrix.RotationYawPitchRollToRef(0, 0, 0, mat2);

in babylon.boneIKController.ts file. 

Of course, we can't expect that not all bones follow the same convention. So I wonder

  1. Will it be solved by adding {adjustYaw, adjustPitch, adjustRoll} option like BoneLookController?
  2. Is it possible to detect the bone orientation automatically?

Or we just add bone orientation parameter to BoneIKController. 

Ray.TransformToRef doesn't normalize direction

$
0
0

Hi, I was debugging some code and stumbled upon Ray.TransformToRef and I noticed probably a bug?

The result ray's direction is never normalized unless I'm mistaken.

public static TransformToRef(ray: Ray, matrix: Matrix, result:Ray): void {
            
            Vector3.TransformCoordinatesToRef(ray.origin, matrix, result.origin);
            Vector3.TransformNormalToRef(ray.direction, matrix, result.direction);
            // This should be result.direction.normalize(); ? 
            ray.direction.normalize();
            
}

 

 

Wrong character width with BitmapFontTexture

$
0
0

Character width calculation is wrong for not mono-spaced fonts. Error is here (BMFontLoaderTxt._buildCharInfo):

if (xadv) {
   width = xadv;
}

Character width is not always equal to xadv. Try to export Arial from BMFont and look to number characters  (48-57)

When rendering, wrong part of texture is taken for character.

@Nockawa

Directional light shadows not working

Demo FPS 20fps while potential FPS 60fps

$
0
0

Running the instance Demo both from the babylonjs.com website and locally:

I see potential FPS in debug overlay showing ~60 FPS.

Actual FPS is ~15 FPS.

I tested this in both Chrome and Firefox on both Linux and OSX.

I tried removing various parts of the code. Reducing instance count to 10, removing collision tests from all objects. The FPS rises somewhat but the problem persists.

I tried checking out the v2.5.0 tag in case something in latest was causing the problem. The problem persists.

I think this may be due to BabylonJS depending soley on requestAnimationFrame for update/draw logic (which creates several problems actually, but I created a separate post to address that). I assume there must be something wrong in the update logic, but I am new to BabylonJS.

 

Is anyone else seeing a low FPS number on the babylon website?

 

 

See attached screenshot where render and frame are only 5ms and 8ms (potential FPS is 128) yet FPS is only 40!

babylon-fps-bug.png

Shadows and spot lights with ShaderBuilder

$
0
0

@NasimiAsl,

Shadows and spot lights do not work on the ground. I gave you an example on the playground.

http://www.babylonjs-playground.com/#E6OZX#87

terrain.material.specularColor = new BABYLON.Color3(0.5, 0.5, 0.5);
terrain.material.specularPower = 64;

do not work also

And In fact the lighting has no effect on the ground, so the textures are pale.

Thanks


Imported mesh texture

$
0
0

I have this problem on my samsung s7 browser, the textures are not showing, meanwhile when i tried it on my pad and pc, it works fine, the browser is updatedScreenshot_2017-02-20-09-44-09.png.b1fe5032b2e5fce443835633a9ccd887.thumb.png.5fce06866602869bb48975a93174b004.png

[2.6 preview release] Picking broken for some meshes

$
0
0

Unfortunately I have little to reproduce:

I have a custom build hexagonal grid with out-of-the-box cylinders on it. The camera is a TargetCamera. In 2.5 clicking on a cylinder picks it (using scene.pick) in the current preview release, it picks the hexagonal grid tile below. I stepped through the non-minified BabylonJS code a bit, and it seems it has nothing to do with isPickable, isVisible or isEnabled() - it is actually the intersection check that seems to have regressed: https://github.com/BabylonJS/Babylon.js/blob/master/src/babylon.scene.ts#L2872

Sorry for not providing a minimal test case. I have downgraded to 2.5 for now, but I thought you still might want to take a look, and maybe you already have a hunch of what might be causing it.

Picking with fastcheck is broken

$
0
0

I just found out that picking with fastcheck set to true doesn't work as expected. It won't give you the closest mesh but the one added to the scene first! The problem is inside _internalPick function. I added a comment where it literally breaks the search for the closest hit.

 private _internalPick(rayFunction: (world: Matrix) => Ray, predicate: (mesh: AbstractMesh) => boolean, fastCheck?: boolean): PickingInfo {
            var pickingInfo = null;

            for (var meshIndex = 0; meshIndex < this.meshes.length; meshIndex++) {
                var mesh = this.meshes[meshIndex];

                if (predicate) {
                    if (!predicate(mesh)) {
                        continue;
                    }
                } else if (!mesh.isEnabled() || !mesh.isVisible || !mesh.isPickable) {
                    continue;
                }

                var world = mesh.getWorldMatrix();
                var ray = rayFunction(world);

                var result = mesh.intersects(ray, fastCheck);
                if (!result || !result.hit)
                    continue;

                if (!fastCheck && pickingInfo != null && result.distance >= pickingInfo.distance)
                    continue;

                pickingInfo = result;

                // This breaks the search for the closest hit when anything is hit.
                if (fastCheck) {
                    break;
                }
            }

Or is this actually intended @Deltakosh?

[Fixed]Billboardmode bugs scaling.

Using animation move mesh cause the first Bone Controller stop working

$
0
0

Here is the demo http://www.babylonjs-playground.com/#1B1PUZ#22, press any key to move the mesh with animation and BoneLookController will stop working. 

It only happens to the first Bone Controller. BoneIKController also has this problem, if it's the first created. 

Viewing all 760 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>