Home Technical Talk

Realtime PTEX Applications

polycounter lvl 7
Offline / Send Message
Computron polycounter lvl 7
So, when will we start seeing PTEX type texturing methods in realtime applications such as games? It is open source so I imagine its adoption would be quick, but is there any technical explanation why after 3+ years it is still not widespread? What are the pros and cons for PTEX?

Replies

  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Hardware for one, even if AMD clams the next Xbox will be capable of Avatar quality rendering with it's uber GPU and CPU, you have to remember that we need to equal spread out resources across on a screen, especially ingame. Besides, we still have the potential of shaders to tap in.

    In the case of scientific procedural applications, such as human anatomy 3D encyclopedia, I don't see why not.
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    Everyone keeps citing hardware, but what specific problem needs to be overcome? It renders everything in one draw call, it can even call spec and normals from the same file and it supposedly takes the same amount of ram, so what am I missing. It seams the benefits are huge and roadblocks are minimal, or am I overlooking something?

    Btw, in sure someone will say there is no support for 2d photo editing softwares, but what if you used a hybrid of PTEX and UVs for the parts that need some photoshopping?
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    I guess you'll see Ptex textures in games as soon as you'll be able to make a lasso selection on a Ptex texture in Photoshop :D
  • equil
    Options
    Offline / Send Message
    someone needs to come up with a gpu implementation that doesn't generate seams on every triangle, ups the vertex count by 3-5 times or uses up half the texture space on padding before anyone will want to deal with it.

    some guy is gonna present Per-Face Texture Mapping for Real-Time Rendering during the next siggraph, so who knows what will happen. But the industry isn't really asking for a replacement for uvs. they're overall the most practical solution for texturing we have.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Ninja'd by Equil.

    You also need to remember that many 3D painting tools are still minimalistic. The best thing we have currently is Mudbox, but even that lacks the more 'simple but effective' tools that Pior pointed out.

    The only thing I can imagine is using PTex alongside Photoshop with a sorts of projections mapping method, but that will take simply too long for a single asset.

    Also, while todays hardware is very capable of doing PTex in real-time, having a complex scene which weighs in 700K polies, with different light maps, normals and shaders codes, PTex will simply interfere with the pipeline. It's not feasible on such a scale. Besides, if your game is going on consoles, there is the life span to think about.

    Fun-Fact: If you look closely in Pixar movies, you will see that they'll Ptex 'here and there' sparingly...
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    Virtual Texturing is already used in Rage and probably going to catch on very quickly now. Its good if you have a generic game with static environments which describes anything mainstream these days. Virtual Texturing gives you the power of having high resolution textures with 100% uniqueness that apparently is what people like about "ptex", but in a way that is realtime friendly. ptex is kind of like nurbs, it doesnt make sense for real time rendering.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Hey Keen, do you by chance have a link where I could read up on VT? I tried accessing the PDF files on the official papers, but they all seem to be offline.
  • equil
  • Entity
    Options
    Offline / Send Message
    Entity polycounter lvl 18
    Ptex is still new, and even pixar use it sparingly. Uv tools are getting better everyday and in most cases photoshop is still the most convenient tool for quick texturing
  • oglu
    Options
    Offline / Send Message
    oglu polycount lvl 666
    ptex is bound to the vertex ID of the object... so every object needs its own ptex file... if you change the vertex order the ptex file is gone... i would say that is not working for games...
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    Disclaimer: I'm just a curious beginner, don't crucify me if my question seems dumb.
    equil wrote: »
    someone needs to come up with a gpu implementation that doesn't generate seams on every triangle, ups the vertex count by 3-5 times or uses up half the texture space on padding before anyone will want to deal with it.

    Don't PTex's adjacency tables eliminate seams entirely? I don't quite understand the part about padding, I was under the impression that PTex had NO PADDING and only stored the necessary texels because it doesn't need to blend pixels based on flattened UV islands, but rather adjacency tables. correct me if I am wrong please.
    Virtual Texturing is already used in Rage and probably going to catch on very quickly now. Its good if you have a generic game with static environments which describes anything mainstream these days. Virtual Texturing gives you the power of having high resolution textures with 100% uniqueness that apparently is what people like about "ptex", but in a way that is realtime friendly. ptex is kind of like nurbs, it doesnt make sense for real time rendering.

    I dont see how the two are related, VT allows comletely unique textures, while PTex can remove the need for UVs, and some of the problems caused by UVs. VT is entirely independant from texel layout methods. How does PTex "give you the power of having high resolution textures with 100% uniqueness?" What aspects don't make sense for real time? Mudbox renders it in realtime, and there is that one siggraph talk coming soon that another polycounter mentioned.

    oglu wrote: »
    ptex is bound to the vertex ID of the object... so every object needs its own ptex file... if you change the vertex order the ptex file is gone... i would say that is not working for games...

    But when would you change the vertex ID? for example adding/removing topology? Im sure that is a kink that can be worked out.


    Earlier I proposed a hybrid system for texturing where certain objects could use uvs, and others use PTex. If you require the use of photoshop on a certain element of an object you could always temporarily unwrap just that element for 2d manipulation but it could still be stored as PTex so you could still have it's benefits.
  • oglu
    Options
    Offline / Send Message
    oglu polycount lvl 666
    you cant use the ptex if youn are using LOD for your object... or if you are like to reuse a texture for different objects and so on...
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    AFAIK, Ptex uses nearest point sampling and don't mess with filtering issues. Using filtering+adjacency tables would cost a lot of ressources for real time + you lose the editing in a 2d software and all the tricks you can do there.
    It gets rid of unfolding uv's, yeah, but 3d painting is already used with UV.
    But that thing in Rage, oh yeah !
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    IDtech 5 is amazing for sure, history in the making just like all other IDtech engines.

    Never thought about lods, that's a good point. I guess it also depends on the type of LODs you are doing since PTex does support subdivision as well as mip-mapping.

    Either way it seems to me like this would be a next gen type of thing rather than ps360.
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    Well the reason ptex removes the need for uvs is because it auto unwraps, and only does it nicely when working with quads, any software could easily auto unwrap your model. The concept of 3d painting is what really removes the need for manual uv layout, unfortunately there arent really any good tools for 3d painting yet.
  • Mark Dygert
    Options
    Offline / Send Message
    Yea I really don't see ptex taking off in the realtime environment. I see it being useful in that you don't need to worry about unwrapping your highpoly mesh to start applying materials to it, which is helpful if you're baking more than just normal maps derived from geometry.

    It's mostly been used in film where there isn't a demand for super detailed images. It works on Disney films because large sections of the material are flat color with sporadic detail. Sure you can push it harder but I just don't seeing it as being able to cover a lot of surfaces in games all that well.
  • Bibendum
    Options
    Offline / Send Message
    It massively inflates the vertex count of your scene with the only real advantage being that you can paint seamlessly in 3D without having to unwrap anything. With the biggest drawback being that your texture becomes basically uneditable in photoshop (although as I understand it 3DCoat will let you go back and forth between UV sets so that you can edit it easily but then you're UVing your model again which begs the question, why use PTex?)

    It is not true that Ptex doesn't waste texture space. Unless when you unwrap every polygon in your model, it happens to all fit perfectly in a power of 2 texture. Which is very unlikely.

    Since seams and stretching are largely unnoticeable in a properly uv'd/textured model, you're really weighing whether or not it is worth the performance drop and limiting your ability to edit the texture just so you don't have to unwrap anything and I think in most cases the answer is simply no.

    Pointing to Mudbox isn't a very good example, I can get several million polygon models in 3ds max, fully editable in realtime. That doesn't mean I should start using them in game.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    Yeah it's true that, weirdly, there's no ultimate tool for 3d painting. Bodypaint is cool but you cant sculpt (assuming painting and sculpting at the same time is interesting), previewing a normal map is not real time, there's no curves, so on...
    Maybe the next effort from developpers will be on this. Mudbox or Zbrush, with full support of .psd
  • pthomas1172
    Options
    Offline / Send Message
    pthomas1172 polycounter lvl 10
    P-TEX has some "cons" but, 3d painting in games (stamping) seems to be the next big thing. Also LODs are probably going to be fazed out soon. just my 2 cents
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    I always find these kind of "tech dream" discussions to be quite funny. I don't want to sound like a downer or anything, but as Carmack himself mentionned it, a Megatexture approach makes sense for environments, but games characters and assets as they are at the moment look darn good already.

    Throwing Ptex-style tech in for standalone game assets can only mean less optimization, therefore less performance. I mean, it's so obvious once you have the experience of actually working with quality realtime assets. Controlling and adjusting things in 2D (AO layer blending, color corrections, and so on) is actually a big and important part of the job. 3D painting is very useful but you do need a regular UV-based texture pass, always.

    A push for better UV tools is the way to go - in conjunction with Ptex texturing of the source assets, with as many fancy stamps/projections as needed.
  • equil
    Options
    Offline / Send Message
    a more sensical option for real time applications would probably build on more detailed vertex color approaches instead of texture mapping (since you'd automatically get no seams, no texture coordinates, completely unique information and easy lod integration). I'm hoping we'll see something like Mesh Colors in the near future.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Sorry if this was mentioned already, but I believe to use ptex you need to have fully quad models which is not that popular in games right now. It's a big constraint and lends itself to subdivision modeling much better which is more expensive memory wise than just using triangulated meshes with lod's. We did a test a couple years back and took one of our car models and rotoscoped a subdivision version of it. It was substantially more memory at level 0 than the original and looked worse due to the lack of hard edges and wasted polycount on edge loops.
Sign In or Register to comment.