Decoration and Transparency

Started by geoo, May 29, 2016, 06:20:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

geoo

Currently, C++ Lix features decoration as a non-solid gadgets that possibly animates and has no function. If it's not animated, then it should be terrain (otherwise it's misleading, like when the shovel in Matt's goldmine tile set was still decoration). If it is animated, it still misleads the player as everything that moves tends to be important or dangerous. Decoration is always drawn behind terrain.

The only good use case of decoration is L1 legacy support. But L1 multi-part exits should be a single exit objects (possible to hard-code which deco goes with which exit).

What seems more useful to level-designers who wish to decorate their levels would be something that draws on terrain without affecting solidity. In particular, this would be useful with alpha blending. We've had a discussion about alpha-blending [1] before and it is a tricky issue if it is allowed for any kind of terrain pieces as it is unclear what should become solid/non-solid/steel. Instead, I propose a new type of decoration. Given a decoration image (with alpha channel), it would be drawn (with alpha blending) on any terrain/steel below without affecting its solidity/steel-ness, while it would not be drawn on non-solid terrain.

Example usage:
Green jade (from the sandstone tile set) could have its shading using alpha thus allowing it to be placed on any surface, not just sandstone colored ones.
Any kinds of shading/depth maps, like hieroglyphs that could be placed on stuff.
Decay such as moss or rust (caveat: should have a visually distinctive style from terrain which has a different effect when used on steel [2]).
Smoothen seams between terrain pieces.

Decorational stuff should also be allowed to be grouped together with terrain. This could even allow for convenient mix-and-match of textures and shading (shading for blocks, balls, pillars, ...).

Do gadgets already allow for alpha blending in the D port?

[1] Alpha blending: http://www.lemmingsforums.net/index.php?topic=2420.msg55108#msg55108
[2] Terrain on steel: http://www.lemmingsforums.net/index.php?topic=2557.0

Proxima

There are a few lovely decoration objects that I'd hate to lose, like the sun in the beach set. Is the plan to change these into normal terrain?

Simon

Matt's sun is air: I didn't know that. :lix-unsure:

Transparency works. D Lix has a dumb rule: Whatever has the slightest opacity becomes solid. This is a solid block. This sucks! I have to make a better rule.

Only-on-terrain-decoration with alpha: This is a resourceful idea, thanks. I believe Allegro 5's blending modes allow for only-on-terrain blending in a straightforward manner. Let's remember this idea. I'd like to see steel-covering moss implemented as only-on-terrain-decoration: Many of us feel that moss on earth is earth, moss on steel is steel.

I've postponed L1 legacy support. Yeah, we can ignore exit tops as standalone gadgets, and modify the exit gadget instead.



I feel attached to the rabbit deco. I've sprited this rabbit around 2002 and eventually made a Lix gadget from it. We can merge it into an animated exit.

-- Simon

geoo

#3
Most deco is actually not animated, and thus I think should be turned into terrain (especially the deco in the goldmine set is very misleading as deco). Including the sun from the beach set.

That leaves the bonfire from the beach set (-> turn into fire trap), exit top from goldmine (-> merge with exit), Simon's rabbit (-> turn into Monty Python's killer rabbit), an exit top from Amanda's forest set (-> merge with exit) and a lantern (-> maybe terrain?).

The guideline deco could sometimes be useful for testing, though I think its primary purpose is aiding terrain placement in the editor, where the terrain version works too.

NaOH

I never liked the lantern to begin with. It can go.

The animated part of the exit was intended to be an optional add-on. Either we can have two exits (one with the animation and one without) or just make the animation mandatory.

Removing the yellow wrestling rink decorations will make Pro Boxing less pretty:
Spoiler

NaOH

Quote from: geoo on May 29, 2016, 06:20:20 PM
Given a decoration image (with alpha channel), it would be drawn (with alpha blending) on any terrain/steel below without affecting its solidity/steel-ness, while it would not be drawn on non-solid terrain.

Another example would be adding cracks to terrain, Here are some semitransparent cracks:


And here they are on sandstone:


Simon

Yeah! That's exactly what these pieces are for: They don't obscure the underlying terrain, but breathe fire and life into them. Excellent crack.

-- Simon