Back to Molly Rocket Molly Rocket
Molly Rocket games and everything even tangentially related
 

  FAQFAQ  SearchSearch  UsergroupsUsergroups 
Log inLog in  RegisterRegister
 

Shouldn't it just be "virtual texturing"?

 
Post new topic Reply to topic    Molly Rocket Forum Index -> Sparse Virtual Texturing
View previous topic :: View next topic  
Author Message
casey
Site Admin


Joined: 18 Dec 2004
Posts: 1768
Location: Seattle

PostPosted: Sun Feb 24, 2008 9:07 pm    Post subject: Shouldn't it just be "virtual texturing"? Reply with quote

Why is it called "sparse virtual texturing"? Virtual memory is not called "sparse virtual memory". It seems really redundant to me.

If you had called it "sparse texture buffering", then I could understand why you included the "sparse", but otherwise I don't get it.

- Casey
Back to top
View user's profile Send e-mail Visit poster's website
Won



Joined: 21 Sep 2005
Posts: 506
Location: New York

PostPosted: Sun Feb 24, 2008 9:38 pm    Post subject: Reply with quote

Maybe the "S" should stand for "Software," as distinct from most virtual memory systems which have some kind of hardware support. Of course, paged virtual memory didn't always have hardware support, but I believe the TLB was the first cache-like thing added to a CPU.
Back to top
View user's profile Visit poster's website
casey
Site Admin


Joined: 18 Dec 2004
Posts: 1768
Location: Seattle

PostPosted: Sun Feb 24, 2008 10:21 pm    Post subject: Reply with quote

Yeah I'm pretty certain the Mac was still using double dereferenced pointers until like 1996 or something terrible like that Sad

- Casey
Back to top
View user's profile Send e-mail Visit poster's website
Won



Joined: 21 Sep 2005
Posts: 506
Location: New York

PostPosted: Sun Feb 24, 2008 11:06 pm    Post subject: Reply with quote

Hm, I doubt that was a hardware limitation, since the 68030 had an MMU with a 22-entry TLB. I'm guessing it's just the old handle-as-pointer-to-pointer technique before MacOS was designed to take advantage of hardware protected memory. I'm sure Windows went through a similar transition.
Back to top
View user's profile Visit poster's website
sean



Joined: 01 Feb 2005
Posts: 1392
Location: Kirkland WA

PostPosted: Sun Feb 24, 2008 11:23 pm    Post subject: Reply with quote

It's called "sparse virtual texturing" because I needed something to distinguish it from the virtual texturing defined by DirectX 10. That's all. It's totally a fiction in that sense.

So the idea here is that DX10 textures are virtual, but the API knows about the whole texture (even if it's sparsely downloaded); to user code it never looks sparse. Whereas with SVT, the API doesn't know about the whole texture, and the client code does have to know about the sparseness.

Note that I don't think that justifies adding the word "sparse"; to me the SVT approach is the right way of generalizing virtual memory to texturing; putting a virtual memory manager behind a texture sampler is the naive way of doing it. But once I needed a different term, that was the one I came up with.

Quote:
If you had called it "sparse texture buffering", then I could understand why you included the "sparse", but otherwise I don't get it.


Well, is the term reflecting the API, or the implementation? The weird thing is that you have to comingle the code with the client code (you have to put the virtual-decode into your non-virtual shaders). So the bleed in the terminology reflects that.

But really it was just a hack.

ANYTHING but MegaTexture.
Back to top
View user's profile Visit poster's website
ryg



Joined: 31 May 2007
Posts: 276
Location: Kirkland, WA

PostPosted: Sun Feb 24, 2008 11:38 pm    Post subject: Reply with quote

casey wrote:
Yeah I'm pretty certain the Mac was still using double dereferenced pointers until like 1996 or something terrible like that

Well, before OS X, Mac OS also didn't have preemptive multitasking or memory protection - not even in the PPC-only variants. And they also required users to manually assign memory budgets to apps, waay into the nineties (actually, not sure whether that fixed before OS X). MacOS classic really wasn't very... er... progressive in its adoption of... er... weird experimental technologies.
Back to top
View user's profile Visit poster's website
TomF



Joined: 18 Feb 2007
Posts: 107
Location: Seattle

PostPosted: Mon Feb 25, 2008 1:12 am    Post subject: Reply with quote

The main difference from DX10's thing is the granularity - DX10 has to have each entire mipmap in video memory or not. So a better name might be "fine-grained virtual texturing"

Now, "sparse textures" are even cooler. That's where some bits of the texture simply don't exist at some mipmap levels. This is nice for things like shadowbuffers, where you only generate the parts of the mipmap levels you actually need, which is a huge memory and render-time saving.

And then finally there's "lazy sparse textures" (also called "Just In Time textures") where you don't render any part of any textures until you actually need it (i.e. you get a page fault), and then you only render that bit. Excellent for reflection maps.
Back to top
View user's profile Visit poster's website
Wolf Mathwig



Joined: 31 Aug 2007
Posts: 184
Location: Hamburg, Germany

PostPosted: Mon Feb 25, 2008 1:23 am    Post subject: Reply with quote

Maybe the 'S' should stand for 'Sean'... Rolling Eyes
Back to top
View user's profile
sean



Joined: 01 Feb 2005
Posts: 1392
Location: Kirkland WA

PostPosted: Mon Feb 25, 2008 1:42 am    Post subject: Reply with quote

TomF wrote:
The main difference from DX10's thing is the granularity - DX10 has to have each entire mipmap in video memory or not. So a better name might be "fine-grained virtual texturing"


Weird, to me that's where "sparse" is better than "fine-grained". "Fine-grained" makes it sound like you mean the page size is smaller, not a binary on-off 'do you have all of it or no' (to me).

(This is pretty freaking nit-picky, though.)
Back to top
View user's profile Visit poster's website
Won



Joined: 21 Sep 2005
Posts: 506
Location: New York

PostPosted: Mon Feb 25, 2008 2:22 am    Post subject: Reply with quote

Tom's comments about sparse textures reminded me of an older SIGGRAPH paper. It turns out it was called "Adaptive Shadow Maps," but I found some interesting stuff.

http://graphics.cs.ucdavis.edu/~lefohn/work/glift/

In particular, the implementation of "Dynamic Adaptive Shadow Maps 2005" appears to be pretty close to SVTM (although it doesn't try to deal with trilinear).

As it turns out, this guy, Andre Lefohn, founded Neoptica which got bought by Intel recently. My guess is that you RAD guys already knew all that!
Back to top
View user's profile Visit poster's website
casey
Site Admin


Joined: 18 Dec 2004
Posts: 1768
Location: Seattle

PostPosted: Mon Feb 25, 2008 2:30 am    Post subject: Reply with quote

sean wrote:
casey wrote:
If you had called it "sparse texture buffering", then I could understand why you included the "sparse", but otherwise I don't get it.


Well, is the term reflecting the API, or the implementation?


I was trying to point out that you missed the obvious Eulerization:

Sparse Texture Buffering
Sean T. Barrett

Wink

- Casey
Back to top
View user's profile Send e-mail Visit poster's website
sean



Joined: 01 Feb 2005
Posts: 1392
Location: Kirkland WA

PostPosted: Mon Feb 25, 2008 2:51 am    Post subject: Reply with quote

once again, I am totally missing your jokes!
Back to top
View user's profile Visit poster's website
casey
Site Admin


Joined: 18 Dec 2004
Posts: 1768
Location: Seattle

PostPosted: Mon Feb 25, 2008 3:45 am    Post subject: Reply with quote

I know, I'm losing my mojo!

(The original post was serious, though - I actually did want to know what the deal was with the "sparse". I just threw a joke in there for fun...)

- Casey
Back to top
View user's profile Send e-mail Visit poster's website
bharris



Joined: 24 Aug 2009
Posts: 1
Location: Mesquite, TX

PostPosted: Mon Aug 24, 2009 3:53 pm    Post subject: Reply with quote

The virtual textures in idTech5 actually are sparse. Any pages which aren't used are not even stored on disk. There are the obvious non-used pages (mapping a bunch of non-squares to a square will often create wasted space), but we also use a technique that finds pages which can never be seen during game play (such as the back side of a crate against a wall) and toss those pages out, too.

That being said, in idTech5, they are simply called "virtual textures"
Back to top
View user's profile
AndyFirth



Joined: 06 Sep 2008
Posts: 74
Location: Sammamish, Wa

PostPosted: Tue Aug 25, 2009 2:04 pm    Post subject: Reply with quote

one of these days i'm hoping to get a week or two to play around with this stuff... been reading on here for a while and it sounds interesting and useful.

ah... maybe ... one day... i'll get a week to myself.
_________________
Andy Firth : Engineer Architect, Bungie
Back to top
View user's profile
Display posts from previous:   
Post new topic Reply to topic    Molly Rocket Forum Index -> Sparse Virtual Texturing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Molly Rocket topic RSS feed 
Molly Rocket topic RSS feed 
Molly Rocket topic RSS feed, first posts only 


Powered by phpBB © 2001, 2005 phpBB Group