Code Monkey home page Code Monkey logo

threejs-caustics's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

threejs-caustics's Issues

Converting to Y-up coordinate system

TLDR: What could I be missing in my attempts to rotate threejs-caustics from it's Z-up system into a ThreeJS scene using the default Y-up system?

I'm building an underwater scene and wanted to add caustics to the floor. This incredible project seemed like the perfect solution!

I managed to convert this project to Typescript, separate everything into it's own files/folders, and add a series of controls to manupulate the uniforms / environment, and increase the size of the caustics:

Screenshot 2022-07-04 at 7 13 59 PM

Problem is- when added to another ThreeJS scene, I noticed that everything was rotated by 90ยฐ. It appears the scene is using a Z-up system instead of a Y-up system?

I've been converting as many things as I can find related to the Z axis to the Y axis, from the lightProjection camera and WaterSimulation._camera to references within each shader. However, I can't seem to get anything other than this:

Screenshot 2022-07-04 at 7 08 27 PM

This is essentially the same result I get if I open threejs-caustics and add scene.rotateX(-Math.PI / 2)

I'm on day 3 of trying to figure this out so I figured it couldn't hurt to try to ask for a bit of advice ๐Ÿ˜…. Either way, you've done incredible work on this project and I appreciate your generosity in sharing it with us!!

Chromatic aberration

After some swimming pool observations I saw that there was visible chromatic aberration in real-life caustics. This might be tricky to implement though.

Improve caustics computation performances

As suggested by someone on Twitter, we could use hierarchical env maps in order to speed up the caustics computation. This would reduce the search space for the intersection and might increase the precision while increasing the performances.

We should also render the envmaps from the POV of the refracted rays (taking the assumption that the water is completely planar) so that the performances don't depend on the light incidence anymore.

Increase size of area

Hello Martin!

We have just spoken on Twitter. Right now I have a simple scene in aframe, the problem is that I cannot increase the water area to cover all the plane, I tried different things but without success:
Screenshot 2022-04-13 at 15 14 00

Let me know if you need more information and thanks in advance!

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.