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

Mesh updatable is not serialized

$
0
0

Hello,

When I serialize a mesh (ground for example), the value 'updatable' is not serialized. It does not exist in the string JSON. And I can not find a property to set updatable to true.

BABYLON.Mesh.CreateGround("ground", 100, 100, 10, scene, true, 0);

In green I find the properties in red impossible to find it and I need to have ground.updatable = true to change the terrain when it is recharging from the serialization.


Latest 2.6 - Preprocess Issue With HDR

$
0
0

The latest webgl 20 and vertex array object might need a bit of tweaking or the generateBabylonHDR functions do.

the update cause more webgl error when using a pre processed HDR file produced using the generateBabylonHDROnDisk:

 

[.Offscreen-For-WebGL-0x7f9edb812e00]GL ERROR :GL_INVALID_OPERATION : glTexImage2D: invalid internalformat/format/type combination 0x8814/0x1907/0x1406
196/#UTEVJ#0:1 [.Offscreen-For-WebGL-0x7f9edb812e00]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.

 

I made a Test Pre Process HDR Skybox playground to show the problem... @Sebavan and or @Deltakosh ... I am pinging you guys here :)

 

 

 

http://www.babylonjs-playground.com/#UTEVJ#0

Decals materials are funky!

$
0
0

Hello everyone,

I'm trying to use decals with a PBRMaterial but can't get past a (apparently normal-related) glitch.

Playground example: http://www.babylonjs-playground.com/#1YDIEU
Click on the cylinder to add a few decals on different sides of the object. Each side behaves differently, as if the normals were the same for all of them.

I tried changing the PickingInfo.getNormal(bool, bool) call unsuccessfully, and even tried to force normals to be recalculated by using Mesh.updateMeshPositions(fn, true), but that didn't help. Granted, it might not even have anything to do with normals.. That's just a guess, supported by the fact that when using a NormalMaterial, decals are plain black.

Now, this may well be my fault and not really a bug, but in that case I'd argue the examples and documentation have a bug! :D

I appreciate any help. Also, feel free to curse me in case I'm doing something stupid.

When rendering canvas is quite big, 3D drawing area is cropped at half the size of the canvas

$
0
0

Hi everyone !

I've just noticed that when the rendering canvas size is quite big, above a certain size the 3D drawing area is suddenly cropped (to half the size of the rendering canvas, it seems).

If you lower the width of the canvas, the height limit increases, and vice versa. And a strange fact: critical values are different depending on the context.

Here are some cases (on my computer, values may differ on yours)

- On a simple web page:

3500px x 1024px : ok
3500px x 1025px (and above) : cropped
3637px x 1024px : ok
3638px (and above) x 1024px : cropped

I tried to reproduce that on the PG, and the values are not the same:

3500px x 2368px : ok
3500px x 2369px (and above) : cropped
3536px x 2368px : ok
3537px (and above) x 2368px : cropped

The width around 3500 is an arbitrary value, you can put quite more if height is low enough (and vice versa).

I don't know if the values will be different on your devices, but you can test that with this PG : http://www.babylonjs-playground.com/#17HUVT#1

Is it expected behavior or a bug ?

Latest (alpha) babylon.d.ts error

$
0
0

I'm getting the following error when trying to compile:

babylon.d.ts(5113,25): error TS1039: Initializers are not allowed in ambient contexts.

VR rig cameras not separated, no 3D effect

$
0
0

Hi! Pardon me as my first post happens to be a bug report. I just learnt Babylon.js last week, am going through the tutorials, and it's a really great framework!

So coming on to the bug report: I am using a VRDeviceOrientationFreeCamera but it seems the left and right rig cameras are in exactly the same position, with no offset distance between them. As a result, although there are two viewports, the images are exactly the same. Using a Google Cardboard, the image appears flat and not 3D. See attached screenshot below.

Please also refer to Babylon.js playground http://www.babylonjs-playground.com/#ZTRL5#30

In the Playground and the screenshot, you can see that the line of vertical sticks along the Z axis are aligned in both viewports. If there is an offset between the 2 cameras, the sticks should not be aligned.

 

Screenshot - both left and right VR cameras produce the same image:

VR_camera_viewports_look_the_same.png

 

Bug in code

The error seems to happen where the rig cameras are updated in the ancestor class TargetCamera::_updateRigCameras() in https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/babylon.targetCamera.ts#L265 . Both left and right cameras have the same position and rotation, thus producing the same image:

284 case Camera.RIG_MODE_VR: 
285 case Camera.RIG_MODE_WEBVR:
286   if (camLeft.rotationQuaternion) {
287     camLeft.rotationQuaternion.copyFrom(this.rotationQuaternion);
288     camRight.rotationQuaternion.copyFrom(this.rotationQuaternion);
289   } else {
290     camLeft.rotation.copyFrom(this.rotation);
291     camRight.rotation.copyFrom(this.rotation);
292   }
293   camLeft.position.copyFrom(this.position);
294   camRight.position.copyFrom(this.position);
295
296   break;

I can attempt a pull request to fix this, but I'm not sure if I should just position the 2 cameras apart just like for a stereoscopic camera. Appreciate some comments please, thanks!

detachControl of undefined with CameraVR

SHADER MATERIAL BUG -Uncaught TypeError: Cannot read property 'maxSimultaneousLights' of undefined


Bug with Size and ANIMATIONTYPE_SIZE

$
0
0

Using last version from git.

in Animation.animate(..):

case Animation.ANIMATIONTYPE_SIZE:
    this._offsetsCache[keyOffset] = toValue.subtract(fromValue);

but there is typo in Size:

public substract(otherSize: Size): Size {

so Animation.animate can't find method, and produces error "_.subtract is not a function"

 

PointerEnter and PointerLeave are not coming

$
0
0
PrimitivePointerInfo.PointerEnter and PrimitivePointerInfo.PointerLeave are not send to Sprite2D when Sprite2D is added to ScreenSpaceCanvas2D as child. 
Only ScreenSpaceCanvas2D receive these events. ScreenSpaceCanvas2D has 'enableInteractions : true' and my Sprite2D has 'isPickable : true'.
                background.pointerEventObservable.add( ( d, s )=>{
                    console.log("background enter")
                    background.opacity = 0.5;
                }, BABYLON.PrimitivePointerInfo.PointerEnter );

                background.pointerEventObservable.add( ( d, s )=>{
                    console.log("background exit")
                    background.opacity = 1.0;
                }, BABYLON.PrimitivePointerInfo.PointerLeave );

                background.pointerEventObservable.add(function (d, s) {
                    console.log("background CLICK")
                }, BABYLON.PrimitivePointerInfo.PointerUp);

Only PointerUp event is handled.

When i was figuring it out i found following comment in babylon.canvas2d.js:

Quote

// NOTE TO MYSELF, this is commented right now because it doesn't seemed needed but I can't figure out why I put this code in the first place


//// Trigger a PointerEnter corresponding to the PointerOver
//if (mask === PrimitivePointerInfo.PointerOver) {
//    this._debugExecObserver(cur, PrimitivePointerInfo.PointerEnter);
//    cur._pointerEventObservable.notifyObservers(ppi, PrimitivePointerInfo.PointerEnter);
//}
//// Trigger a PointerLeave corresponding to the PointerOut
//else if (mask === PrimitivePointerInfo.PointerOut) {
//    this._debugExecObserver(cur, PrimitivePointerInfo.PointerLeave);
//    cur._pointerEventObservable.notifyObservers(ppi, PrimitivePointerInfo.PointerLeave);
//}
// Loop to the parent

If i restore commended code, events are coming, but i am not sure it is properly way ;-)

I'm using babylon 2.6.0

wireframe or point on mesh: the model disappears

Remove vertice/face (Holes system) does not work anymore

$
0
0

On previous versions of babylon, this PG was working and it also worked on my project, but now the mesh disappears completely after a click on it (As if the mesh was calling with dispose (), which is not the case). Before this suppressed only one or more polygons.

http://www.babylonjs-playground.com/#8OMYN#13

ProceduralTextures don't work anymore

Multiline text bug in new release of Canvas2D

$
0
0

Th following code was working in previous release (preview), rendering text on two lines:

new Text2D("AAA\nBBB", settings)

In current release (announced at 29 Jan) it doesn't work. It produces following exception:

Uncaught TypeError: Cannot read property 'offset' of undefined
    at Text2DInstanceData.descriptor.set [as transformX] (http://localhost:63342/FirstSample/lib/babylon.canvas2d.js:8687:66)
    at Text2D.RenderablePrim2D.updateInstanceDataPart (http://localhost:63342/FirstSample/lib/babylon.canvas2d.js:9337:29)

Without new line symbol:

new Text2D("AAABBB", settings)

it still works

WebGL and XML errors

$
0
0

I'm using the latest bjs alpha, a few old errors disappeared (fixed I guess), and new ones appeared. These are internal bjs errors that are not related to my code as far as I can tell.

1)

Quote

Error: WebGL: texImage2D: Conversion requires pixel reformatting.

I don't know what this is related to.

2)

Quote

XML Parsing Error: not well-formed
Location: myFile.babylon
Line Number 1, Column 1:

This error is logged for each .babylon file I'm loading.

Why am I getting an XML parsing error on a .babylon file written in JSON format?


GLTF Loader Inverted Textures

$
0
0

Hi,

I'm having some issues getting the GLTF File Loader working with the models I've been provided due to the option invertY is true by default in the construction of Textures (line 1335).

Looking at the GLTF spec, I'm not sure why this decision has been made as the suggestion is to not invert textures for WebGL runtimes:

Implementation Note: With WebGL API, the first pixel transferred from the TexImageSource (i.e., HTML Image object) to the WebGL implementation corresponds to the upper left corner of the source. Non-WebGL runtimes may need to flip Y axis to achieve correct texture rendering.

Based on this, should the default be changed to use invertY: false? Or at least allow the user to specify this themselves?

Edit - Also noted that this would remove the need for the expensive normalizeUVs method.

getHeightAtCoordinates not work with ImportMesh

$
0
0

Hello,

I have a ground serialize with SerializeMesh() that I save in a babylon file. When I reload this file with ImportMesh:  getHeightAtCoordinates, updateCoordinateHeights, optimize ... does not work.  In fact everything concerning the ground create with CreateGroundFromHeightMap() or CreateGround() is serialized as mesh but can no longer be used as a terrain. We can only edit the properties on the mesh and not the geometry that no longer exists after serialization.

May be missing a serialization for the ground, like serialiserGround() in addition to serializeMesh(). Or convert a mesh to ground after using ImportMesh for used getHeightAtCoordinates

Thanks DK

 

ArcRotateCamera, Unable to undo "setTarget(mesh)" without moving mesh first

$
0
0

Hi guys, i notised that if you use arcRotateCamera and setTarget(mesh) you're unable to unlock the target, e.g setTarget(mesh.position.clone()); without updating the mesh's position first,

i'm using 2.5, but it is also available in the PG;


// Press any key to setTarget(sphere), press again to setTarget(sphere.position.clone()), try to pan using the left mouse button, you're still stuck, uncomment line 33 ( sphere.position.x += 0.00000001;), do it again and now you can pan..
Example; http://www.babylonjs-playground.com/#WHMIR#0 

 

Docs and some tutorials do not display anymore

$
0
0

Hi,

Some documentation classes (such as ArcRotateCamera ) return 404, were they moved somewhere else ?

And also some tutorials are not displaying anymore.

 

I'm I the only one who's getting the 404 error ? Can someone verify ?

Canvas2D npm package missing

$
0
0

If I look at https://www.npmjs.com/~babylonjs and inside the provided babylonjs-2.5.0 npm package, I observe that I have no way to access the Canvas2D project’s API.

I think the babylonjs npm user should publish a Canvas2D package so that we can use it in webpack projects and I think this should be published by the official babylonjs npm user. Thanks!

Viewing all 760 articles
Browse latest View live


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