-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Terrain uv mapping performs correct? #839
Comments
If I don't do this, then texture tiling in the distance will look extremely bad. I'm curious, do you have a better alternative? This effect is computed in this shader, where the virtual texture tiles are rendered into the atlas: https://github.com/turanszkij/WickedEngine/blob/master/WickedEngine/shaders/terrainVirtualTextureUpdateCS.hlsl#L84 |
The huge rocks and grass blades on a mountain looks equally "extremely bad". And the use of patterned is impossible. |
This is how it looks like without uv scaling based on LOD, always tiling for max detail: This is how it looks like constant uv scaling for min detail (1:1 factor texture to chunk): The current solution is to increase tiling close to camera to max out virtual texture capabilities, but reduce tiling in the distance, which is intentional. Note that the base terrain textures in the Editor are 1024*1024 resolution. If you use higher resolution base textures, tiling will be different, as the it is always computed to map a whole base texture across a whole chunk completely in the distance. Maybe we should introduce a second "detail" texture map close to the camera, and only blend it in close by, while keeping the base texture tiling constant? On the other hand, I fixed the flipped texture that is visible on @Wc4ever 's first screenshot. |
@turanszkij how you did it, can I recompile shaders on fly some how?) |
In my first comment I wrote where to modify this effect:
|
@turanszkij No I got it, I mean you got exactly the same screens which leads me you changed the shader without engine reload, or you just serialized the camera position?) |
Oh I see, when you make changes to the shader source, the Editor will automatically recompile and reload it when the window gets back in focus. You can verify this happening when you open the backlog (Home button), there will be a message posted about shader recompilation. This doesn't work with release builds, for example Steam, you have to do it from a development build. |
Just did some research, I think the main problem now there is to much cascades and all of them switching in near distance. Also last lod is to close to mid distance that produce blurry mid distance texture with huge details. So I think as first steps to tune current approach would be good to reduce number of cascades, rearrange them and may be allow to adjust some setting for example first cascade prescale. Detail material for closeups it is also good idea but seems like more advanced feature to implement. |
Have been running some test with terrain, there is a thing I can't understand. Whats the point of mapping like that?
I did read the code and it dosent seem like a bug, seems like it's done on purpose. But I can't see how it could be used in real game. Also I never saw behaviour like that in other engines. When I trying to use texture with obvious details like rocks they look messy, they appear huge on near distance and they fade away obviously.
I assume resolution supposed to go lower but uv mapping have to stay consistent.
The text was updated successfully, but these errors were encountered: