Blue shadows on planets

Freeform discussion about anything related to modding Transcendence.
User avatar
LordSutekh
Commonwealth Pilot
Commonwealth Pilot
Posts: 87
Joined: Sat Mar 20, 2010 9:36 pm
Location: Bedlam

I have created some planets which look great as a jpg, but in-game they all have a blue shadow.
Image

Image
They shadow in the jpg is actually #0000, not just dark blue, so I don't know what's going on. Any ideas?
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

3. Recolor those pixels yourself in the darkest nonblack value available of the planet's hue. Planet shadows should not be 100% black, but receive some minimal illumination from starlight.
Literally is the new Figuratively
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Is is just me or did my previous message get lost?
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5510
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

It seems your previous message got lost because I don't see a prior message from you.
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

Sorry. I was trying to delete mine because I realized it was redundant shortly after I posted it.
Literally is the new Figuratively
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

No problem. The only other suggestion in my message was to use an 8-bit mask.
User avatar
LordSutekh
Commonwealth Pilot
Commonwealth Pilot
Posts: 87
Joined: Sat Mar 20, 2010 9:36 pm
Location: Bedlam

As opposed to a 1-bit mask? 'Cause that's what I'm using now. I didn't think that the bmp mask affected color. I mean, several of the stock planets have a nice black shadow (ie ringed planets) and they use 1-bit masks.
Vachtra
Militia Commander
Militia Commander
Posts: 308
Joined: Tue Feb 16, 2010 2:03 am
Location: Texas
Contact:

I haven't had this problem but I though 1 bit masks were standard.
"Have you guys ever watched the show?" ~ Guy
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

LordSutekh wrote:As opposed to a 1-bit mask? 'Cause that's what I'm using now. I didn't think that the bmp mask affected color. I mean, several of the stock planets have a nice black shadow (ie ringed planets) and they use 1-bit masks.
The problem is due to a limitation in the engine. If you use a 1-bit mask, the engine optimizes by treating all bits with black (color=0) to transparent. If it finds any areas on the planet that are color=0 but that are not supposed to be transparent, then it re-colors them to non-black (in this case, blue).

You can avoid this by using an 8-bit mask or (as Atarlost suggest) by recoloring the black parts of the planet to a different color (slightly less black).
User avatar
LordSutekh
Commonwealth Pilot
Commonwealth Pilot
Posts: 87
Joined: Sat Mar 20, 2010 9:36 pm
Location: Bedlam

Bingo! That fixed it!
*All hail the Mighty George!*
User avatar
LordSutekh
Commonwealth Pilot
Commonwealth Pilot
Posts: 87
Joined: Sat Mar 20, 2010 9:36 pm
Location: Bedlam

Alright, I was wrong. That almost fixed it. With an 8-bit mask the planets look great except on the map. On the map and the radar, the shadow is rendered as transparent, giving an odd half-planet look especially around asteroids. I took Atarlost's suggestion and re-colored the shadow, but apparently there is some leeway in the game engine because an almost black (ie off by a couple of bytes) will still render as black. By the time I get far enough away from black for the game engine, I have a slightly blue or yellow shadow that looks horrible.

I know it's possible. Look at the vanilla ringed planets. They have a black shadow (truly black- I checked) and they still render fine, even with a 1-bit mask. At this point they are taunting me. I might end up having to re-render all my planets without a shadow.
Vachtra
Militia Commander
Militia Commander
Posts: 308
Joined: Tue Feb 16, 2010 2:03 am
Location: Texas
Contact:

I have to say at first I was scratching my head trying to figure out what you were talking about. Even now I have to strain my brain to see the difference between the two images. If this is just me then sorry to all but I think you might want ot adjust your monitor(s), I'm using two. When you do a flyby you won't even notice.
Something I always though was wierd was the shadows that don't match the orientation of the sun. So this blue shadow thing really doesn't bother me at all.
"Have you guys ever watched the show?" ~ Guy
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

LordSutekh wrote:Alright, I was wrong. That almost fixed it. With an 8-bit mask the planets look great except on the map. On the map and the radar, the shadow is rendered as transparent, giving an odd half-planet look especially around asteroids. I took Atarlost's suggestion and re-colored the shadow, but apparently there is some leeway in the game engine because an almost black (ie off by a couple of bytes) will still render as black. By the time I get far enough away from black for the game engine, I have a slightly blue or yellow shadow that looks horrible.

I know it's possible. Look at the vanilla ringed planets. They have a black shadow (truly black- I checked) and they still render fine, even with a 1-bit mask. At this point they are taunting me. I might end up having to re-render all my planets without a shadow.
Can you attach your image files? I can take a look and see.
User avatar
LordSutekh
Commonwealth Pilot
Commonwealth Pilot
Posts: 87
Joined: Sat Mar 20, 2010 9:36 pm
Location: Bedlam

Here is the image file. The purple planet is the one I've been doing most of my tests on.
Attachments
Worlds182noatmo.jpg
Worlds182noatmo.jpg (218.59 KiB) Viewed 9714 times
User avatar
LordSutekh
Commonwealth Pilot
Commonwealth Pilot
Posts: 87
Joined: Sat Mar 20, 2010 9:36 pm
Location: Bedlam

And apparently it won't let me attach a .bmp. "The extension bmp is not allowed."
Post Reply