An issue with our storage for the playground is still under investigation with the Azure Support. This results in an unstable usage of the PG.
Sorry for the inconvenience, I ll keep you posted once solved.
An issue with our storage for the playground is still under investigation with the Azure Support. This results in an unstable usage of the PG.
Sorry for the inconvenience, I ll keep you posted once solved.
Hello,
I have to control depth of meshes with alphaIndex in my situation.
but when meshes are over 10, rendering gets strange.
https://www.babylonjs-playground.com/#BTU1J7#1
need your help.
thanks.
Hi,
I think there is a problem with the version 3.2 shadow generator (usePercentageCloserFiltering). There is a huge black bar that is larger or smaller depending on the changes we make to shadowMinZ and shadowMaxZ and when we add no mesh with addShadowCaster ()
The second bug is if I add a mesh, the bar is no longer visible, except that it is always present, because if you move a character animate in the alignment of this invisible black bar, it becomes visible.
https://playground.babylonjs.com/#B48X7G#14
Thanks in advance
In this playground : https://www.babylonjs-playground.com/#SQ5UC1#4
I've put amiga as poster texture. But (by activating network throttling) all I see in the loading process is:
scene clearColor > 360 video
It should be
scene clearColor > amiga texture > 360 video
isn't it?
Am I doing it wrong?
Hello,
When I cast shadows to my character the shadows are perfect. But now if I add shadows to all my buildings, the shadows of the buildings are perfect, but the shadow of the character become horrible without my understanding why.
For precision: my scene contains a lot of objects instance and in total almost 300 objects. So I have in 3ds max group in "containers" the elements of the same type of ways to have a more organized hierarchy. I do not know if this can cause the problem, I do not think it's binding. I absolutely need to group models by type in 3ds max otherwise it's a mess.
Containers give this in my hierarchy :
I add them like this:
And I see that they are exporting with the Babylon exporter, but that should not be a problem I think, they are not dealing like meshes.
That's what it gives in pictures:
Here just the shadows of my character, it's perfect:
Now, if I also add the shadows of my buildings, the shadow of the character is bad. (The settings are the same as before.)
Shadows of buildings are always perfect, whether with the shadows of the characters or not. but if the buildings are add, the character always project a bad shadows.
Does not that come from making it an animating object, I do not know, I do not find what can cause that.
Thank you in advance.
Hi. I played a little bit with mergeMeshes with multiMaterial and SerializeMesh, and I discovered that it doesn't work properly.
I mean, it recognise multimaterial and on serialize it save it but not save the materials inside multimaterial.
with standardMaterial: https://playground.babylonjs.com/#INZ0Z0#9
with multiMaterial: https://playground.babylonjs.com/#INZ0Z0#10
Hi,
The onReady function herited by Node in the videoDome class is never triggered.
Here is the PG: https://www.babylonjs-playground.com/#SQ5UC1#7
Many thanks !!
Hello,
When using "usePercentageCloserFiltering" on Samsung S8+ (Android 8.0.0) I get "Unable to compile effect" after that any texture that can receive shadows doesn't work, reproduce with the doc's playground (https://playground.babylonjs.com/#B48X7G#1)
Any temporary workaround will be appreciated!
I the following stack trace:
babylon.js:4 BJS - [02:50:41]: Uniforms: world, view, viewProjection, vEyePosition, vLightsType, vAmbientColor, vDiffuseColor, vSpecularColor, vEmissiveColor, vFogInfos, vFogColor, pointSize, vDiffuseInfos, vAmbientInfos, vOpacityInfos, vReflectionInfos, vEmissiveInfos, vSpecularInfos, vBumpInfos, vLightmapInfos, vRefractionInfos, mBones, vClipPlane, diffuseMatrix, ambientMatrix, opacityMatrix, reflectionMatrix, emissiveMatrix, specularMatrix, bumpMatrix, normalMatrix, lightmapMatrix, refractionMatrix, diffuseLeftColor, diffuseRightColor, opacityParts, reflectionLeftColor, reflectionRightColor, emissiveLeftColor, emissiveRightColor, refractionLeftColor, refractionRightColor, vReflectionPosition, vReflectionSize, logarithmicDepthConstant, vTangentSpaceParams, alphaCutOff, vLightData0, vLightDiffuse0, vLightSpecular0, vLightDirection0, vLightGround0, lightMatrix0, shadowsInfo0, depthValues0, diffuseSampler, ambientSampler, opacitySampler, reflectionCubeSampler, reflection2DSampler, emissiveSampler, specularSampler, bumpSampler, lightmapSampler, refractionCubeSampler, refraction2DSampler, shadowSampler0, depthSampler0
t._ErrorEnabled @ babylon.js:4
babylon.js:4 BJS - [02:50:41]: Attributes: position, normal, uv
t._ErrorEnabled @ babylon.js:4
babylon.js:4 BJS - [02:50:41]: Error: 0:89: S0032: no default precision defined for parameter 'webgl_4aeb46af4241331f'
t._ErrorEnabled @ babylon.js:4
babylon.js:4 BJS - [02:50:41]: Trying next fallback.
t._ErrorEnabled @ babylon.js:4
babylon.js:4 BJS - [02:50:41]: Unable to compile effect:
t._ErrorEnabled @ babylon.js:4
babylon.js:4 BJS - [02:50:41]: Uniforms: world, view, viewProjection, vEyePosition, vLightsType, vAmbientColor, vDiffuseColor, vSpecularColor, vEmissiveColor, vFogInfos, vFogColor, pointSize, vDiffuseInfos, vAmbientInfos, vOpacityInfos, vReflectionInfos, vEmissiveInfos, vSpecularInfos, vBumpInfos, vLightmapInfos, vRefractionInfos, mBones, vClipPlane, diffuseMatrix, ambientMatrix, opacityMatrix, reflectionMatrix, emissiveMatrix, specularMatrix, bumpMatrix, normalMatrix, lightmapMatrix, refractionMatrix, diffuseLeftColor, diffuseRightColor, opacityParts, reflectionLeftColor, reflectionRightColor, emissiveLeftColor, emissiveRightColor, refractionLeftColor, refractionRightColor, vReflectionPosition, vReflectionSize, logarithmicDepthConstant, vTangentSpaceParams, alphaCutOff, vLightData0, vLightDiffuse0, vLightSpecular0, vLightDirection0, vLightGround0, lightMatrix0, shadowsInfo0, depthValues0, diffuseSampler, ambientSampler, opacitySampler, reflectionCubeSampler, reflection2DSampler, emissiveSampler, specularSampler, bumpSampler, lightmapSampler, refractionCubeSampler, refraction2DSampler, shadowSampler0, depthSampler0
t._ErrorEnabled @ babylon.js:4
babylon.js:4 BJS - [02:50:41]: Attributes: position, normal, uv
t._ErrorEnabled @ babylon.js:4
babylon.js:4 BJS - [02:50:41]: Error: 0:83: S0032: no default precision defined for parameter 'webgl_4aeb46af4241331f'
t._ErrorEnabled @ babylon.js:4
Thanks, Tomer.
Hi everyone! Could you help me with this issue?
I'm using this tree model but the render is not correct. Some faces are not being shown. We developed it in blender and all normals are ok.
We also tested the model in https://gltf-viewer.donmccurdy.com/ and works well there.
I'm attaching the GLTF ( that is also here https://gist.github.com/matiasbargas/821ba047185cd27d804fa8f51294e14b )
Thanks
I just updated my app the other day, and started getting reports of some users' Chrome browsers refusing to download and update .babylon files in their IndexedDB. Other browsers seem to have no problem at all, but Chrome, as I've learned, can be especially stubborn when it comes to caching.
Before you ask, yes, I updated the version number in the associated .manifest files to no avail. After investigating the XHR requests in Chrome, I noticed that the .manifest file checks use a date-based query string for cache-busting, which works great. However, the .babylon file requests themselves were not. I changed the following...
Database.prototype._saveFileIntoDBAsync = function (url, callback, progressCallback, useArrayBuffer) {
...
xhr.open("GET", url + '?' + Date.now(), true);
... and now all is well. Apparently, Chrome (and only Chrome) was loading a cached file to put in the IndexedDB; putting a cached file into another cache, essentially. Nuts.
hi,
found regression with alpha12 version (works well, on 10 and 11).
PBR metalines materials is almost black on galaxy 8+ with webgl 1.0
PG (dont know how to force webgl 1.0 in playground)
looks like light or env texture is not applied here.
could be some change in these components ?
Phone: Galaxy 8+
OS: Android 7.0
Browser: Chrome 67.0.3396.87
WebGl: 1.0
Please try this playground, when you click on the balls, they will pop, and in the mean while a particle system will emit particles. This is working fine with Edge, but in chrome the particle system cannot restart for the 3rd click and so forth.
And both the _started and _stop properties are set to "true", this is strange.
: https://www.babylonjs-playground.com/#7149G4#19
playground code:
var createScene = function () {
var scene = new BABYLON.Scene(engine);
scene.clearColor = BABYLON.Color3.Purple();
var camera = new BABYLON.FreeCamera("Camera", new BABYLON.Vector3(0, 0, -20), scene);
camera.attachControl(canvas, true);
camera.checkCollisions = true;
camera.applyGravity = true;
camera.setTarget(new BABYLON.Vector3(0, 0, 0));
var light = new BABYLON.DirectionalLight("dir02", new BABYLON.Vector3(0.2, -1, 0), scene);
light.position = new BABYLON.Vector3(0, 80, 0);
// Shadows
var shadowGenerator = new BABYLON.ShadowGenerator(2048, light);
// Physics
scene.enablePhysics(null, new BABYLON.CannonJSPlugin());
scene.enablePhysics(null, new BABYLON.OimoJSPlugin());
var fountain = BABYLON.Mesh.CreateBox("foutain", 0.01, scene);
fountain.visibility = 0.1;
var createNewSystem = function(newPosition) {
var particleSystem;
if (BABYLON.GPUParticleSystem.IsSupported) {
console.log("GPU supported!")
particleSystem = new BABYLON.GPUParticleSystem("particles", { capacity:1000000 }, scene);
particleSystem.activeParticleCount = 200000;
} else {
particleSystem = new BABYLON.ParticleSystem("particles", 50000 , scene);
}
particleSystem.emitRate = 10000;
particleSystem.particleEmitterType = new BABYLON.SphereParticleEmitter(1);
particleSystem.particleTexture = new BABYLON.Texture("/textures/flare.png", scene);
particleSystem.maxLifeTime = 10;
particleSystem.minSize = 0.01;
particleSystem.maxSize = 0.1;
particleSystem.emitter = fountain;
//fountain.position = newPosition;
particleSystem.disposeOnStop = false;
particleSystem.targetStopDuration = 1;
return particleSystem;;
}
particleSystem = createNewSystem();
var materialAmiga = new BABYLON.StandardMaterial("amiga", scene);
materialAmiga.diffuseTexture = new BABYLON.Texture("textures/amiga.jpg", scene);
materialAmiga.emissiveColor = new BABYLON.Color3(0.5, 0.5, 0.5);
materialAmiga.diffuseTexture.uScale = 5;
materialAmiga.diffuseTexture.vScale = 5;
var materialAmiga2 = new BABYLON.StandardMaterial("amiga", scene);
materialAmiga2.diffuseTexture = new BABYLON.Texture("textures/amiga.jpg", scene);
materialAmiga2.emissiveColor = new BABYLON.Color3(0.5, 0.5, 0.5);
// Spheres
var y = 0;
var particleSystems = {};
for (var index = 0; index < 100; index++) {
// Material
var sphere = BABYLON.Mesh.CreateSphere("Sphere" + index, 16, 3, scene);
sphere.material = materialAmiga;
sphere.position = new BABYLON.Vector3(Math.random() * 20 - 10, y, Math.random() * 10 - 5);
shadowGenerator.addShadowCaster(sphere);
sphere.physicsImpostor = new BABYLON.PhysicsImpostor(sphere, BABYLON.PhysicsImpostor.SphereImpostor, { mass: 1 }, scene);
var goToColorAction = new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnPickTrigger, light, "diffuse", BABYLON.Color3.Red(), 1000, null, true);
var popAction = new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger, () => { createNewSystem() });
sphere.actionManager = new BABYLON.ActionManager(scene);
sphere.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger, (evt) => {
evt.source.dispose();
fountain.position = evt.source.absolutePosition;
//console.log(particleSystem);
particleSystem.start();
}));
sphere.actionManager.registerAction(new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnPointerOutTrigger, sphere, "scaling", new BABYLON.Vector3(1, 1, 1), 150));
sphere.actionManager.registerAction(new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnPointerOverTrigger, sphere, "scaling", new BABYLON.Vector3(1.1, 1.1, 1.1), 150));
y += 2;
}
// Link
var spheres = [];
for (index = 0; index < 10; index++) {
sphere = BABYLON.Mesh.CreateSphere("Sphere0", 16, 1, scene);
spheres.push(sphere);
sphere.material = materialAmiga2;
sphere.position = new BABYLON.Vector3(Math.random() * 20 - 10, y, Math.random() * 10 - 5);
shadowGenerator.addShadowCaster(sphere);
sphere.physicsImpostor = new BABYLON.PhysicsImpostor(sphere, BABYLON.PhysicsImpostor.SphereImpostor, { mass: 1 }, scene);
}
for (index = 0; index < 9; index++) {
spheres[index].setPhysicsLinkWith(spheres[index + 1], new BABYLON.Vector3(0, 0.5, 0), new BABYLON.Vector3(0, -0.5, 0));
}
// Box
var box0 = BABYLON.Mesh.CreateBox("Box0", 3, scene);
box0.position = new BABYLON.Vector3(3, 30, 0);
var materialWood = new BABYLON.StandardMaterial("wood", scene);
materialWood.diffuseTexture = new BABYLON.Texture("textures/crate.png", scene);
materialWood.emissiveColor = new BABYLON.Color3(0.5, 0.5, 0.5);
box0.material = materialWood;
shadowGenerator.addShadowCaster(box0);
// Compound
var part0 = BABYLON.Mesh.CreateBox("part0", 3, scene);
part0.position = new BABYLON.Vector3(3, 30, 0);
part0.material = materialWood;
var part1 = BABYLON.Mesh.CreateBox("part1", 3, scene);
part1.parent = part0; // We need a hierarchy for compound objects
part1.position = new BABYLON.Vector3(0, 3, 0);
part1.material = materialWood;
shadowGenerator.addShadowCaster(part0);
shadowGenerator.addShadowCaster(part1);
shadowGenerator.useBlurExponentialShadowMap = true;
shadowGenerator.useKernelBlur = true;
shadowGenerator.blurKernel = 32;
// Playground
var ground = BABYLON.Mesh.CreateBox("Ground", 1, scene);
ground.scaling = new BABYLON.Vector3(100, 1, 100);
ground.position.y = -5.0;
ground.checkCollisions = true;
var border0 = BABYLON.Mesh.CreateBox("border0", 1, scene);
border0.scaling = new BABYLON.Vector3(1, 100, 100);
border0.position.y = -5.0;
border0.position.x = -50.0;
border0.checkCollisions = true;
var border1 = BABYLON.Mesh.CreateBox("border1", 1, scene);
border1.scaling = new BABYLON.Vector3(1, 100, 100);
border1.position.y = -5.0;
border1.position.x = 50.0;
border1.checkCollisions = true;
var border2 = BABYLON.Mesh.CreateBox("border2", 1, scene);
border2.scaling = new BABYLON.Vector3(100, 100, 1);
border2.position.y = -5.0;
border2.position.z = 50.0;
border2.checkCollisions = true;
var border3 = BABYLON.Mesh.CreateBox("border3", 1, scene);
border3.scaling = new BABYLON.Vector3(100, 100, 1);
border3.position.y = -5.0;
border3.position.z = -50.0;
border3.checkCollisions = true;
var groundMat = new BABYLON.StandardMaterial("groundMat", scene);
groundMat.diffuseColor = new BABYLON.Color3(0.5, 0.5, 0.5);
groundMat.emissiveColor = new BABYLON.Color3(0.2, 0.2, 0.2);
groundMat.backFaceCulling = false;
ground.material = groundMat;
border0.material = groundMat;
border1.material = groundMat;
border2.material = groundMat;
border3.material = groundMat;
ground.receiveShadows = true;
// Physics
box0.physicsImpostor = new BABYLON.PhysicsImpostor(box0, BABYLON.PhysicsImpostor.BoxImpostor, { mass: 2, friction: 0.4, restitution: 0.3 }, scene);
ground.physicsImpostor = new BABYLON.PhysicsImpostor(ground, BABYLON.PhysicsImpostor.BoxImpostor, { mass: 0, friction: 0.5, restitution: 0.7 }, scene);
border0.physicsImpostor = new BABYLON.PhysicsImpostor(border0, BABYLON.PhysicsImpostor.BoxImpostor, { mass: 0 }, scene);
border1.physicsImpostor = new BABYLON.PhysicsImpostor(border1, BABYLON.PhysicsImpostor.BoxImpostor, { mass: 0 }, scene);
border2.physicsImpostor = new BABYLON.PhysicsImpostor(border2, BABYLON.PhysicsImpostor.BoxImpostor, { mass: 0 }, scene);
border3.physicsImpostor = new BABYLON.PhysicsImpostor(border3, BABYLON.PhysicsImpostor.BoxImpostor, { mass: 0 }, scene);
part0.physicsImpostor = new BABYLON.PhysicsImpostor(part0, BABYLON.PhysicsImpostor.BoxImpostor, { mass: 2, friction: 0.4, restitution: 0.3 }, scene);
return scene;
}
It was still working a few days ago, but now it's no longer a builder.
https://www.babylonjs-playground.com/#UB58DY
I have some GLTF files which BabylonJS renders incorrectly; some faces are in wrong direction.
Cesium renders correctly, Three.js renders incorrectly as the same as BabylonJS.
GLTF files are converted from DAE with COLLADA2GLTF 2.1.2 for Win64. I have attached the zip containing .dae and .gltf.
I wonder if it's a bug of BabylonJS, or a bug of COLLADA2GLTF.
When we use BABYLON.GUI.AdvancedDynamicTexture, the HightLightLayer of a mesh is fully colored. I try several things, but nothing.
It just happens when I add this. If you comment, it works normally. :
var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
https://www.babylonjs-playground.com/#XCPP9Y#576
There is nothing in the documentation that talks about this case, so I guess it's a bug.
I'm not sure whether this qualifies as a babylon.js bug, but here's my scenario:
Uncaught TypeError: Failed to execute 'setPosition' on 'AudioListener': The provided float value is non-finite.
at i._updateAudioParameters (babylon.custom.js:14)
at i.render (babylon.custom.js:14)
at main.js?v=201806111547:595
at n._renderLoop (babylon.custom.js:6)
You can see it happen here: https://studio.rocketclowns.com/agnes/babylon-test/
Same result in Edge, Chrome and Firefox.
Help
Edit: I'm on Windows 10 and babylon.js is version 3.2.0.
I have posted the solution in a question to fix a couple of PG zip download issues:
1. Engine is not being created the same as the default playground
2. createEngine() function, if specified, is not used.
http://www.html5gamedevs.com/topic/39000-autoclear-and autocleardepthandstencil-problem/
I can do a PR on Wednesday to fix, but if somebody was keen they could go ahead. Also worth noting the frames and typescript ought to be checked. Cheers.
The occlusion query seems to be broken
Hi,
Not sure if it's a bug (rather an observation), but when I'm using BABYLON.DefaultRenderingPipeline(), it remove cameras from the given array.
I think the function should make a copy of the given array, because if I give scene.cameras, the function remove cameras from the scene.
Here's the PG: https://www.babylonjs-playground.com/#KZZ4TI#1
Thank you !!