A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'World Building' started by Reanimate_L, Dec 7, 2018.
So with the all the terrain update, is there a plan to add virtual texture into built in terrain?
virtual textures?? please elaborate ...graphene? and another company have paged textures...or...as soon as I invent quantum image interpolation...unlimited image size entangled with your local textures...1k locally, 1tb entangled... virtually..
Yeah something like granite, but for terrain it should be more specific feature. Ie bake all the the texture layer into one layer just like base map texture with albedo, normal, and mask. so the virtual texture only sample one layer baked texture. this could improve performance rather that the terrain have to sampling all the texture layer all the time.
If they were putting something like that in the engine (virtual texturing) it would be silly to restrict it on the terrain. Although it would be awesome having something like that built in, but I wouldn't count on it.
True, but the reason why i'm wondering about this specifically for terrain is to optimize the texture layer.
The more layer count we have, the terrain getting more expensive to render. since Terrain using add pass for each 4 layer. Having all of those layer baked into one just like basemap would improve the performance a lot, but we will need a very high texture resolution for that. And that's where virtual texture would come to help handling all of those texture tiles.
Also having the layers baked into one layer would improve the performance when we need to do terrain mesh blending.
Yes, there is a virtual texture clip-map cache in the works.
The idea is to cache the material layer blending and greatly improve pixel shader perf (especially for high material counts), as long as you can afford to allocate the cache texture memory. It's much simpler than generic virtual texturing and streaming solutions like Graphine, but exactly what we want to speed up terrain rendering.
That awesome, we really need a way to improve terrain layer rendering performance. When you are talking about the cache texture memory as in RAM or VRAM?
It's very good to be wrong sometimes.
Actual virtual texturing is absurd and well out of the reach of most AAA studios let alone indies, and for terrain it's borderline suicidal - I guess people haven't really thought about how much storage space that really is if they ask for it
But virtual-procedural texturing is really useful and sees much use from big and small devs alike so I'm cautiously optimistic about this (which is a variant of PVT):
Thumbs up! I was thinking though.... why only terrain? Why not meshes too? Please consider this or at least let us know why not.
Was looking at that.
Not too familiar with this -- What kind of memory/disk-space are we looking at with a scene like in that video, @ChrisTchou?
Ah -- that's what I was missing.
I knew the virtual texturing technique was pretty ancient (relatively-speaking) and required loads of disk space, but doing that in screen-space somehow might actually be viable enough to work.
Oh, i do understand the storage space that we have to pay. but again at least we can choose between performance and final build size.
VPT would be the best for both world i think, also there's a repo on github someone creating a VPT for unity terrrain just FYI
Baby step man...baby step. Maybe after terrain, who knows
for that specific demo, from the demo link
32k Sample Data (1.07GB)
16k Sample Data (323MB)
8k Sample Data (91.5MB)
It is a run-time cache only -- it doesn't affect what you have saved on disk.
The cache basically consists of several large render textures, chopped up into tiles, plus an index map that says where to put each tile.
The idea is you render / blend your terrain materials into the cache, in an amortized fashion to keep cost low (for example, update one tile per frame). Your per-frame per-pixel terrain rendering can then simply read out of the cache -- which is much cheaper / much less bandwidth than blending all of the materials for every pixel.
So it's effectively trading memory for perf by caching the material blend result.
The index map is organized as a clip-map (per camera), so it's very much designed for caching data on a large contiguous plane (i.e. most Terrains), as the maximum tile resolution it can reference is limited by the distance to the camera. A clip-map also keeps the index map small and easy to manage, unlike generic virtual textures, that can have extremely large index maps.
The cache itself is designed to be pretty general purpose -- it doesn't decide which tiles to populate, or what to render to them; it just provides the texture setup, index map organization and tile allocation book keeping. We are working on a default implementation that uses distance and view culling heuristics to calculate the best tiles to populate, and renders the standard terrain materials into the cache. But, you could modify it to read back from the GPU to determine which tiles to populate, and read the tile data off disk instead of rendering it, and basically get terrain-only mega-texture.
It sound like Virtual Procedural Texture?
I'm not aware of that term, but if it fits the definition, then sure!
It's not 100% procedural, as you still can paint the splatmaps, but it's also not storing every cache pixel out to disk, so it is procedurally generating it to some extent.
well almost. .
Btw i'm curious since i'm not familiar with VT ClipMap cache. The Large render texture inside the cache, is it the the combined texture of all layers?
You guys rock.
General purpose is good.
Yes. It would look a lot like the basemap / pre-baked LOD texture (but in a virtual texture).
Nice, would be great if we have access to sample the virtual texture for terrain mesh blending.
Thanks for answering @ChrisTchou
Edit : Oh while you guys are on it. any plan to add support for decals/terrain decals that going to be baked into VT?
@ChrisTchou - Be nice if it's kinda possible to mess with a wetness level or such even though it's cached else we'd probably see some kind of pop going on as tiles are refreshed. I think though could just use graph. I'm guessing 8 splats become a simple lit HDRP shader (for example) - equivalent of one splat. It's this shader we need to mess with in the graph, the end result one... for wet (or maybe other people want snow, whatever).
Or maybe I'm overthinking it. I'm not looking for much more than a smoothness tweak. when it rains.