Anonymous Login
2017-11-21 14:58 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001371OpenClonkEngine - Graphicspublic2016-08-19 11:43
ReporterSven2 
Assigned ToClonk-Karl 
PriorityhighSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
Product Version 
Target Version7.0Fixed in Version 
Summary0001371: Pink blocks in landscape
DescriptionRecently, pink blocks have started to appear in the landscape almost always at or directly around objects with SolidMasks.

The easiest way to reproduce it for me is to start Tests.ocf/Minimal.ocs, create a few basements (CreateObject(Basement, 30,30)), zoom in and drag them around a bit. so they have around 10-30 pixels distance. Pink borders will appear around the basements that are not moved (i.e. outside the update range of the moved basement).

It could be seen live in the "Shovels"-minigame in Clonkfest. It also sometimes happens in The Raid, when the basements get blasted by the attacking planes.

Sometimes, deleting a basement will leave behind large patches of pink pixels. Moving another object with SolidMask over this area clears the pixels.

It works on sky background as well a on other materials. These pixels appear as the correct material when using the material picker or reading the status bar in exact landscape drawing mode. They do not interact with landscape physics.

Pink pixels also appear in the "Berry Pickers"-minigame in Clonkfest. However, that may be an unrelated bug due to an error in the Map.bmp.

Tested on Win7/64 bit build.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0003741

Clonkonaut (developer)

That would be the 'none' texture, showing for some reason?

We could make that one invisible.

~0003747

Sven2 (developer)

Showing transparency instead of pink wouldn't be correct I think because it can also appear in places where other materials should have been drawn (then we'd have transparent holes in the landscape).

~0003750

Clonk-Karl (administrator)

I can reproduce this on Linux, too. I wonder if this was introduced with the background materials.

~0004025

Clonkonaut (developer)

I've changed priority to high. This is really not something we should leave in the release.

~0004069

Clonk-Karl (administrator)

The none texture belongs to the vehicle material that's being drawn into the landscape. I believe the problem is that objects can be at sub-pixel positions, but their solidmask is always at integer coordinates. So e.g. when there is a basement at X position 14.5 with a width of 40 pixels, then the solidmask can either be from pixels 14 to 53 or from pixels 15 to 54. Either way, there are some half-pixels of solidmask that are not covered by the object graphics, and the landscape shader will draw those in pink. I confirmed this by running SetPosition(GetX(), GetY()) on all basements, and the pink borders disappeared. It's not yet clear to me, though, why e.g. when loading a savegame there are no pink borders, and they only appear when moving around some objects with solid mask.

I think we lost the opportunity to have transparent solidmasks with the introduction of the lights system and the landscape shader that came with it.

The current solidmask system does not allow us to have solidmasks at sub-pixel positions. However, we could probably get rid of the pink borders by only storing vehicle pixels in the 8bit surface, but not propagate them to the surface used by the landscape shader (instead just use whatever pixel there was before the solidmask was set).

~0004070

Sven2 (developer)

Changing the color of SolidMask to pure black might also be a good start. At least that's less obvious than pink.

~0004072

Clonkonaut (developer)

Why not a transparent texture?

~0004073

Sven2 (developer)

Because then you can sometimes see sky underground, which is potentially very bright (maybe even pink!)

~0004091

Clonk-Karl (administrator)

SolidMasks were already temporarily removed while updating the landscape texture used by the shader. However, while removing the solidmasks with C4Landscape::SetPix, the to-be-relighted region was updated while said region was currently being processed. This could lead to updating of the landscape texture in regions in which the solidmasks have not been removed.

Fixed by not triggering relighting in temporary solidmask removal.
+Notes

-Issue History
Date Modified Username Field Change
2015-08-10 02:53 Sven2 New Issue
2015-08-10 02:53 Sven2 Description Updated View Revisions
2015-08-10 10:57 Clonkonaut Note Added: 0003741
2015-08-10 15:28 Sven2 Note Added: 0003747
2015-08-11 03:24 Clonk-Karl Note Added: 0003750
2015-10-16 02:33 Sven2 Target Version => 7.0
2015-10-26 15:00 Clonkonaut Priority normal => high
2015-10-26 15:01 Clonkonaut Note Added: 0004025
2015-10-26 15:01 Clonkonaut Status new => confirmed
2015-11-01 04:52 Clonk-Karl Note Added: 0004069
2015-11-01 04:58 Sven2 Note Added: 0004070
2015-11-02 12:19 Clonkonaut Note Added: 0004072
2015-11-02 15:12 Sven2 Note Added: 0004073
2015-11-08 22:53 Clonk-Karl Note Added: 0004091
2015-11-08 22:53 Clonk-Karl Status confirmed => resolved
2015-11-08 22:53 Clonk-Karl Resolution open => fixed
2015-11-08 22:53 Clonk-Karl Assigned To => Clonk-Karl
2016-08-19 11:43 Newton Status resolved => closed
+Issue History