Results 1 to 8 of 8

Thread: Loading texture from .raw format file

  1. #1
    Member Contributor
    Join Date
    Dec 2001
    Posts
    91

    Loading texture from .raw format file

    Hi All,

    I am trying to test my GL skills by remaking an old DirectX demo that used to be on the net called Trails (or Trails5) by a guy named Arne Gabriel.

    I think I can now duplicate most of the functionality in OpenGL but I can not load all the textures because some are in .raw format.

    I have read that .raw is actually not a defined standard so it is difficult to load from but I thought some of you might have suggestions on how I could interpret the texture data in the .raw files (maybe someone already has a raw loader that they would share).

    And yes, in case you are wondering I did attempt to ask Arne by email how the data was stored but I have never heard back.

    Any suggestions,
    jpummill

  2. #2
    Member Newbie
    Join Date
    Nov 2002
    Posts
    39

    Re: Loading texture from .raw format file

    Have you checked that site : http://www.wotsit.org

    They have all kind of file format specification.

    Hope it helps.

    Claude

  3. #3
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    east norwalk, ct, usa
    Posts
    184

    Re: Loading texture from .raw format file

    I believe you are correct -- there is no official raw file format. It's just data stored in ascii format so you can look at it in a text editor.

    Anyone can make up their own "raw file format" is the way I always understood it. It's certainly not difficult to load -- on the contrary, since it's so easy to deal with text files, it's usually the first way beginners deal with graphics data in their test programs (well, for me it was/is anyway).

    What do these raw files you have look like in a text editor?

  4. #4
    Member Contributor
    Join Date
    Dec 2001
    Posts
    91

    Re: Loading texture from .raw format file

    I have already tried wotsit. There was a reference to .raw format but I believe that is where I saw information leading me to believe that .raw was not a well defined standard.

    If anyone is interested, here is a HEX dump from the beginning of the file.

    And thanks agian for your replies,
    jpummill
    -----------------------------------------------
    0000000 1077 6e13 100b 0766 680b 0905 026b 7208
    0000020 0a09 0d78 7f0c 0f11 1380 7b10 0e0f 107e
    0000040 830e 1212 188a 9016 1c1e 1f8d 8d1c 1c1f
    0000060 1c88 881b 1919 1a88 8b19 191a 1d87 861c
    0000100 2020 1f86 8922 2120 1e91 8d1e 1a1b 1a86
    0000120 821a 1b1a 1d7f 851e 1c1c 1889 8818 1a1b
    0000140 1d8a 911b 1e21 2190 8d1f 1e20 1f86 891d
    0000160 1d20 1f8c 851d 1b1f 1d7e 8318 191c 1b84
    0000200 8919 1b1d 1c86 871a 191b 1b8a 8819 191b
    0000220 1b85 8619 191c 1c84 831a 1719 1281 7d11
    0000240 0f10 0c74 730b 0b0d 0f76 800e 1013 127d
    0000260 7711 1113 167b 7f13 1818 1982 9017 191c
    0000300 1a81 761d 1c1b 1a73 7d1a 1919 1b83 7b1a
    0000320 1a19 166f 7818 1717 1678 6e16 1613 136b
    0000340 6d17 1712 116c 7213 1312 137e 7d15 1412
    0000360 1076 7a13 1310 0f74 6411 0c0a 0a74 7d0a
    0000400 0c0d 0f7d 760e 0d0f 0e73 6d0c 0b0c 0b70
    0000420 740a 0a0b 0b74 720a 0909 0875 7308 0907
    0000440 0877 790a 0908 0878 7409 0908 0876 7709
    0000460 0907 0875 7009 0909 0a7a 7a0a 090a 086b
    0000500 5b08 0605 055a 6806 0707 0a70 730a 0f0e
    0000520 1274 7912 1414 177f 8b16 191b 1c89 8819
    0000540 1a1c 1e89 8b1c 1b1e 1b83 7d1b 1a1a 1972
    0000560 7f1a 1a19 1678 6615 1010 1370 7913 1715
    0000600 1876 7919 1918 187e 7819 1a19 1972 671a
    0000620 1715 157c 7d15 1313 0f79 7b0f 0c0c 0c7c
    0000640 7d0b 0c0c 0a70 670b 0908 0861 6509 0908
    0000660 0a6d 6d0b 0c0a 095f 5c0a 0909 095e 730b
    0000700 100e 117d 7113 1311 1272 6c15 1412 1378
    0000720 7615 1714 156c 6f15 1615 1671 7116 1916
    0000740 1876 751a 1a19 1877 811b 1e1c 1970 681c
    0000760 1615 1880 7e19 1817 157b 7714 1212 0f6d
    0001000 750f 0f0f 0c6f 750e 0d0d 0c72 6e0c 0b0a
    0001020 096e 6a0a 0807 055a 5805 0505 086a 6b08
    0001040 0908 0769 6f08 0806 066e 6d07 0908 0b70
    0001060 700a 0d0e 117a 7d11 1313 127d 8214 1313
    0001100 127b 7c12 1414 1783 8d15 181b 1c8d 8d19
    0001120 191c 1b89 8317 1518 167f 8a13 1417 1481
    0001140 7b11 1012 1382 8310 1214 1581 8312 1214
    0001160 1077 7a10 0e0d 0d7f 820e 0f0f 0f7b 6b0e
    0001200 0f0d 0d6a 780e 110f 1080 8212 1111 107c
    0001220 8611 1312 117e 7712 1211 1179 7d11 1312
    0001240 0f75 7911 1110 147b 7e13 1111 1184 8412
    0001260 1312 137d 7614 1917 1876 801a 1a19 1987
    0001300 8319 1614 157c 8117 1816 1889 8518 1a19
    0001320 1881 8a19 1a1a 188f 8a19 1414 127d 7913
    0001340 1412 167b 8717 1b1a 1a7c 791e 1c19 1579
    0001360 8218 1613 1382 7c14 100e 0e77 7c0f 1311
    0001400 0d73 6912 3e3c 536d 6550 4849 456a 6e3f
    0001420 1110 016d 7403 0506 147b 7a12 414e 557f
    0001440 8247 4d5a 4c86 8941 1718 1a8a 8a19 1516
    0001460 3187 832b 525e 5d86 8b4f 5665 3c86 8435
    0001500 1c1a 1f7f 7d21 1d1b 4783 8244 545d 5a82
    0001520 8251 535a 2780 8726 1d1e 6ca7 a15d 5967
    0001540 61a1 a652 5565 67a6 a355 5665 629a 9d57
    0001560 5662 68a5 a958 5a69 68a8 9e59 5562 5e99
    0001600 a351 5664 619e 9b56 5560 5f9c 9f53 5261
    0001620 619f a252 5564 63a1 9d57 5760 64a2 9f55
    0001640 5561 5e9b 9251 4d57 5797 a24a 4b5a 59a0
    0001660 974d 4955 5591 994a 505b 5794 a04d 4f5c
    0001700 5a95 8e59 585c 5888 9354 4f58 5999 934f
    0001720 4e55 518a 904f 5056 5895 8c4d 4b53 5590
    0001740 9352 5156 508a 8c4b 4e52 599a 8c53 4c51
    0001760 4f8a 9049 4f53 4e7d 724d 4448 4875 8948
    0002000 4e4e 5393 934b 4554 518c 8944 4951 5490

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Loading texture from .raw format file

    I could be wrong, but aren't most raw image files just a direct dump of RGB data? I think that's the raw format that PhotoShop writes to, anyway. There is no information included such as dimensions of the image.

    But like I said, I could be wrong. It would be pretty easy to try and load that all as raw RGB data and see what it looks like, though.
    Deiussum
    Software Engineer and OpenGL enthusiast

  6. #6
    Member Contributor
    Join Date
    Dec 2001
    Posts
    91

    Re: Loading texture from .raw format file

    Photoshop can write to raw format???

    The Gimp can't do that! I may have to switch

  7. #7
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    east norwalk, ct, usa
    Posts
    184

    Re: Loading texture from .raw format file

    You may want to ask about this on the forums over at flipcode -- just let us know the answer if you find it.

  8. #8
    Member Contributor
    Join Date
    Dec 2001
    Posts
    91

    Re: Loading texture from .raw format file

    And the answer is??? PHOTOSHOP.

    At least for this type of .raw file. In fact, Photoshop even guessed the bit depth, and resolution even though there is no header.

    Pretty cool.

    Thanks guys for all the input,
    jpummill

Similar Threads

  1. txt file 2 NVIDIA scenegraph file format (.nbf)
    By Giancarlo in forum OpenGL: General
    Replies: 1
    Last Post: 07-20-2009, 06:37 PM
  2. Replies: 12
    Last Post: 05-25-2005, 12:42 PM
  3. texture file loading problem
    By idaydream in forum OpenGL: macOS
    Replies: 1
    Last Post: 10-17-2004, 07:47 AM
  4. Texture file format
    By imported_Rob in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 02-27-2001, 08:58 AM
  5. Replies: 5
    Last Post: 12-14-2000, 03:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean