-
Notifications
You must be signed in to change notification settings - Fork 60
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
Static reflections issues #1310
Comments
Perhaps it's better to distribute cubemaps more uniformly and access them through e. g. an octree. When building the cubemaps we'd need to somehow check if each spot is "inside" the map. |
It can happen. It's just rare because the lookup only checks a 100x100x100 box and the probes are too sparsely distributed. In most voxels there isn't even one. |
Increasing the area it checks did indeed make the second lookup yield some probes. |
A few possible solutions to that:
|
Placing probes on a grid would also speed the lookup up by a lot, since right now it's quite slow while at the same time not even finding any probes a lot of the time. |
Something like 128 or 256 seems to be a reasonable probe spacing that balances the amount and distribution. With 128 some of the largest maps that we have (e. g. https://users.unvanquished.net/~sweet/pkg/map-voxelworld0_0.dpk) it'd only be a ~500 KB array. On regular maps it will be something like ~138 KB on the larger maps. We can also just put it in a cvar or parse it as an optional keyword in |
Did you mean MB? If a probe uses 6 * 32*32 * 3 bytes that's 18K so you could only store a handful of them with that much memory. |
I meant for the lookup array. That array would just have an index corresponding to a cubemap, and different elements of that array can point to the same cubemap. The point of using it is to make the lookup fast. |
|
This is to keep track of issues with static cubemap reflections, since there's multiple of them.
To enable reflections, use
/r_normalMapping 1; r_deluxeMapping 1; r_specularMapping 1; r_reflectionMapping 1; r_physicalMapping 0
/, then/buildcubemaps
. Material system currently also won't select the correct cubemaps since that requires the core feature to work properly first. Use/r_showCubeProbs 1
to see where they are placed.Primary issues:
This issue is mostly fixed now by converting the probe lookup to use a grid instead, but the selection of cube probes and where they're placed still needs to be improved.
r_showCubeProbs 1
, which highlights the nearest and second nearest probes.r_showCubeMaps 1
.Secondary issues:
The text was updated successfully, but these errors were encountered: