We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Switch to Transparent Background on the fly

Home Forums General Questions Switch to Transparent Background on the fly

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #48997
    Crunch
    Customer

    I know that in the init tab there is a “config application” puzzle where I can set the background to render transparent. However, if there is a way to make it transparent on the fly via code? (eg, not at initial setup)

    Bonus points if this transparency tweak could also be animated so it could fade in/out to transparency.

    Why I ask is the effect I am looking for is to have my scene, which starts with a visible HDRI background (a open sky scene). Later on in the scene, I would like to code an event where the background HDRI fades out (to transparent) so the background HTML (which has a video set as background) then shows – while the objects in my scene remain visible.

    #49008

    You might want to enable that transparent background option in the configure application puzzle, AND make a material in Blender with animated alpha (so that animation can be triggered with puzzles when you need it).

    Chief 3D Verger | LinkedIn | Twitter

    #49019
    Crunch
    Customer

    Thanks Yuri but I am still puzzled.

    To clarify, I am using an HRDI as the background and lighting. I align a plane with the HDR so the clouds/sky land on the horizon.

    The effect I would like to trigger is to have the HDR go blank (transparent), just like if I had the “advanced World nodes setup based on Is Camera Ray output”. But if I use that setup, it defeats the point as I lose the clouds that I want to be part of the scene at the start of the app.

    Why I want to do this, is because I have a html video element (a mp4 video of clouds/thunderstorm) in the background of the web page, that I would like to be exposed (essentially hiding/masking out the clouds from the static HDRI scene so the html background video shines through)

    I’ve experimented trying to slide a video texture/plane into place so its perpendicular to the ground plane, but video textures seem very expensive versus a flat html based video.

    Any ideas on how this effect could be pulled off? Thanks!

    Attachments:
    You must be logged in to view attached files.
    #49027

    you can possibly try the following: make the background fully transparent, and apply the texture with clouds to a semi-transparent sphere

    Chief 3D Verger | LinkedIn | Twitter

    #49072
    Crunch
    Customer

    Be a whole lot cooler if I could just change the transparency setting on the fly but everything I’ve seen on three.js seems the render has to either be transparent or not at initialization only.

    So I have done clouds on a sphere before (just like in the farmers journey demo). Which is just fine for a cartoon-ey like scenes. But how could I get a higher fidelity graphic that wraps to the sphere without distortion like the envior HDRIs do?

    You did something similar in the Global Illumination demo with the canal shot but that was more of a half sphere and I am looking for it wrap full sphere.

    How do I accomplish this?

    #49073
    Crunch
    Customer

    ah, I suppose I’ve never tried applying an hdri to sphere.. just did it is looking good! have a good weekend yuri! thanks

    #49077

    excellent! glad it helps! :good:

    Chief 3D Verger | LinkedIn | Twitter

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.