Skip to content

Ring shader not working on SphereObjects with Ephem #57

Description

@mattstvan

First of all, this project looks fantastic and has a ton of potential. Kudos.

It appears that when rings are added to a SphereObject with ephem (i.e. being propagated around the scene), the rings become unlit. It seems to be related to the ring shader, but I'm no Three.js expert.

Example:
image

My project uses webpack, but I can replicate the issue on a static page using the code below.

const viz = new Spacekit.Simulation(document.getElementById('main-container'), {
  jdPerSecond: 0.05,
  unitsPerAu: 100.0,
});

viz.createObject('sun', Spacekit.SpaceObjectPresets.SUN);
viz.createAmbientLight();
viz.createLight([0, 0, 0]);

const saturn = viz.createSphere('saturn', {
  textureUrl: './saturn.jpg',
  ephem: Spacekit.EphemPresets.SATURN,
  radius: 58232.503 / 149598000,
});
saturn.addRings(74270.580913, 140478.924731, './saturn_ring.png');
viz.getViewer().followObject(saturn, [-0.75, -0.75, 0.5]);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions