Weekly Video: Fun with Instance Buffers

No need for an issue :slight_smile: I will fix it as soon as I can see it

But so far I just see a plane and I also see no call to enableDepthRenderer

Sorry, wrong link: https://www.babylonjs-playground.com/#JFT1LI#1

1 Like

Thanks! Will be fixed by next nightly

https://www.babylonjs-playground.com/#JFT1LI#3

Damn, thatā€™s fun to watch. And FAST, omg. SIMD demo, move-over. :slight_smile: Does anyone see this demo ā€œdie with blank canvasā€ after some time passes, possibly with window minimized?

MIDI sysex event -> browser eventā€¦ would be SO SO handy, hereā€¦ stepping those animations to perfect-syncā€™d midi music. (sigh) Maybe someday.

Cā€™mon, windows media playerā€¦ send your midi sysex events to webGLā€¦ PLEASE!!! Also need a <midi> element for html, as <audio> isnā€™t correct for that data format. <audio> is for sampled audio. Midi is different, of courseā€¦ and MUCH easier to perfectly sync mesh-withā€¦ IF any midi players would send the sysex to the damned browser event pipeā€¦ so I could see them in BJS land.

But noooooooooo. (Wingy throws a tantrum to try to get 3D world musically caught-up with where it is SUPPOSED to be going/by-now.) :slight_smile:

Yeah, I know, off topic. Instance Buffers! Yeah, I need one. I got an idea. (uh oh)

Instance buffers seem like a dream-come-trueā€¦ for voxel-folk. (like Iā€™d know).

3 Likes

Hi again. I tried my first instance buffer thing (mostly a copy of a previous one)

https://www.babylonjs-playground.com/#JFT1LI#5 It works! Yay!

It uses colorsā€¦ just like the other. BUT, I also tried to set the specularColor on each instanceā€¦ which is sure to fail, and it did. :slight_smile: I donā€™t think specularColor is a legal instance characteristic. Easy to set .specular on the lightā€¦ no problems. But, I still wanted to try itā€¦ using the instances.

Speaking of physicsā€¦ I wonder what the chances of making the sphereā€¦ bounce back and forth across that ā€œbowlā€ā€¦ perfectlyā€¦ rotating the angle of traversing one pad per crossing. It will take a PERFECT launch power and angle, with perfect restitution on all members. ERF! Fun to think about, though.

Letā€™s not play with the physics in THIS thread, though. Instead, letā€™s laugh at Wingnut trying to use instance buffers to set .specularColor on the padsā€¦ when none of them have a .material. Now THATā€™S funny, huh? What an idiotā€¦ that Wingnut. Itā€™s a perfect name for him, eh? :slight_smile:

I bet the pad rotations and positions could be stored in instance buffer arrays-of-characteristics, though (similar to colors). Might be fun to test.

Yeah, 36 instances is smallā€¦ but heckā€¦ it works. I got random colorsā€¦ on instances! (cuz I stole the code to do it). Ainā€™t I just somethinā€™? (snore)

Whatā€™s that you say? Another dancing robot scene? Ok, fine, here. (robot model not mine, of course. I love it, though.)

1 Like

Neat examples @Wingnut! I havenā€™t had time to try to unsync their animations yet like explained on a previous post, if youā€™re looking for another demo you could try that. I tried a quick scene.beginAnimation(instance, i, 100, true); that didnā€™t do anything.

Thereā€™s also a ton of ā€œInstances should only be created for meshes with geometry.ā€ on the console, so I guess the loop is missing some condition to skip instancing meshes without them.

1 Like

Thx @brunobg. Hey, I started a new D&P thread about our robot friend. Playing with the BrainStem Robot and its Animation

See ya thereā€¦ for robot animation talking. Everyone invited - bring your armature armamentā€¦ we might go ā€œboningā€. (What did he say?) (Itā€™s a skeletal thing). :slight_smile: