Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

MegaTexturing?

Discussion in 'General Discussion' started by thylaxene, May 16, 2006.

  1. thylaxene

    thylaxene

    Joined:
    Oct 10, 2005
    Posts:
    716
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    The way I see it is: it's some kind of caching/paging system for the textures. I.e. your source texture data might be 5GB in size (the size reported in some other interview; that's after some compression), and the hardware does not really support 32000x32000 textures, so instead you stream and page in blocks of source texture "on demand".

    I believe this can't be done with just shader code - at least there has to be some code that predicts what chunks of the texture will be needed soon; page out unused chunks and page in the new chunks. Then it's basically a fragment program that lookups the right chunk based on texture coordinates.

    The real question is not the technology I guess - the real question is how do you actually create this 32000x32000 texture! I guess Photoshop or other conventional tools are not really good at these sizes, right?
     
  3. thylaxene

    thylaxene

    Joined:
    Oct 10, 2005
    Posts:
    716
    I've had to recently produce an image that was 80k x 40k pixels for a print job for a client... (with layers!) in PS CS2 so it is very possible. Tell you what, you figure out the algorithm to produce mega-texturing in Unity and I'll produce the 32kx32k images for ya! LOL :wink:

    Yes in the interview he does mention source code for the tiling/streaming code, and about 1 page of code for the fragment program.... gets one thinking no?

    Cheers.
     
  4. thylaxene

    thylaxene

    Joined:
    Oct 10, 2005
    Posts:
    716
    one way and off the top of my head for creating the texturing would be to create the terrain mesh in your 3d app, create the UV map, export the wireframe UV map as a reference, run that raster image through a raster2vector app, assuming your 3D app doesn't export a vector based version of your UV wireframe reference. Bring that vector into PS and scale up to 32k x 32k, get lots or RAM some coffee and a wacom tablet and paint away, save out lo-res tests images so you can test it on your terrain model. Then again they probably just ran the full res image through their engine for testing the look and feel of the map.

    cheers.
     
  5. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Yes. It's quite moderate fragment program. But he does not mention how large is the streaming/tiling code, which I bet is a lot more than 1 page :)
     
  6. thylaxene

    thylaxene

    Joined:
    Oct 10, 2005
    Posts:
    716
    no i suspect not! :wink: