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.
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.
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'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! Image may be NSFW. Clik here to view.
I appreciate any help. Also, feel free to curse me in case I'm doing something stupid.
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).
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.
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:
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!
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'.
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.
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.
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 theTexImageSource(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.
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.
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
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!