Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light color restoration algorithm produces awful results when using lightdir from lightgrid #324

Open
illwieckz opened this issue Apr 23, 2020 · 1 comment

Comments

@illwieckz
Copy link
Member

illwieckz commented Apr 23, 2020

This use case occurs when the engine is attempting to do normal/specular compute using lightmap light color but lightgrid light direction:

lightgrid lightcolor restoration

lightgrid lightcolor restoration

lightgrid lightcolor restoration

See #299 about lightcolor restoration, #299 is the deluxemap counterpart of this bug.

The bug may also be related to #320.

We must find a better algorithm or a variant of it for that special use case if we want to support it.

We may want to support it for two reasons:

  1. reduce the complexity of the code, avoid intrusive hacky ifdefs everywhere.
  2. enable normal mapping on legacy maps.
illwieckz added a commit to illwieckz/Daemon that referenced this issue Apr 23, 2020
…ssing deluxe map direction, ref DaemonEngine#324

Workaround DaemonEngine#324, restore the unavailability of this feature.
@illwieckz illwieckz changed the title light color restoration algorithm produces awful results when using lightdir from lightgrid Light color restoration algorithm produces awful results when using lightdir from lightgrid Apr 23, 2020
illwieckz added a commit to illwieckz/Daemon that referenced this issue Apr 23, 2020
… color but missing deluxe map direction, ref DaemonEngine#324

Workaround DaemonEngine#324, restore the unavailability of this feature.
illwieckz added a commit that referenced this issue Apr 23, 2020
… color but missing deluxe map direction, ref #324

Workaround #324, restore the unavailability of this feature.
illwieckz added a commit that referenced this issue Apr 26, 2020
… color but missing deluxe map direction, ref #324

Workaround #324, restore the unavailability of this feature.
@hypov8
Copy link

hypov8 commented Nov 8, 2020

now that i think back, i previously have a similar issue in kingpinQ3. random artifacts in deluxmap
i found it was a compiler issue.
if you compile with thread 1 it fixed the issue. there is some bug when its laying down the UV map for patches. it would overlap existing data. hence why u see an inverted deluxmap. because it not the only face using the texture space.

to use multi thread still. i just set 1 thread before running
Sys_Printf("--- MapRawLightmap ---\n");
RunThreadsOnIndividual
then set back to previous value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants