Randomize emissiveColor on instanced meshes?

I’m attempting to do it here: https://playground.babylonjs.com/#P8DKAK#2

I’ve also tried using instancedBuffers, but to no avail (they work on a color, but not emissiveColor).

Is there a way to randomize/customize the material.emissiveColor (so the glowLayer can render it) on an instance while still preserving the rest of the instance’s inheritances from the “root” mesh?

I’ve spent plenty of time with this PG: Babylon.js Playground

…but, the emissiveColor is shared between all instances.

If anyone could shed some light on this I’d be grateful.

Hi!

In this case, cloning is your friend:

https://playground.babylonjs.com/#P8DKAK#3

A clone can have a different material, while shares the same geometry. Then you can clone the material (or create a new one) and its basic parameters (like the colors) will be individual per mesh.

@supershwa unfortunately emissive is not part of the vertex data :frowning: so this is not possible at the moment.

If you only have one to highlight I would advise to use a clone for the highlited one as @RaananW noticed and keep the other as instances.

It’s possible to have a different emissive color per instance without resorting to cloning with a little work:

  • use the color attribute to hold the emissive color
  • change the fragment shader used by the glow layer to use color instead of glowColor

https://playground.babylonjs.com/#P8DKAK#4

The shader you find starting at line 52 is a copy/paste of the Babylon shader, except for line 77:

        vec4 finalColor = vColor;//glowColor;

where I use vColor instead of glowColor.

For the effect layer to take into account the color attribute in the shaders, you have to set Mesh.hasVertexAlpha to true.

Note that the first mesh (the master) is not glowing: there’s a bug, I’m going to make a PR for that.

This only accounts for the vertex color and not the full diffuse color. It sounds a bit hackish to put as public.

I wonder if we could more allow the use of custom effects for the generation so we could even use custom node mat for it for instance.

Any thoughts ???

I basically use the vertex color attribute instead of a fixed emissive color so that each instance can have a different emissive color, as it was the request from @supershwa.

The request was to have a different emissive color for each instance: I’m not sure what you suggest would allow that (though customizing the glow effect would certainly be a nice thing to have)?

PR for the problem with the master mesh not glowing:

Perfect thanks a lot for this one !!!

I’m having a problem with implementing the shader solution. I’m using the example provided at https://playground.babylonjs.com/#P8DKAK#4 as a reference, but my scene is throwing a ton of errors, and the glowLayer also doesn’t work:

babylon.js:16 BJS - [12:56:20]: Unable to compile effect:
e._ErrorEnabled @ babylon.js:16
e._processCompilationErrors @ babylon.js:16
e._checkIsReady @ babylon.js:16
(anonymous) @ babylon.js:16
setTimeout (async)
e._checkIsReady @ babylon.js:16
e._prepareEffect @ babylon.js:16
e._useFinalCode @ babylon.js:16
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:16
e._ProcessIncludes @ babylon.js:16
e.Process @ babylon.js:16
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:16
e._ProcessIncludes @ babylon.js:16
e.Process @ babylon.js:16
(anonymous) @ babylon.js:16
e._loadShader @ babylon.js:16
(anonymous) @ babylon.js:16
e._loadShader @ babylon.js:16
e @ babylon.js:16
e.createEffect @ babylon.js:16
e._isReady @ babylon.js:16
e._renderSubMesh @ babylon.js:16
_mainTexture.customRenderFunction @ babylon.js:16
e.render @ babylon.js:16
e.render @ babylon.js:16
t.renderToTarget @ babylon.js:16
t.render @ babylon.js:16
e._renderMainTexture @ babylon.js:16
t._renderForCamera @ babylon.js:16
t._processSubCameras @ babylon.js:16
t.render @ babylon.js:16
(anonymous) @ game.js:689
t._renderFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
e.runRenderLoop @ babylon.js:16
(anonymous) @ game.js:685
setTimeout (async)
drawTerrain @ game.js:681
(anonymous) @ game.js:206
r.emit @ socket.io.js:6
r.onevent @ socket.io.js:8
r.onpacket @ socket.io.js:8
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.ondecoded @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
a.add @ socket.io.js:6
r.ondata @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:6
(anonymous) @ socket.io.js:6
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:7
n @ socket.io.js:7
e.decodePayload @ socket.io.js:7
r.onData @ socket.io.js:7
(anonymous) @ socket.io.js:7
r.emit @ socket.io.js:6
i.onData @ socket.io.js:7
i.onLoad @ socket.io.js:7
hasXDR.e.onreadystatechange @ socket.io.js:7
XMLHttpRequest.send (async)
i.create @ socket.io.js:7
i @ socket.io.js:7
o.request @ socket.io.js:7
o.doPoll @ socket.io.js:7
r.poll @ socket.io.js:7
r.onData @ socket.io.js:7
(anonymous) @ socket.io.js:7
r.emit @ socket.io.js:6
i.onData @ socket.io.js:7
i.onLoad @ socket.io.js:7
hasXDR.e.onreadystatechange @ socket.io.js:7
XMLHttpRequest.send (async)
i.create @ socket.io.js:7
i @ socket.io.js:7
o.request @ socket.io.js:7
o.doPoll @ socket.io.js:7
r.poll @ socket.io.js:7
r.doOpen @ socket.io.js:7
r.open @ socket.io.js:7
r.open @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
r.open.r.connect @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
(anonymous) @ game.js:184
dispatch @ jquery-3.3.1.min.js:2
y.handle @ jquery-3.3.1.min.js:2
babylon.js:16 BJS - [12:56:20]: Uniforms:  world, mBones, viewProjection, glowColor, morphTargetInfluences, boneTextureWidth, diffuseMatrix, emissiveMatrix, opacityMatrix, opacityIntensity, diffuseSampler, emissiveSampler, opacitySampler, boneSampler
e._ErrorEnabled @ babylon.js:16
e._processCompilationErrors @ babylon.js:16
e._checkIsReady @ babylon.js:16
(anonymous) @ babylon.js:16
setTimeout (async)
e._checkIsReady @ babylon.js:16
e._prepareEffect @ babylon.js:16
e._useFinalCode @ babylon.js:16
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:16
e._ProcessIncludes @ babylon.js:16
e.Process @ babylon.js:16
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:16
e._ProcessIncludes @ babylon.js:16
e.Process @ babylon.js:16
(anonymous) @ babylon.js:16
e._loadShader @ babylon.js:16
(anonymous) @ babylon.js:16
e._loadShader @ babylon.js:16
e @ babylon.js:16
e.createEffect @ babylon.js:16
e._isReady @ babylon.js:16
e._renderSubMesh @ babylon.js:16
_mainTexture.customRenderFunction @ babylon.js:16
e.render @ babylon.js:16
e.render @ babylon.js:16
t.renderToTarget @ babylon.js:16
t.render @ babylon.js:16
e._renderMainTexture @ babylon.js:16
t._renderForCamera @ babylon.js:16
t._processSubCameras @ babylon.js:16
t.render @ babylon.js:16
(anonymous) @ game.js:689
t._renderFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
e.runRenderLoop @ babylon.js:16
(anonymous) @ game.js:685
setTimeout (async)
drawTerrain @ game.js:681
(anonymous) @ game.js:206
r.emit @ socket.io.js:6
r.onevent @ socket.io.js:8
r.onpacket @ socket.io.js:8
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.ondecoded @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
a.add @ socket.io.js:6
r.ondata @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:6
(anonymous) @ socket.io.js:6
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:7
n @ socket.io.js:7
e.decodePayload @ socket.io.js:7
r.onData @ socket.io.js:7
(anonymous) @ socket.io.js:7
r.emit @ socket.io.js:6
i.onData @ socket.io.js:7
i.onLoad @ socket.io.js:7
hasXDR.e.onreadystatechange @ socket.io.js:7
XMLHttpRequest.send (async)
i.create @ socket.io.js:7
i @ socket.io.js:7
o.request @ socket.io.js:7
o.doPoll @ socket.io.js:7
r.poll @ socket.io.js:7
r.onData @ socket.io.js:7
(anonymous) @ socket.io.js:7
r.emit @ socket.io.js:6
i.onData @ socket.io.js:7
i.onLoad @ socket.io.js:7
hasXDR.e.onreadystatechange @ socket.io.js:7
XMLHttpRequest.send (async)
i.create @ socket.io.js:7
i @ socket.io.js:7
o.request @ socket.io.js:7
o.doPoll @ socket.io.js:7
r.poll @ socket.io.js:7
r.doOpen @ socket.io.js:7
r.open @ socket.io.js:7
r.open @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
r.open.r.connect @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
(anonymous) @ game.js:184
dispatch @ jquery-3.3.1.min.js:2
y.handle @ jquery-3.3.1.min.js:2
babylon.js:16 BJS - [12:56:20]: Attributes:  position, uv
e._ErrorEnabled @ babylon.js:16
e._processCompilationErrors @ babylon.js:16
e._checkIsReady @ babylon.js:16
(anonymous) @ babylon.js:16
setTimeout (async)
e._checkIsReady @ babylon.js:16
e._prepareEffect @ babylon.js:16
e._useFinalCode @ babylon.js:16
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:16
e._ProcessIncludes @ babylon.js:16
e.Process @ babylon.js:16
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:16
e._ProcessIncludes @ babylon.js:16
e.Process @ babylon.js:16
(anonymous) @ babylon.js:16
e._loadShader @ babylon.js:16
(anonymous) @ babylon.js:16
e._loadShader @ babylon.js:16
e @ babylon.js:16
e.createEffect @ babylon.js:16
e._isReady @ babylon.js:16
e._renderSubMesh @ babylon.js:16
_mainTexture.customRenderFunction @ babylon.js:16
e.render @ babylon.js:16
e.render @ babylon.js:16
t.renderToTarget @ babylon.js:16
t.render @ babylon.js:16
e._renderMainTexture @ babylon.js:16
t._renderForCamera @ babylon.js:16
t._processSubCameras @ babylon.js:16
t.render @ babylon.js:16
(anonymous) @ game.js:689
t._renderFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
e.runRenderLoop @ babylon.js:16
(anonymous) @ game.js:685
setTimeout (async)
drawTerrain @ game.js:681
(anonymous) @ game.js:206
r.emit @ socket.io.js:6
r.onevent @ socket.io.js:8
r.onpacket @ socket.io.js:8
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.ondecoded @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
a.add @ socket.io.js:6
r.ondata @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:6
(anonymous) @ socket.io.js:6
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:7
n @ socket.io.js:7
e.decodePayload @ socket.io.js:7
r.onData @ socket.io.js:7
(anonymous) @ socket.io.js:7
r.emit @ socket.io.js:6
i.onData @ socket.io.js:7
i.onLoad @ socket.io.js:7
hasXDR.e.onreadystatechange @ socket.io.js:7
XMLHttpRequest.send (async)
i.create @ socket.io.js:7
i @ socket.io.js:7
o.request @ socket.io.js:7
o.doPoll @ socket.io.js:7
r.poll @ socket.io.js:7
r.onData @ socket.io.js:7
(anonymous) @ socket.io.js:7
r.emit @ socket.io.js:6
i.onData @ socket.io.js:7
i.onLoad @ socket.io.js:7
hasXDR.e.onreadystatechange @ socket.io.js:7
XMLHttpRequest.send (async)
i.create @ socket.io.js:7
i @ socket.io.js:7
o.request @ socket.io.js:7
o.doPoll @ socket.io.js:7
r.poll @ socket.io.js:7
r.doOpen @ socket.io.js:7
r.open @ socket.io.js:7
r.open @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
r.open.r.connect @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
(anonymous) @ game.js:184
dispatch @ jquery-3.3.1.min.js:2
y.handle @ jquery-3.3.1.min.js:2
babylon.js:16 BJS - [12:56:20]: Defines:
#define EMISSIVE
#define EMISSIVEUV1
#define UV1
#define NUM_BONE_INFLUENCERS 0
#define GLOW
e._ErrorEnabled @ babylon.js:16
e._processCompilationErrors @ babylon.js:16
e._checkIsReady @ babylon.js:16
(anonymous) @ babylon.js:16
setTimeout (async)
e._checkIsReady @ babylon.js:16
e._prepareEffect @ babylon.js:16
e._useFinalCode @ babylon.js:16
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:16
e._ProcessIncludes @ babylon.js:16
e.Process @ babylon.js:16
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:16
e._ProcessIncludes @ babylon.js:16
e.Process @ babylon.js:16
(anonymous) @ babylon.js:16
e._loadShader @ babylon.js:16
(anonymous) @ babylon.js:16
e._loadShader @ babylon.js:16
e @ babylon.js:16
e.createEffect @ babylon.js:16
e._isReady @ babylon.js:16
e._renderSubMesh @ babylon.js:16
_mainTexture.customRenderFunction @ babylon.js:16
e.render @ babylon.js:16
e.render @ babylon.js:16
t.renderToTarget @ babylon.js:16
t.render @ babylon.js:16
e._renderMainTexture @ babylon.js:16
t._renderForCamera @ babylon.js:16
t._processSubCameras @ babylon.js:16
t.render @ babylon.js:16
(anonymous) @ game.js:689
t._renderFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
t._renderLoop @ babylon.js:16
requestAnimationFrame (async)
e.QueueNewFrame @ babylon.js:16
e._queueNewFrame @ babylon.js:16
e.runRenderLoop @ babylon.js:16
(anonymous) @ game.js:685
setTimeout (async)
drawTerrain @ game.js:681
(anonymous) @ game.js:206
r.emit @ socket.io.js:6
r.onevent @ socket.io.js:8
r.onpacket @ socket.io.js:8
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.ondecoded @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
a.add @ socket.io.js:6
r.ondata @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:6
(anonymous) @ socket.io.js:6
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:7
n @ socket.io.js:7
e.decodePayload @ socket.io.js:7
r.onData @ socket.io.js:7
(anonymous) @ socket.io.js:7
r.emit @ socket.io.js:6
i.onData @ socket.io.js:7
i.onLoad @ socket.io.js:7
hasXDR.e.onreadystatechange @ socket.io.js:7
XMLHttpRequest.send (async)
i.create @ socket.io.js:7
i @ socket.io.js:7
o.request @ socket.io.js:7
o.doPoll @ socket.io.js:7
r.poll @ socket.io.js:7
r.onData @ socket.io.js:7
(anonymous) @ socket.io.js:7
r.emit @ socket.io.js:6
i.onData @ socket.io.js:7
i.onLoad @ socket.io.js:7
hasXDR.e.onreadystatechange @ socket.io.js:7
XMLHttpRequest.send (async)
i.create @ socket.io.js:7
i @ socket.io.js:7
o.request @ socket.io.js:7
o.doPoll @ socket.io.js:7
r.poll @ socket.io.js:7
r.doOpen @ socket.io.js:7
r.open @ socket.io.js:7
r.open @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
r.open.r.connect @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
(anonymous) @ game.js:184
dispatch @ jquery-3.3.1.min.js:2
y.handle @ jquery-3.3.1.min.js:2
babylon.js:16 BJS - [12:56:20]: Vertex code:

(I can’t copy/paste all of the errors – too many chars.) Any idea what could be going on here?

Thanks.

Hard to say from the log, I think we will need a PG to diagnose the problem…

I’ll try to make a PG example…my spaghetti code needs a fork, first.