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

Cannot read property 'isDisposed' of undefined

$
0
0

I'm having an annoying issue that says "Cannot read property 'isDisposed' of undefined" in the canvas file in function `RenderablePrim2D.prototype._updateInstanceDataParts` where it tries to check if `gii` is disposed. But `gii` is undefined, thus breaking the entire script. I'm not fully sure how to troubleshoot this one, but if undefined is an intended behavior maybe just changing `if (gii.isDisposed)` to `if ( ! gii || gii.isDisposed)` would do it?

Ping @Nockawa


RayHelper.show

ShaderMaterial is broken in 3.0

$
0
0

After wrestling countless hours with a problem (as you do) I came to the conclusion that ShaderMaterial is broken in 3.0. More accurately, I can't get texture lookups to work in vertex shader. But they do work in Babylon 2.5

Add this line in any vertex shader and it wont compile:

vec4 test = texture2D(textureSampler, uv);

 

mesh.clone() clones mesh.uniqueId

$
0
0

Hi I was using uniqueId to uniquely represent a mesh and I noticed if I use a cloned mesh ( mesh.clone() ) their uniqueId would be the same.

After debugging the code the cloned mesh has a uniqueId after this line:
 

super(name, scene);

But after the line:

Tools.DeepCopy(source, this, ["name", "material", "skeleton", "instances", "parent"], ["_poseMatrix"]);

They now have the same uniqueId

Which can be seen here:
http://babylonjs-playground.azurewebsites.net/#27FBML#0

babylon.2.5.canvas2d.js problem

$
0
0

Hello everyone and thank you all for babylonjs

according to this console : 

there is a bug

both library are the same version 2.5

Can it explain blank canvas from visual studio?

The NuggetManager only provide 2.3... babylonjs but canvas2D at all

Kind regards,

But I may be wrong of course

 

screenshot.jpg

screenshot2.jpg

PBR Shadow shader error

$
0
0

Hi!
PBR Shadows stopped working just now (with the latest updates I think)
It shows a shader error  ERROR: 0:1137: 'z' : vector field selection out of range
When shadows are enabled on a PBR material.

Test case:
http://www.babylonjs-playground.com/index.html#1MJ2U8#7

This works with 2.5 and worked in the morning.

I hope someone knows what happened :)

race condition with textures and shaders

$
0
0

When I try using shaders with textures I end up with 

WARNING: there is no texture bound to the unit 0

Sometimes I get so many it just stops 'cos there are too many webGL errors.

http://www.babylonjs-playground.com/#TRNYD#16

I think the texture is not fully loaded when its being accessed.

Chrome bug?

$
0
0

Chrome is returning the following error message Cannot read property 'getExtension' of null which results in Babylon.js not being loaded.

Chrome has recently updated itself (Grrrr) on my machine and I am getting the error message as a result. This error was not fired before the update. I have tried the code in Firefox, IE and a new browser 'Slimjet' (which is based on and built from Chromium)  and do not get the error.

Is it a Chrome thing or something you tech guys need to know about. The Chrome version is 55.0.2883.87 m (64-bit) on Windows10.

Thanks

Richard C


Doubt about the buffer in Texture Constructor

$
0
0

I am expanding my read ahead to include textures in addition to .js files with in-line geometry.  It is going to split the fetch of the file from the creation of the texture.  When a TOB generated .js file is dynamically loaded, it will call a function matReadAhead() in the file.  It will create a QI.TextureBuffer's for each texture.  When the scene asks for the materials, the applyWhenReady() will be called.  Hopefully, the fetch of the image file has already been performed when the .js was being fetched in advance as well.

Once the fetch is complete, I will be executing a BABYLON.Texture constructor() passing the buffer QI.TextureBuffer got. Texture passes the buffer to Engine.createTexture(), but it looks like it is only actually used when fromData is an Array.  Isn't this test wrong?

Race condition with webcam texture

$
0
0

When I'm using webcam as a texture I get a lot of these warnings:

RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.

which happen until the webcam texture finally appears on the object.  I think its trying to display the texture before the webcam feed has appeared.

Here's my webcam playground: https://www.babylonjs-playground.com/#1R77YT#10

 

Babylon.js 2.5 - Issue with type definition file.

$
0
0

Looks like OimoJSPlugin class incorrectly implements IPhysicsEnginePlugin interface.

So with Babylon.js 2.5 when I try to enable physics with Oimo.js plugin like this:

scene.enablePhysics(new BABYLON.Vector3(0, -9, 0), new BABYLON.OimoJSPlugin());

I get the following TypeScript compilation error:

TS2345: Argument of type 'OimoJSPlugin' is not assignable to parameter of type 'IPhysicsEnginePlugin'.
  Types of property 'updateDistanceJoint' are incompatible.
    Type '(joint: IMotorEnabledJoint, maxDistance: number, minDistance?: number) => void' is not assignable to type '(joint: DistanceJoint, maxDistance: number, minDistance?: number) => any'.
      Types of parameters 'joint' and 'joint' are incompatible.
        Type 'DistanceJoint' is not assignable to type 'IMotorEnabledJoint'.
          Property 'setMotor' is missing in type 'DistanceJoint'.

I'm using babylon.d.ts type definition file from babylonjs npm package.

Group2D trackNode error

$
0
0

Then it goes bad. Duplicate labels end up everywhere,Here is an image when I rotate the camera !


                var ui = new BABYLON.ScreenSpaceCanvas2D(scene);
                var radioUi=[]
                for(var i=0;i<meshes.length;i++){
                     radioUi[i] = new BABYLON.Group2D({
                        parent: ui,
                        trackNode: meshes[i],
                        children:
                            [
                                new BABYLON.Rectangle2D({
                                    id: "mainRect", x: -5, y: -5, width: 10, height: 10,
                                    fill: "#abe2ffFF", border: "#0090ffFF", borderThickness: 3,
                                    roundRadius: 5,
                                })
                            ]
                    });
                }

 

bug canvas2d.gif

SIMD.js features demo crashes

$
0
0
Uncaught TypeError: Cannot read property 'getProgram' of undefined
    at n.enableEffect (babylon.js:5)
    at r.t._preBind (babylon.js:17)
    at r.render (babylon.js:14)
    at t.render (babylon.js:15)
    at t.renderUnsorted (babylon.js:11)
    at t.render (babylon.js:11)
    at t.render (babylon.js:11)
    at i.renderToTarget (babylon.js:16)
    at i.render (babylon.js:16)
    at r._renderForCamera (babylon.js:13)

This used to work.

Tried with Chrome and FF, basically same thing. Scene loads, you get a glimpse of the character and then the magic stops.

octree dynamicContent and mesh.dispose

$
0
0

Hi, I was debugging using temporary meshes and noticed that if you just dispose the mesh after adding it to the octree.dynamicContent it stays there even after dispose.

Here's a playground where I create 500 meshes and then add them to octree.dynamicContent and then dispose of all of them and the dynamicContent keeps all 500.

http://babylonjs-playground.azurewebsites.net/#1YPN4G#2

Skyboxes only show on face on one computer but not another

$
0
0

Hi all, strange situation. On one computer, all skyboxes look fine, on another every skybox only shows one face, even the samples on the babylonjs playground.58e455b255a83_Pastedimageat2017_04_0410_24PM.png.3db6f803e20da3c2685f9e4279d2d2cc.png58e45637671cf_ScreenShot2017-04-04at10_26_48PM.png.e3eab705aa42ef37797725c509fc6e2d.png

all projects using cubetexture only show one face but only on that computer, any ideas?


MarbleProceduralTexture marbleClolor not defined

$
0
0

Hi,

I miss a declaration and implementation of the property "marbleClolor" in 3..0-alpha, but the shader expects an uniform variable.

In old soures there this property  was defined, is it obsolete now? But nevertheless, there is an iconsistency between shader and js/ts

Thanks

Different behavior for sprite2D textures across browsers

$
0
0

Hi, 

 

I was wondering if someone had experienced slight differences in "offsets" using sprite2D texture and wether it might be related to caching.

As an example I have a fairly small texture of 16*16 here in svg, but i tried also using png, same problem.

58ebbb6b1e519_ScreenShot2017-04-10at19_05_10.thumb.png.606a3f245a36a6ed5a978f8188902de4.png

That's the begining of the sprite texture zoomed in 4800%

When using it in chrome with a code like this:

 

  const crossSheet = taskObject.cloneAssetIntoScene(R.get.crossSheet, scene) 
  crossSheet.hasAlpha = false

  const cross = new BABYLON.Sprite2D(crossSheet, {
    parent: canvas,
    id: 'cross',
    marginAlignment: 'v: center, h: center',
    spriteSize: new BABYLON.Size(16, 16),
    spriteLocation: new BABYLON.Vector2(0, 0),
  })
 
  cross.spriteFrame = R.get.cross_predict

The texture is at the center of the screen here, in chrome the top misses 0.5px

58ebbb69ef37b_ScreenShot2017-04-10at18_09_36.png.5b57028944524d93d903759eb336d66b.png

 

In Safari there is a difference in colors and width of strokes:

58ebbb69c7402_ScreenShot2017-04-10at18_09_28.png.d66cbdcb944f3889fe72778d9e93b07b.png

If now I am using a 16,17 sprite size i get a correct sprite in chrome:

58ebbb6a3b37f_ScreenShot2017-04-10at18_10_02.png.8b6c7187dd38ae095dabb4a34bda6398.png

58ebbc481e23f_ScreenShot2017-04-10at18_10_23.png.fa86925498fe0398bae31119c7a5b23b.png

But somehow it is seems worst in safari:

58ebbb6a8aefb_ScreenShot2017-04-10at18_11_08.png.fc803e0c9a7187c2de0107c4bc2a3f89.png

 

Any clue ? Do you think it is related to the caching strategy ? @Nockawa

 

Here is the link to the texture:

https://drive.google.com/open?id=0BxggOFF8_iXkb3JRRjg0YkJtRzQ 

Here is a playground, on the playground it is the BOTTOM 0.5px that get cutoff..

http://babylonjs-playground.com/#20MSFF#64

58ebc037a708c_ScreenShot2017-04-10at19_25_59.png.8de4dd67ac4ac9834442bfe26930d3ad.png

 

[solved] Unity exporter

$
0
0

Hi,

I had a issue with the "old" unity exporter,
and as it has been deprecated, i didn't want to much about it and simply thought i'd leave a topic if others encounter the same issue.

it seems to export bones as empty meshes ( it also exported them as bones, so they were exported twice).

the bones don't have any animations, they are only used for rigging.

i made a quick-fix locally, as i don't have any "empty" mehses in my files, i just commented out the empty object export and it now works as intended.

// Inside SceneBuilder.cs
        public void ConvertFromUnity()
        {
            // ....

            // Inside foreach loop

                // Camera
                var camera = gameObject.GetComponent<Camera>();
                if (camera != null)
                {
                    ConvertUnityCameraToBabylon(camera, progress);
                    ConvertUnitySkyboxToBabylon(camera, progress);
                    continue;
                }

                // Empty
-                ConvertUnityEmptyObjectToBabylon(gameObject);
+                //ConvertUnityEmptyObjectToBabylon(gameObject);
            } // End of foreach loop

Sorry I can't share an example as all my unity files are licensed.

i don't know if the issue exists on the new exporter / tool-kit.

cheers.

IE zOffset / polygonOffset issue

$
0
0

It seems that IE doesn't reset the polygon offset correctly. I created a playground to demonstrate the issue:
http://www.babylonjs-playground.com/#25N9HL
The red plane in the PG has a zOffset. For some reason the offset is also applied to the knot under IE (see attached images).

I was able to workaround this issue by modifying this code:
https://github.com/BabylonJS/Babylon.js/blob/master/src/States/babylon.depthCullingState.ts#L173
I added "gl.polygonOffset(0, 0);" before "gl.disable(gl.POLYGON_OFFSET_FILL);" like this:
 

// zOffset
if (this._isZOffsetDirty) {
	if (this.zOffset) {
		gl.enable(gl.POLYGON_OFFSET_FILL);
		gl.polygonOffset(this.zOffset, 0);
	}
	else {
		gl.polygonOffset(0, 0);
		gl.disable(gl.POLYGON_OFFSET_FILL);
	}
	this._isZOffsetDirty = false;
}

How should we fix that issue? Is there a better place to add this workaround?
I'm not sure if its a general IE bug. I tested it only on two systems.

IE.JPG

Chrome.JPG

SerializationHelper.Clone does not apply right name and id to objects

Viewing all 760 articles
Browse latest View live


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