Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support lighting and shadows for scatter and mesh #342

Merged
merged 15 commits into from
Aug 24, 2021

Commits on May 17, 2021

  1. Configuration menu
    Copy the full SHA
    942de8f View commit details
    Browse the repository at this point in the history
  2. recommend jlab3

    maartenbreddels committed May 17, 2021
    Configuration menu
    Copy the full SHA
    8159547 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2021

  1. Configuration menu
    Copy the full SHA
    a0cb996 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1cb0f6e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5006fb6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1fc186e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a6fe9d7 View commit details
    Browse the repository at this point in the history
  6. 🐛 a mesh would not always cast shadows, since its depth material was …

    …cached
    
    Example program:
    
    import ipyvolume as ipv
    import numpy as np
    
    def scene():
        f = ipv.figure(debug=True)
        ipv.xyzlim(-1, 1)
        x = np.array([0.1, 0.5], dtype=np.float32)
        ipv.material_lambert()
        s = ipv.scatter(x, x, x, marker="sphere", size=10);
        ipv.material_clear()
        k = ipv.examples.klein_bottle(show=False)
        ipv.xyzlim(2)
        ipv.material_phong()
        ipv.material_clear()
        m = ipv.plot_plane('bottom')
        ipv.show()
        return f
    f = scene()
    ipv.light_ambient(intensity=0.4)
    ipv.light_directional(position=[-3, 10, 3]);
    
    The klein_bottle would not cast a shadown, unless we modify alphaTest
    maartenbreddels committed Aug 24, 2021
    Configuration menu
    Copy the full SHA
    5585b8c View commit details
    Browse the repository at this point in the history
  7. ✨ debug mode can render shadow map

    This appears black if alphaTest for mesh is changed to != 0.5
    maartenbreddels committed Aug 24, 2021
    Configuration menu
    Copy the full SHA
    2e8e83f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a772968 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    dd087b6 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    fc065f0 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f790245 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7550194 View commit details
    Browse the repository at this point in the history
  13. update galata

    maartenbreddels committed Aug 24, 2021
    Configuration menu
    Copy the full SHA
    7a09767 View commit details
    Browse the repository at this point in the history