TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 14 of 14

Thread: Multiple panoramic textures in one mission?

  1. #1
    Member
    Registered: May 2017
    Location: USA

    Multiple panoramic textures in one mission?

    Is it possible to have more than one panoramic texture in a single mission? By panoramic, I mean that the texture looks different depending on viewing angle, as if you are looking into a 3D space.

    I can't recall any missions having multiple panoramic textures (typically just a single sky), but I could be mistaken. In any event, is it possible?

  2. #2
    Member
    Registered: Jan 2012
    Location: Gèrmany
    Not sure if I understand you correctly but there can be for example two different skybox versions. Well actually more.

    You have use a dummy texture and an .mtl file render_pass...
    -> see material-formats.txt

  3. #3
    Member
    Registered: Jan 2001
    Location: Formby, NW England
    CoSaS Mission X used a set of huge objects to get around the DistantArt limitations. Their faces were flat but you can make whatever shape you want. An object that intersects sky-textured polys will still be rendered as long as its centre is in air/water.

  4. #4
    Member
    Registered: May 2017
    Location: USA
    So, I've figured out how to create a cubemap, and I think I understand how to use the render_pass{...} in the .mtl file. But how do I get Dark to recognize that a given texture is a cubemap? The material-format file explains that, for uv_source:

    PROJECTION - generate texture coords for camera projection mapping (when used with a cubemap it results in skybox behavior)
    Is there a special type of file that dark will recognize as a cubemap? Should I break the single cube map into 6 different textures, one for each face? If so, how do I tell dark to consider all of them as one cubemap? I poked around in the RES/fam/skyhw folder, and found that each sky was composed of 6 .pcx files, appended with n, s, e, w, t, and p. I'm guessing these reflect the North, South, East, West, Top and... uh, Pottum? sides of the cube. But there's no corresponding .mtl file so I can't see how they were put together into a single panorama.

    Is there a simple way to take any 6 textures, and render them like a skybox? (Obviously, whether it looks go will depend on how well the 6 textures work with each other, but for now I just want to make it WORK. Then I'll refine the faces).

  5. #5
    ZylonBane
    Registered: Sep 2000
    Location: ZylonBane
    Quote Originally Posted by trefoilknot View Post
    By panoramic, I mean that the texture looks different depending on viewing angle
    So... like all textures.

  6. #6
    Member
    Registered: May 2017
    Location: USA
    Um, no. Also, that's an incomplete quote. I said:

    Quote Originally Posted by trefoilknot View Post
    By panoramic, I mean that the texture looks different depending on viewing angle, as if you are looking into a 3D space (emphasis added).
    There are, of course, a number of ways in which a texture could look "different" depending on viewing angle, hence the clarification.

    Sorry you got confused, ZB! Better luck next time Fortunately, it seems the other commenters were able to discern my meaning, even though I didn't know the term 'cubemap' at the time of the initial posting.

    Also, if you know how to accomplish this, I'd be very grateful for any help you can provide! Further, if you are genuinely puzzled about what I'm asking, please let me know what aspect of my question is confusing to you, and I can try to clear it up.

  7. #7
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Fields of bluegrass
    I actually initially thought you meant distant art, which is much more commonly used than skyboxes. But either way, I don't know how you can change it dynamically mid-mission unless something in kdscript can do it.

  8. #8
    Member
    Registered: May 2017
    Location: USA
    I'm not looking to change it dynamically. I just want to use different cubemap textures in different areas of the mission. Is this easier to accomplish?
    Last edited by trefoilknot; 19th Feb 2018 at 00:02.

  9. #9
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Fields of bluegrass
    How is that not changing it dynamically? You have one skybox or NewSky for an entire mission, and can't change it at runtime or in different areas etc.

  10. #10
    Member
    Registered: May 2017
    Location: USA
    Well, if you're only allowed to have one cubemap texture per mission, then I suppose to answer to my initial question is simply: "no."

    I'm still not convinced this is the case though. The materials-format file makes it seem doable with a render_pass, I just can't figure out how to get a texture to behave as a cube-map. Moreover, aren't reflective surfaces achieved with cubemaps?

  11. #11
    Member
    Registered: Jan 2012
    Location: Gèrmany
    And of course it's possible.
    I wasn't a big help, guess what I did - I deleted my working test textures a few weeks ago

    But I found something I posted elsewhere

    Code:
    render_material_only
    render_pass
    {
      texture "tex\envmaps\Dskybox"
      uv_source PROJECTION
    }
    The 'trick' is that the cubemap is one file with the 6 sides as six different layers.

    I don't remember much more about creating such a file but still I there are two important tips:
    • GIMP dds plugin -> Save as cube map
    http://www.ttlg.com/forums/showthread.php?t=141820 also check out what kdau's plugin is actually doing.

    --------------------
    And then by using local envtex you should be able to control it via kdscript OR swap the dummy texture via NVTextureTrap/TrapTexture
    Last edited by Daraan; 19th Feb 2018 at 04:13.

  12. #12
    Member
    Registered: May 2017
    Location: USA
    Thanks Daraan! I'll see what I can do

  13. #13
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Fields of bluegrass
    That's amazing, I had no idea that was possible to do on the skybox, although I suspected KDscript would be involved if it were possible.

  14. #14
    ZylonBane
    Registered: Sep 2000
    Location: ZylonBane
    Quote Originally Posted by trefoilknot View Post
    Well, if you're only allowed to have one cubemap texture per mission, then I suppose to answer to my initial question is simply: "no."
    He said you can only have one skybox per mission, not one cubemap.

    Quote Originally Posted by Yandros View Post
    That's amazing, I had no idea that was possible to do on the skybox, although I suspected KDscript would be involved if it were possible.
    It's not possible to do that to the skybox. What you do is apply a custom texture where you would normally use skyhack, then use a MTL to apply a cubemap to that texture with skybox-like rendering. But it's not actually the skybox as far as Dark is concerned. IIRC this is how TFix got the "space room" in The Sword to look correct under NewDark.

    Cubemap skyboxes are rather memory-hungry though, requiring six rather high-res bitmaps (or just five if the player will never see the bottom). Definitely a good use case for DDS textures.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •