Giter Site home page Giter Site logo

Comments (3)

mrxz avatar mrxz commented on May 20, 2024

The transmission pass of Three.js doesn't render transparent objects. By default both the <a-text> and <a-image> primitives are marked as transparent. For images you can set transparent="false". However, the built-in text rendering does effectively need to be transparent.

Note that it isn't recommended to use transmission when targeting stand-alone/mobile VR headsets as the transmission passes cause expensive operations that impact performance too much. For context there is ongoing work to improve the transmission pass in Three.js (see mrdoob/three.js#28078), but it'll obviously take time before it lands in Three.js let alone A-Frame, assuming the changes get incorporated.

from aframe.

nickverneck avatar nickverneck commented on May 20, 2024

I see, Setting transparent=false end up getting the a-text and a-image material blur in general, but viewing from behind an object also with transmission they now don't get rendered at all.

I tried to write my own shades and custom materials as well but I wasn't successful . However, I'm not sure if this is a limitation on three.js transmission as I've seen in reactXR doing this exact effect on their examples.
https://codesandbox.io/p/sandbox/router-transitions-4j2q2?file=%2Fsrc%2FApp.js

I wonder if this could be ported to a-frame since they are using THREE.physicalMaterial under the hood.
https://github.com/pmndrs/drei?tab=readme-ov-file#meshtransmissionmaterial

Thanks for explaining btw!

from aframe.

mrxz avatar mrxz commented on May 20, 2024

Under the hood A-Frame is pretty much vanilla Three.js, so anything that can be done with Three.js can be done with A-Frame with some effort as well. Looking at the MeshTransmissionMaterial from drei you linked, it seems that it specifically supports "seeing" other transmissive and transparent objects through it, so that might just be what you're looking for.

I don't know if it properly works in WebXR, though. So that's something you'll have to find out if you attempt porting it.

from aframe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.