Author Topic: Decoration and Transparency  (Read 3440 times)

0 Members and 1 Guest are viewing this topic.

Offline geoo

  • Administrator
  • Posts: 1473
    • View Profile
Decoration and Transparency
« on: May 29, 2016, 06:20:20 PM »
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
« Last Edit: May 29, 2016, 06:42:00 PM by geoo »

Offline Proxima

  • Posts: 4562
    • View Profile
Re: Decoration and Transparency
« Reply #1 on: May 29, 2016, 06:30:17 PM »
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?

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Decoration and Transparency
« Reply #2 on: May 29, 2016, 07:07:43 PM »
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

Offline geoo

  • Administrator
  • Posts: 1473
    • View Profile
Re: Decoration and Transparency
« Reply #3 on: May 29, 2016, 07:28:48 PM »
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.
« Last Edit: May 29, 2016, 08:06:34 PM by geoo »

Offline NaOH

  • Posts: 191
    • View Profile
Re: Decoration and Transparency
« Reply #4 on: May 29, 2016, 07:56:39 PM »
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 (click to show/hide)

Offline NaOH

  • Posts: 191
    • View Profile
Re: Decoration and Transparency
« Reply #5 on: May 29, 2016, 08:26:17 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:


Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Decoration and Transparency
« Reply #6 on: May 29, 2016, 08:28:14 PM »
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