Hello!
I was reading about lights, and came across broken MSDN links here: http://doc.babylonjs.com/tutorials/Lights
I haven't scoured the tutorial site for other such broken links, but maybe there's an easy fix.
Cheers!
- Peter
Hello!
I was reading about lights, and came across broken MSDN links here: http://doc.babylonjs.com/tutorials/Lights
I haven't scoured the tutorial site for other such broken links, but maybe there's an easy fix.
Cheers!
- Peter
Hi
I tried to test the latest glTF Loader.
https://github.com/BabylonJS/Babylon.js/commit/d2fd7148f1e43c66953db2342384f1ead254a579
However, it seems the model will not be displayed correctly.
https://cx20.github.io/gltf-test/examples/babylonjs_broken/BoxAnimated/ (latest version)
https://cx20.github.io/gltf-test/examples/babylonjs/BoxAnimated/ (previous version)
Please confirm whether there is a problem.
I think this bug comes from the last update of chrome.
I use Chrome 52.0.2743.116 m (64-bit) with --allow-file-access-from-files, loading a scene from local folders.
I have the error with BJS 2.5 alpha, using src='http://www.babylonjs.com/babylon.js'.
If I use BJS 2.4.0 (using src='http://cdn.babylonjs.com/2-4/babylon.js'), it works.
The error post Uncaught Error: Error status: 0 - Unable to load scene.babylon / e.onreadystatechange @ babylon.js:3
So I have a scene where I am creating presets, and a few of them have children.
When I try to createInstance of the preset None of the children come through, even though I can see them in the presets._children array, but they do not appear in the new instance.
Ive noticed they have the flag of hasChildren = -1, or something like that, would that be causing them to get skipped?
Also I tried to do a workaround where i looped through the child array and created instances of them, but that ended up making my draw calls in the thousands.
I tried to see what was going on by then just doing a simple preset.clone() and that worked as expected with the children coming through, but one draw call for each object now instead of each instance.
Im thinking createInstance is bugged?
*EDIT after reviewing the documentation I think I may need to use synchronizeInstances
**EDIT EDIT... nope unless im using it wrong...
Hi,
i just noticed some bug when attaching skinned meshes at runtime to skeletons.
As example:
var mySkinnedMesh = mesh[0];
var myOtherSkinnedMesh = mesh[1];
myOtherSkinnedMesh.skeleton = mySkinnedMesh.skeleton;
This is working well in v2.4.
With the current release, the attached mesh is slightly offset.
Hi,
I'm not sure this is really a bug, and maybe this was already discussed in the forum.
Anyway if you create two textures with CreateFromBase64String with differents buffer and a same name. The second texture is ignored. This probably come from texture cache ? PG : http://www.babylonjs-playground.com/#8UPYJ#4
If two differents name are used, it works (http://www.babylonjs-playground.com/#8UPYJ#5) .
I have been adding a temporary HighlightLayer when some meshes are displayed. There is also a very fast morph going on to expand mesh from origin to full size. The HighLightLayer stays on for an additional 100 millis. It really pops!
I did not see any reason to dispose of the HighlightLayer. Another mesh could be instanced & display later also with that 'Entrance' type. The use case of a permanent HighlightLayer would probably be more common anyway.
I began rebuilding a scene I had with a Dialog displayed using an ortho camera. When the character mesh is popping, you can briefly see part of the dialog where the mesh is. The rest of the time the area is black when the layer doesn't even have any meshes.
I switched my entrance type to another with a different animation, and you get what I have below (still working on the eyes). I can probably get around this by either :
but the common use case of a permanent HighLightLayer could not. This area bordered in yellow is all black with the layer.
Hi,
I'm a newcomer to Babylon, and I have the following problem: I'm trying to display 250 Ellipse2D in the same Canvas (20 raw of 25 items), but only 99 are displayed.
The context is:
- Babylon 2.4
- Browser: Chrome
The example is attached.
Thank you for your help.
Fil
Hi,
I am unsure if this is a bug or incompatible with my setup, but I run the latest nightly build of Babylon.js 2.5.0-beta commit 3fe3372 using a repository I set up that fetches the latest preview build and allows me to install it through npm as a package. I am then using Webpack together with Typescript to import the library. I understand that this might not be the standard workflow, but it has been running smoothly for me until the Canvas2D refactoring. So down to the issue:
In a simple Javascript setup such as this using webpack for requires, CANVAS2D will fail to run due to the fact that BABYLON is undefined.
const BABYLON = require('babylonjs');
const CANVAS2D = require('babylonjs/babylon.canvas2d');
new CANVAS2D.Rectangle2D({})
First I thought it was that my requires were messed up, which turned out to be half true. Webpack had to provide the CANVAS2D module with the BABYLON module, by making the BABYLON module globally available.
new webpack.ProvidePlugin({
BABYLON: 'babylonjs',
}),
However this wasn't the entire issue, due to the fact that the CANVAS2D module is also defined as BABYLON and the first lines of the code overwrite the globally available BABYLON variable with it's own declaration of BABYLON.
var BABYLON;
(function (BABYLON) {
// ...
})(BABYLON || (BABYLON = {}));
Removing all var BABYLON; in the compiled code fixed my issues, but maybe it might be worth giving Canvas2D its own CANVAS2D module/namespace, if they are now to be treated as separate modules in the repository.
Regards
Swiftwork
Hello!
Your first question may very well be, "Peter, what in the nine hells did you do?" and so for this I will try to explain!
While building up my scene, I happened upon a situation where a mesh that I expected to be present, was absent in the rendered viewport.
After visual inspection with the debugLayer, the object was truly in the scene, but simply not visible.
Upon calling mesh.getAbsolutePosition(), I was shocked to see the return value of { x: NaN, y: NaN, z: NaN }
What is odd about this particular situation is that the mesh is one of 10 that are generated in a loop; the others are fine and appear as expected, but my missing mesh (#3 in the list) is visually not appearing.
I broke down my code to determine where this might be occurring, and it seems that, until the following call, the absolute position of the entity resolves to { x: 0, y: 0, z: 0 } (as expected)... once the call is made, the absolute position of the mesh appears as { x: NaN, y: NaN, z: NaN } !
engine.runRenderLoop(this._runRenderLoop.bind(this));
It would be difficult for me to explain in code how things are set up, so I'm hoping that someone might have encountered such a situation and be able to say, "hey, I know what in the nine hells *I* did, so here are my experiences and how I fixed it!"
Regardless of the outcome, I will try to explain my solution when I come across it.
Thanks for reading!
- Peter
I think there may be a problem with the "lifecyle" of a exported shadow generator.
If i create the shadow generator with the exporter (good bias and filter settings) the shadows show up IF the Y position is high enough off the ground. But if close to ground ... no shadows.
If i create the shadows in the client scene.executeWhenReady the shadows are perfect... If i Console.log both shadows generators (the one created from unity exporter and the one manually created) they are the same. Its weird... Maybe something to do with "Where In The Scene Lifecycle" the shadow generator is being created of exported and the shadow generator info is in the .babyone scene file.
I am attaching a test .babylon file exported from unity... The shadow generator part of the .babylon looks fine. but even in sandbox. With none of my babylon enhancements, the .babylon on load... Show the sphere above the ground... Shadows enabled and physics enabled... The balls starts to drop but when it gets close to ground, the shadow disappears. Its gotta be something in the way way is reading the shadow generator information and instantiates the BABYLON.ShadowGenerator... or maybe WHEN is instantiates the BABYLON.ShadowGenerator.
Anyways take a look a the MiniGame.babylon file in SANDBOX
Right now, if you use a shaderPath = "MyShader" ... With no path info... it will look for the shader as "/src/Shaders/MyShader.vertex.fx".
That should load from the folder the .babylon file is in Just like textures... Right???
I think it would be MUCH easier if it did, JUST LIKE TEXTURES
Can we fix that... I don't know where in the code that is happening
I see something different if I go directly here:
http://babylonjs-playground.azurewebsites.net/?28
to if I, say, go here:
http://babylonjs-playground.azurewebsites.net/?12
then choose PBR from the drop-down box. When I do the latter the four meshes are semi-transparent.
I've managed to reproduce this on both Firefox and iPad. I'm guessing that one or the other of the playground entries is setting some global state that it shouldn't?
By the way, the "wrong" way is actually quite an interesting effect: the balls look a bit like very delicate glass, or soap bubbles. It might be worth adding a comment, or bool var, to say how the effect can be reproduced.
I tried the loading of some of gltf models by babyon.js.
https://cx20.github.io/gltf-test/
However, Orientation of some of glTF models for Skinning is incorrect.
For example,
https://cx20.github.io/gltf-test/examples/babylonjs/index.html?model=RiggedSimple&scale=0.2
https://cx20.github.io/gltf-test/examples/babylonjs/index.html?model=RiggedFigure&scale=1
https://cx20.github.io/gltf-test/examples/babylonjs/index.html?model=CesiumMan&scale=1
Please confirm whether there is a problem.
http://www.babylonjs.com/Scenes/Clouds/index.html - shows `Babylon.js:15 Uncaught TypeError: i is not a function`
Also none of the playground code works for me anymore giving the same error as above.
Any ideas?
Thanks!
Hi guys,
I have a problem with mesh picking and it is a specific case.
When I create a ribbon like this, I can see it on the scene:
var someRibbon = BABYLON.Mesh.CreateRibbon("ribb", [[new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(10, 0, 0)], [new BABYLON.Vector3(0, 10, 0), new BABYLON.Vector3(10, 10, 0)]], false, false, 0, _scene, true, BABYLON.Mesh.FRONTSIDE);
On mouse down I am writing the name of the picked mesh in the log:
handleMouseDown: function(event){
var pickResult = _scene.pick(_scene.pointerX, _scene.pointerY);
var pickedPoint = pickResult.pickedPoint;
console.log(pickResult.pickedMesh.name); // writes ribb when I click on it
}
BUT, when I update the ribbon mesh after creation, like this:
var someRibbon = BABYLON.Mesh.CreateRibbon("ribb", [[new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(10, 0, 0)], [new BABYLON.Vector3(0, 10, 0), new BABYLON.Vector3(10, 10, 0)]], false, false, 0, _scene, true, BABYLON.Mesh.FRONTSIDE);
someRibbon = BABYLON.Mesh.CreateRibbon(null, [[new BABYLON.Vector3(0, 0, 5), new BABYLON.Vector3(10, 0, 5)], [new BABYLON.Vector3(0, 10, 5), new BABYLON.Vector3(10, 10, 5)]], null, null, null, null, null, null, someRibbon);
Then I can see that the ribbon that is updated (moved 5units along z axis), but it can't be picked. Actually, the picker "thinks" that the ribbon is still in the old position.
Does someone have any idea how this could be solved?
Reporting bug regarding instances and their parents not being rendered when HighlightLayer is used.
http://babylonjs-playground.com/#29SZC0#10
Ping @Sebavan
/Swiftwork
I think i found a bug.
It seems that the fresnel parameters of the material are not cloned correctly.
The two spheres in this playground should look identical but they are not:
http://www.babylonjs-playground.com/#SO3PH
I have 3 meshes in a Blender scene. Each mesh has its own origin and animation. The meshes animate as expected when viewed in Blender, i.e. they move as distinct meshes and have their own distinct animation. When I export to Babylon JS and test it in the sandbox at "http://www.babylonjs.com/sandbox/", all meshes seem to share the same origin and all 3 animations are applied automatically to them. I am not sure if this a bug but I have tried exporting different animated meshes in the same scene from blender and I keep getting the same results. Could someone please give some advice on this. I am using Blender 2.78a and Babylon.js 5.0.6 exporter.
Please find below the .blend and Babylon JS files.
.
Thanks