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

Ring shader not working on SphereObjects with Ephem #57

Open
mattstvan opened this issue Oct 18, 2021 · 0 comments
Open

Ring shader not working on SphereObjects with Ephem #57

mattstvan opened this issue Oct 18, 2021 · 0 comments

Comments

@mattstvan
Copy link

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]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant