We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey guys, I'm creating a model of our solar system. Everthing works fine except for the sun. I want the sun to be a spot light so it shines in all direction. But when I do so the sun itself is dark because the spotlight is at the same position as the sun sphere. I've tried all the other types of light sources but nothing is working well. Do you have an idea how to achieve this? I want the sun to emit light or at least be bright without affecting all the other planets.
On the picture you can see what it looks like using a spotlight in the center of the sun.
Hope you can help me. I really didn't find anything on the web. Thanks in advance!
Answers
You've left us nothing to work with. To even start helping you, we'd need to code up a 3D sketch with spheres that move around and work out the lighting settings to even reproduce what you have so far.
That's a lot of work. And we have to do it before we can even start helping you work on your actual issue.
So, post your code. Read the sticky thread so you can format it properly too.
be careful of the terminology here. a spotlight has a colour, position and a direction
https://processing.org/reference/spotLight_.html
whereas a pointlight has a colour and a position and will shine in all directions
https://processing.org/reference/pointLight_.html
but i'm not entirely sure that'll help you because all your sun's polygons are facing away from the light origin so will be in the shade. try it.
maybe a bit of ambientLight()?
if only we could see some code...
hey guys, thanks for the quick response. I don't know if my code would really help you... Of course I mean a pointLight(). I always mix those two in my head :D
Just to clarify my goal: I have a sphere with a pointLight in it's center and I want the outside surface to be bright. The problem is that the pointLight only hits the inside of the sphere and the outside surface is dark.
here are some excerpts from my code:
Hope this will help you guys. Let me know if you need some more code since I left out most of the code for the other planets, controls, camera etc.
Thanks in advance :)
Hey guys, I just wanted to let you know that I figured it out. It was as simple as creating an ambientLight with position and lightFallOff so it acts like a pointLight that ignores which direction the surfaces are facing.
Thanks anyways for your help :)
could you show how you texture the planets please?