base icon indicating copy to clipboard operation
base copied to clipboard

Rectangular volumes for envmap entities

Open no-lex opened this issue 5 years ago • 1 comments

Maps are made out of rectangular elements mostly, but environment maps are mapped about spheres. This leads to the radii of envmaps not cleanly bounding the surfaces they are intended to map and causing:

  • artifacts on env textures on the bounds of the sphere
  • mappers to pad envmaps with large amounts of non-env textures between spherical envmaps they may not otherwise want
  • inability to envmap large areas with few envmaps due to the sphere intersecting other areas and causing unsightly and difficult to patch borders

Here is an example of the envmap entity for the glass ceiling causing a jagged, ugly effect on the env texture on the wall. envbug

If this is to be implemented, it needs to be determined how the entity attributes will be numbered, as the current three attributes (radius, size, blur) would have to be expanded to include an attribute for shape (if it is determined that envmaps are desired in non-rectangular volumes, like the currently present spheres) and the three relevant dimensions (x,y,z) of the envmap.

If it is also feasible (convenient, but not nearly as beneficial as rectangular volumes) to be able to move the envmap entity relative to the bounds of its effect, there would need to be an additional three attributes (x-offset y-offset z-offset).

Possible ways of organizing the attributes:

1: only rectangular volumes supported, support for spherical envmaps dropped envmap x y z size blur [x-offset y-offset z-offset]

2: maintain support for spheres, maintain the first three attributes, and append shape & offset attributes to the end envmap x size blur shape y z [x-offset y-offset z-offset] (this would require support for deforming the sphere along all three axes)

3: have different sets of attributes for spherical and rectangular envmaps envmap x y z size blur shape [x-offset y-offset z-offset] (rectangular) envmap radius size blur shape [x-offset y-offset z-offset] (spherical)

Suggestions and ideas for implementation welcome; I've been trying to parse the code controlling this but haven't had much luck yet. Similar features may be useful for teleports as well.

no-lex avatar Mar 08 '19 01:03 no-lex

This also happens on my map Deathtrap: Lab, and can be quite disorientating while walking around it. 20190505173228

And even if you place various Env entities close by to try to make the effect better, it gets a lot worse. 20190505173728

So, i also vote for the rectangular envmaps/cubemaps to be implemented in. If they had some sort of blending in between "env collisions", this wouldn't be that huge of a issue, but now, it is, and should be taken in consideration.

SniperGoth avatar May 05 '19 20:05 SniperGoth