I-am-Erk / CDDA-Tilesets

Master tileset repository for Cataclysm: Dark Days Ahead
Other
323 stars 170 forks source link

Style Guide discussion. Shadows, Lighting (and maybe more). #1199

Open clort81 opened 2 years ago

clort81 commented 2 years ago

Hello! I've followed CDDA from the sidelines for a long time, but not been active.

I noticed there's no convergence on shadows and lighting for the UltimateCataclysm tiles. Some are 'top' lit, others have shadows at 20°, 30°, or 45°.

For comparison cutecylsm has a clear style guide, that calls for top-lit shadows. https://github.com/pixel-32/CDDA-tileset

I submit this issue as a request for comments, by the contributers and maintainers of the tileset, to discuss creation of a style guide.

I'm happy to assist in re-shadowing tiles to whatever gets decided-on.

Cheers!

clort81 commented 2 years ago

From Discord chat: I think@barsoosayque is agreeing that inconsistent shadows are a problem, and this is something that a Style Guide addresses.

IMO, If the monsters have shadows from top lighting, then the furniture and trees should (at most) have some mild ambient shadow around the base, not a hard shadow cast at an angle.

You can't have global lighting coming from the top for for some objects, and from the side for others -- Light doesn't work like that.

vetall812 commented 2 years ago

I can clearly see your point here, but we should consider following facts: 1) this is pixel art game with a thousands at sprites (literally). 2) as pixel art there are some allowances like black underline on items, colored status icons and so on 3) there is some limitations of the rendering engine.

According to (1) there are a lot of sprites that should be redrawn, and almost all of them have no source files.

(2) will lead us to the fact that we have to divide monsters from furniture, items and terrain. Would it be shadow, or icon, or something else is a question. Right now it is a shadow.

(3) limit us not to draw anything right next to base of the sprite (32x32 in Ultica), so we cannot draw shadow at the right of the tree trunk. Also shadows wouldn't follow terrain behind the object.

Anyway, your idea is good and can be done with an effort. For example AlbertTheTerrible decided to put light source at the right, so shadows will go to the left. Another option to drop shadow from top to bottom and let monsters have a hard edge and furniture\terrain - soft one.

I think that we should ask maintainers what do they think about this issue.

clort81 commented 2 years ago

cdda_UltiCa_jsonShadowAlts

Alternatively, could the shadow-adding code just use a 45° shadow instead of top-lit oval?

clort81 commented 2 years ago

Algorithmic shadowing for floor-standing objects is also not too hard to implement: cdda_UltiCa_jsonShadowAltsShear

vetall812 commented 2 years ago

image