butterchurn icon indicating copy to clipboard operation
butterchurn copied to clipboard

WebVR (or WebXR technically)

Open scruffynerf opened this issue 5 years ago • 12 comments

I'm really eager to see if this can be made to work with WebVR, especially if a way to adjust the preset to render into the 2 different frames (each eye) can be done.... Some presets do red/blue, so adjust that to render slightly differently would yield true 3d effects.

At this point, doing WebVR via JS is as simple as adding a bit of JS code to the page, and adjusting how you call the renders, so...

Anyone else interested in this?

You don't even need a VR setup... Chrome extension can emulate the VR bits, so testing can happen in a browser. but if it works, you'll allow all of those VR headsets with a browser to suddenly access ButterChurn in 3d...

scruffynerf avatar Jan 25 '20 01:01 scruffynerf

I'd love to see someone give it a go, but there really isn't any mechanism to generalize presets to rendering multiple viewpoints. It would potentially be possible with altering individual presets to support it, but there isn't currently any sort of standardization that they are using.

jberg avatar Jan 25 '20 05:01 jberg

Butterchurn in 3D/VR would be insane!

evoyy avatar Jan 25 '20 16:01 evoyy

Actively working on it.. stay tuned.

yoavshalev avatar May 29 '20 00:05 yoavshalev

Actively working on it.. stay tuned.

Thats sounds great, Yoav! Let me know if there is anything you need from me. Excited to see what you do

jberg avatar May 29 '20 01:05 jberg

Will do. Where can I find the legacy build?

On Thu, May 28, 2020, 19:51 jberg [email protected] wrote:

Actively working on it.. stay tuned.

Thats sounds great, Yoav! Let me know if there is anything you need from me. Excited to see what you do

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jberg/butterchurn/issues/29#issuecomment-635710272, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIMECVX2F77QNH2NXDKEG3RT4IK7ANCNFSM4KLOFPXA .

yoavshalev avatar May 29 '20 02:05 yoavshalev

Will do. Where can I find the legacy build? On Thu, May 28, 2020, 19:51 jberg @.***> wrote: Actively working on it.. stay tuned. Thats sounds great, Yoav! Let me know if there is anything you need from me. Excited to see what you do — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#29 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIMECVX2F77QNH2NXDKEG3RT4IK7ANCNFSM4KLOFPXA .

Unfortunately dont really have a buildable version of the old three.js version if thats what you are referring to.

The only experiments I did were very simple. Rendering to a texture, and then putting that on a plane or sphere in VR. It wasn't that great TBH, but that was when things were just coming out.

jberg avatar May 29 '20 02:05 jberg

Any chance we can hop on a short call sometime?

On Thu, May 28, 2020, 20:18 jberg [email protected] wrote:

Will do. Where can I find the legacy build? … <#m_-4751740636770021797_m_4981626400035009351_> On Thu, May 28, 2020, 19:51 jberg @.***> wrote: Actively working on it.. stay tuned. Thats sounds great, Yoav! Let me know if there is anything you need from me. Excited to see what you do — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#29 (comment) https://github.com/jberg/butterchurn/issues/29#issuecomment-635710272>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIMECVX2F77QNH2NXDKEG3RT4IK7ANCNFSM4KLOFPXA .

Unfortunately dont really have a buildable version of the old three.js version if thats what you are referring to.

The only experiments I did were very simple. Rendering to a texture, and then putting that on a plane or sphere in VR. It wasn't that great TBH, but that was when things were just coming out.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jberg/butterchurn/issues/29#issuecomment-635717478, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIMECSSRCQJIWGZKOA5SILRT4LO7ANCNFSM4KLOFPXA .

yoavshalev avatar May 29 '20 02:05 yoavshalev

Any chance we can hop on a short call sometime? On Thu, May 28, 2020, 20:18 jberg @.> wrote: Will do. Where can I find the legacy build? … <#m_-4751740636770021797_m_4981626400035009351_> On Thu, May 28, 2020, 19:51 jberg @.> wrote: Actively working on it.. stay tuned. Thats sounds great, Yoav! Let me know if there is anything you need from me. Excited to see what you do — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#29 (comment) <#29 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIMECVX2F77QNH2NXDKEG3RT4IK7ANCNFSM4KLOFPXA . Unfortunately dont really have a buildable version of the old three.js version if thats what you are referring to. The only experiments I did were very simple. Rendering to a texture, and then putting that on a plane or sphere in VR. It wasn't that great TBH, but that was when things were just coming out. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#29 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIMECSSRCQJIWGZKOA5SILRT4LO7ANCNFSM4KLOFPXA .

Any chance we can hop on a short call sometime? On Thu, May 28, 2020, 20:18 jberg @.> wrote: Will do. Where can I find the legacy build? … <#m_-4751740636770021797_m_4981626400035009351_> On Thu, May 28, 2020, 19:51 jberg @.> wrote: Actively working on it.. stay tuned. Thats sounds great, Yoav! Let me know if there is anything you need from me. Excited to see what you do — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#29 (comment) <#29 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIMECVX2F77QNH2NXDKEG3RT4IK7ANCNFSM4KLOFPXA . Unfortunately dont really have a buildable version of the old three.js version if thats what you are referring to. The only experiments I did were very simple. Rendering to a texture, and then putting that on a plane or sphere in VR. It wasn't that great TBH, but that was when things were just coming out. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#29 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIMECSSRCQJIWGZKOA5SILRT4LO7ANCNFSM4KLOFPXA .

For sure. If it works for you, come swing by the Webamp discord and we can figure something out: https://discord.gg/KHVzM6

jberg avatar May 29 '20 03:05 jberg

@yoavshalev Curious what your approach is? Have you made any progress on this? I may be able to contribute if you need help. Was hoping to do something similar myself, but don't want to duplicate efforts.

Also, has anyone heard of or considered a port to Unity?

uuunk avatar Jul 08 '20 16:07 uuunk

We are still working on it. At the moment we are working on making all VIZ compatible with Safari with a threejs / p5 or other library. After that we intend to import shaders from https://www.shadertoy.com/howto which also has support for VR. Possibly their implementation would inspire the solution. I also a small team working on TV app implementation. Happy to get more people involved in the project if there is a fit :)

yoavshalev avatar Jul 08 '20 20:07 yoavshalev

@yoavshalev holy crap just realized that your app was the focus of ProductHunt today! I was surprised butterchurn was never on there!

Anyway just learned about ShaderToy recently as well, I'll be digging on that as well. But my gut is that there's nothing immediately applicable to make the existing butterchurn plugins 3D. The original concepts here are just not meant for 3D, so my naive interpretation of the only paths are:

  • do some sort of deep learning model to create a depth map based on movement, shadows, vanishing point...seems impractical
  • do some sort of extra-dimensional math to build structure "behind" the 2d structures. I saw this recently that is an elegant way to make mandelbrot sets pop in 3d, but I don't think the technique would work well applied generally.
  • just map the 2d viz onto a sphere...definitely easy, but not particularly interesting.

There may be some more elegant math technique that could "parse" 3d from the existing preset equations but I'm not much of a math guy and my gut says that's wishful thinking...

In any case, have you considered further any of those approaches? Or is there another approach I'm missing?

uuunk avatar Jul 16 '20 02:07 uuunk

Heya @uuunk , sorry for the super delayed response.

I think you've covered it quite well, at least I've come to essentially the same conclusions. While some milkdrop presets utilize the shader paths to create amazing 3D looking scenes, the base per_frame/per_pixel/wave/shape equations are all done on a plane.

I did experiment at one time with allowing all those equations to address z-indices as well. What I couldn't figure out was (and dont really think there is a reasonable way) is how to adapt existing presets to that new version.

The man himself (Geiss) once gave his vision for an updated milkdrop which would allow you to compose presets and potentially include meshes: http://forums.winamp.com/showpost.php?p=2979288&postcount=15

I played around with some of those ideas, and they were super powerful, but a lot of work would need to be done to make a good enough preset editing environment like shadertoy has (and a community of preset authors to write them :D )

jberg avatar Aug 20 '20 05:08 jberg