Examples from the playground

To be honest, it’s a attempt (wip) of a port of this 3js example : three-fiber useLoader - CodeSandbox

DK spent some time with me to improve the BJS legacy instances by providing a manual advanced mode so they can be as fast as the 3js InstanceBufferGeometry that has, by default, less features than current BJS instances (frustum check, Bbox computation, etc, etc).

2 Likes

This is GREAT work!

https://www.babylonjs-playground.com/#2FDQT5#144
Injecting script into a PBR material

6 Likes

https://www.babylonjs-playground.com/#NP3GK1#25
Chain simulation, pretty glitchy at times if you ramp the number of chains up but this is from a while ago.

2 Likes

I may be wrong, but I think this is my PG. It explores the lesser known features of image processing that are quite powerful. Helpful for creating hologram effects. Thanks for posting, I’d lost the link!

3 Likes

Hologram FX? : )

Such a cliffhanger!

Anything else on that?

Not on a PG. But my site will be online soon. It is exploring the Flower of Life Geometry and Nassim Harramein’s potential solution to Einstein’s Grand Unified Field Theory, i.e. Nassim Haramein: The Schwarzschild Proton

3 Likes

(Caution - flashing colors)
https://www.babylonjs-playground.com/#258JTK#13

I’m playing with linesMesh… and with the GlowLayer’s cool .customEmissiveColorSelector() customizable function (a continuous-running function). Five linesMesh, but all 5 are colored “selectively” with ONE glowLayer. Pretty fun… very neon-like… xmas-ish, somehow. :slight_smile: It makes me think of a neon Santa… with animated waving arm (via turning on/off various neon at correct times). Can ya picture it? OLD STYLE animating. :slight_smile:

Line 90 rotates the array of linesMesh every 1/10 second, which makes line 52 customEmissiveColorSelector() update the colors. FUN! My customEmissiveColorSelector() can be coded smaller, perhaps.

You say you can’t determine HOW the WHITE glow around the center linesMesh… is happening?

See line 77. Even showBoundingBox lines get “glowed”. Perhaps this is because… showBoundingBox lines are ALSO happening on the “emissive channel”, just like glowLayers.

4 Likes

That link is phenominal.

(dont tell) Wingnut is a genius.

Always was.

Will have to remember to take a deepdive into this “glow channel” one day. : )

Happy times,

:eagle:

2 Likes

Thx aFalcon, but I didn’t invent .customEmissiveColorSelector() or its sister… .customEmissiveTextureSelector(). I wish I did, cuz they are nice/fun. I just found them alongside Glow Layer Road, and poked them with a stick until they started moving. :slight_smile: (This doesn’t work on “deer beans” piles, btw).

2 Likes

Little bitty gravity wells :stuck_out_tongue:

1 Like

Why did the rocket fall down?:laughing:

Yes, and the result is equilibrium and the stable orbit of protons :heart_eyes:

2 Likes

Gotta counteract all that mass ^^

2 Likes

Hi gang! Wow, this thread is getting LONG. PARTY!

Ok, I saw something weird, today. @JohnK and I and others did some path3d experimenting, once… starting with a snippet we have in our docs areas. And recently, I started studying the Particle base class and learning about how a particle flies, and updates its direction and movements. (I started coding some simple CUSTOM particle START position/direction funcs, and custom “fly it” updating. FUN!)

So, of course, the two things had to mix, and I lost track of objective, and started spraying particles from a path3d traveler/follower box. https://playground.babylonjs.com/#1PQT7P#46

It’s not really worthy of this list of cool PG’s, but I noticed one interesting thing… with the depth sorting.

That is a single particleSystem, and the particles exist both BEHIND the other mesh… AND IN-FRONT-OF the other mesh… at the same time! I didn’t think that was possible. I have told many people… that particles from a single particleSystem… could NOT have “dual depth-sort”, because all particles are actually a single mesh (like a single ground grid with all its cells separated).

Apparently, I was wrong. (I’m glad). I think it is allowed because the emitter itself is changing z-positions (and depth-sort order). I think, if the emitter were un-moving, then its particles could not be multi-depthed. They would only honor the depth-sort order… of the emitter position.

Ok, over-fascinated Wingnut, 10-8, 10-10, on the side. :slight_smile: (CB talk - pre-cellphones stuff)

2 Likes

That one is excellent Necips, and also like the References.

Resource links with references, image, and PLAYGROUND is excellent.

BOTH LINKS are COOL.

QUESTION: How many cubes?

  • ANSWER: Gotta trace render, up factory, out init(), and back in to MODE:
        switch (demoCase) {
            case 'demo1':
                for (i = 0; i < 40; i++) {
                    for (j = 0; j < 40; j++) {
                        solver.addParticle(new Particle(i, j, 20 * Math.random(), 20 * Math.random()));
                    }
                }
                break;

ANSWER: 40 X 40 = 1,600 CUBES;

TEST: 4X4. //reveals how the math works: https://www.babylonjs-playground.com/#BCVWI0#4

LIKE

“interaction-radius” … didn’t catch that before. Got it.

Thinking :

  • LAVA (char,sparks) and
  • GREEN~SPACE~GAS (bubbles).

NOTE: splash~plane VERTICAL.

THIS PG: https://www.babylonjs-playground.com/#BCVWI0#7,

emulates spinning GALAXY formation (and re-formation):
image

image

Into ATOMIC~WEAK~FORCE??:
image

Sadly, scheduling (this._h) BLACK-HOLE into BIG-BANG - did not work.

https://www.babylonjs-playground.com/#BCVWI0#8

There is probably a way.

2 Likes

Example of using shadertoy.com shaders with Babylon.js

https://www.babylonjs-playground.com/#EWME8L#9

orto-camera + no-control + plane-mesh + shader = your own shadertoy :slight_smile:

7 Likes

Awesome,

Like the VELOCITY.

FOR NOW, I can only combine the two in my mind. : )