d13 Posted December 5, 2017 Share Posted December 5, 2017 Hi Everyone, Can anyone suggest a way to improve the lighting on this planet model (attached image)? The light-to-dark gradient band isn't even and seems unnatural. There's a point light (the sun) which is the main light source and hemispheric light with 0.4 intensity. Thanks! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 5, 2017 Share Posted December 5, 2017 Hiya d13, good to see you, as always. http://playground.babylonjs.com/#05Q46H#1 Can you... somehow... reproduce the issue, using that playground? (thx) I can't seem to "dupe" the problem. *scratch scratch* Are you using an energy-saver lightbulb in your pointLight, by chance? heh. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
d13 Posted December 5, 2017 Author Share Posted December 5, 2017 Thanks Wingnut! Yours looks a lot better than mine. Here's a version which includes the hemispheric light: http://playground.babylonjs.com/#05Q46H#2 Is there a way to add this image as a texture in the playground(linking doesn't work)? https://www.google.ca/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjQs5LcwvPXAhVJVBQKHc6lCC8QjRwIBw&url=https%3A%2F%2Fjcpag2010.deviantart.com%2Fart%2FUranus-Texture-Map-678497339&psig=AOvVaw038yH2E-K1mLu3xQc28XeB&ust=1512585354078237 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 5, 2017 Share Posted December 5, 2017 Hello either you add them to a CORS compatible server (imgur is fine) or you drop them on github and use raw.cdngit.com to get a link to it d13 1 Quote Link to comment Share on other sites More sharing options...
d13 Posted December 5, 2017 Author Share Posted December 5, 2017 Thanks DK! (rawgit works!) I've set the material up using my values: http://playground.babylonjs.com/#05Q46H#3 I'm seeing similar banding (although it's not as bad as in my live example) Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted December 5, 2017 Share Posted December 5, 2017 That banding is by how the two lights in your scene are adding together.http://playground.babylonjs.com/#05Q46H#4http://playground.babylonjs.com/#05Q46H#5http://playground.babylonjs.com/#05Q46H#6 Wingnut 1 Quote Link to comment Share on other sites More sharing options...
d13 Posted December 5, 2017 Author Share Posted December 5, 2017 @Pryme8 Thank you, that explains it! I do need that hemispheric light to fill in shadows - is there a better way I could be doing that? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted December 5, 2017 Share Posted December 5, 2017 ambient scene lighting? Quote Link to comment Share on other sites More sharing options...
d13 Posted December 6, 2017 Author Share Posted December 6, 2017 14 hours ago, Pryme8 said: ambient scene lighting? What is that? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted December 6, 2017 Share Posted December 6, 2017 http://playground.babylonjs.com/#05Q46H#7 Quote Link to comment Share on other sites More sharing options...
d13 Posted December 6, 2017 Author Share Posted December 6, 2017 22 minutes ago, Pryme8 said: http://playground.babylonjs.com/#05Q46H#7 Oh, I see what you mean now. But it still renders the shadows completely black, doesn't it? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted December 6, 2017 Share Posted December 6, 2017 Nope, it renders them in the color of the materials ambientColor and the scenes ambientColor I think multiplied together. Quote Link to comment Share on other sites More sharing options...
d13 Posted December 6, 2017 Author Share Posted December 6, 2017 1 minute ago, Pryme8 said: Nope, it renders them in the color of the materials ambientColor and the scenes ambientColor I think multiplied together. Oh OK! I'll do a bit of experimenting and see if I can come up with an acceptable effect. Thanks for all your help on this @Pryme8 ! Quote Link to comment Share on other sites More sharing options...
d13 Posted December 6, 2017 Author Share Posted December 6, 2017 I've removed the hemispheric light and set the `scene.ambientColor` like this scene.ambientColor = new BABYLON.Color3(1, 1, 1); But, I'm still getting banding - it shows up the most on the light coloured planets. It's very noticeable on Uranus, less so on Jupiter, and barely perceptible on Mercury (probably because of the texture colour) Quote Link to comment Share on other sites More sharing options...
d13 Posted December 6, 2017 Author Share Posted December 6, 2017 Just for reference, this is what Jupiter looked like previously with the extra hemispheric light: Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted December 6, 2017 Share Posted December 6, 2017 repost a playground please, I was looking at my example and cant recreate your banding unless I add an extra light. Quote Link to comment Share on other sites More sharing options...
d13 Posted December 6, 2017 Author Share Posted December 6, 2017 Oh, It was the light.intensity! Setting it to 0.9 solved the problem! Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted December 6, 2017 Share Posted December 6, 2017 glad Ive been able to help out with this project. did you ever figure out the ring shader I posted for you on the other thread? (Uranus has rings as well)http://planetpixelemporium.com/uranus.html GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
d13 Posted December 6, 2017 Author Share Posted December 6, 2017 @Pryme8Yes, thank you, you've been a great help! Pryme8 and GameMonetize 1 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.