Jump to content
COMBATSIM Forum

Recommended Posts

Those billboarding lights already look spectacular, like oilrig for example. So, there are still unknown aspects regarding this?

I'd also be happy with information on program invariants that help me optimize buffer sizes for example:

  • the highest vertex index ever written in any model
  • The highest number of vertices in a single polygon instruction (002E, 002F, 0047, 0088, 008E and the like)

Do you still want this info? If so, I'll modify my scanner to to do it.

I would already guess that the biggest model is f22usa1 (or similar) and the highest number of vertices in a single polygon is one of the 0004 lines from an ianXX.3 file.

Link to post
Share on other sites
  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Those billboarding lights already look spectacular, like oilrig for example. So, there are still unknown aspects regarding this?

Didn't notice them on the oilrig before :) No, nothing unknown, but it substantiates my suspicion that many of the point instructions we see are actually sprites.

Do you still want this info? If so, I'll modify my scanner to to do it.

I would already guess that the biggest model is f22usa1 (or similar) and the highest number of vertices in a single polygon is one of the 0004 lines from an ianXX.3 file.

Okay; f22usa1.3 uses 692 positions simultaneously; so I'll allocate 1024, which should be enough for anything.

The ian_* files use up to nine vertices per polygon; so I'll limit it to 16.

Link to post
Share on other sites

When analyzing the bytecode, I also noticed that many lights are drawn in their own subroutine — more specifically, a 004B draw staring submesh subroutine. (This is the one used for pilots to always look at you). This implies that the "large" lights are not actually points, but flat-shaded sprites; quads (with a size given in pixels?) which always face the viewer. Probably the same sprites as used for spheres (spheres are used as lights in the KC-135).

Therefore, we should identify which instructions are used inside of 004B subroutines (which do nothing but write vertices, colors, and render one light) exclusively. These must be handled as sprites; the others must be handled as points. The ref_*.3 files should be a good start as they have hundreds of lights inside.

You could even do this with the viewer; it should be easy to spot in the indentation. I was already on it, but then the whole seperate-XYZ-buffers thing kicked in and I've lost the thread :)

I've been looking at 004a, and this also appears to be related to lights, by maybe fixing a vertex position like for those pylon points.

Here's an example from brk90.3:

0596; 0062001e000000000000    ; Vertex :30  X=0  Y=0  Z=0

0597; 0075001e    ;

0598; 004a001e    ;

0599; 004b00030004    ; If 004b flag set, jump to line 601

0600; 0000    ;

0601; 004a001e    ;

0602; 009600070090001e    ;

0603; 0000    ;

Link to post
Share on other sites

OT

Trying to get the viewer up and running. Recently received all the parts for a custom build for this project. All of the anticipated compatibility problems are solved, however, the unanticipated problems have been a challenge. I requested support from Newegg who tried but deferred to Seagate who, after a long session, deferred to Asrock :angry:

Do any of you have a non-OS-bundled software program which will partition and format an SATAII HDD?

Link to post
Share on other sites

Not sure what you're trying to do...Can't you just boot from your Windows CD/DVD and let it sort itself out.

Windows does a check on the system then stalls, the problem is thought to be the SATA drivers not installing because of a bug with the Asrock installation disk, no response yet from Asrock. If I can get the HDD partitioned and formatted I can work around the problem.

Link to post
Share on other sites

Here's the current build, with the two-coordinate model:

http://www.mediafire.com/?2wdnnl598a6xd24

I had to raise the call stack limit to 48 routines because of 0007. We know if we don't treat 0007 as a call, several parts of the F-22 and of missiles will not be rendered. On the other hand, parachute models won't be rendered properly if we treat it as a call, and files like marib2.3 seem strange to me:

 0093 jump 4 B if ??? (true)

 0027 jump 8 B if distance is above 6000 (false)

 007B jump 4 B if ??? (true)

 0076 jump 4 B if ??? (true)

 0008 call 8 B

  0062 write XYZ #0: -1024 -80 -1024

  0064 write XYZ #1 with X delta: 512 -80 -1024

  0066 write XYZ #2 with Z delta: 512 -80 1024

  0064 write XYZ #3 with X delta: -1024 -80 1024

  0069 write XYZ #4 with YZ delta: -1024 0 -512

  0064 write XYZ #5 with X delta: 1024 0 -512

  0066 write XYZ #6 with Z delta: 1024 0 0

  0064 write XYZ #7 with X delta: -1024 0 0

  0064 write XYZ #8 with X delta: -512 0 0

  0064 write XYZ #9 with X delta: 0 0 0

  0066 write XYZ #10 with Z delta: 0 0 -399

  0066 write XYZ #11 with Z delta: 0 0 512

  0064 write XYZ #12 with X delta: -1024 0 512

  0064 write XYZ #13 with X delta: 1024 0 512

  0068 write XYZ #14 with XZ delta: -512 0 -576

  0066 write XYZ #15 with Z delta: -512 0 448

  0068 write XYZ #16 with XZ delta: 512 0 -420

  0066 write XYZ #17 with Z delta: 512 0 561

  0066 write XYZ #18 with Z delta: 512 0 0

  0069 write XYZ #19 with YZ delta: 512 -1000 -512

  0064 write XYZ #20 with X delta: -512 -1000 -512

  0066 write XYZ #21 with Z delta: -512 -1000 512

  0064 write XYZ #22 with X delta: 512 -1000 512

  0068 write XYZ #23 with XZ delta: 0 -1000 0

  0069 write XYZ #24 with YZ delta: 0 -105 -1024

  0064 write XYZ #25 with X delta: -512 -105 -1024

  0066 write XYZ #26 with Z delta: -512 -105 1024

  0064 write XYZ #27 with X delta: 0 -105 1024

  0067 write XYZ #28 with XY delta: 1024 -75 1024

  0066 write XYZ #29 with Z delta: 1024 -75 -1024

  0061 transform XYZ 0-30)

  0015 jump 12 B if triangle 23-6-7 is invisible (false)

  0008 call 48 B

   0015 jump 12 B if triangle 23-24-27 is invisible (true)

   0008 call 278 B

    0015 jump 12 B if triangle 19-5-10 is invisible (false)

    0008 call 18 B

     0015 jump 12 B if triangle 19-1-18 is invisible (true)

     0008 call 230 B

      0027 jump 888 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 161/160 191/191 167/191

      002F draw textured polygon: 16-29-1

      002E write polygon UV: texture 0; 191/191 161/160 191/167

      002F draw textured polygon: 29-16-5

      0000 return

     0008 call 162 B

      0027 jump 932 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 143/167 167/191 143/191

      002F draw textured polygon: 10-1-24

      002E write polygon UV: texture 0; 167/191 143/167 161/160

      002F draw textured polygon: 1-10-16

      0000 return

     0000 return

    0008 call 44 B

     0015 jump 12 B if triangle 19-1-18 is invisible (true)

     0008 call 456 B

      0027 jump 712 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 167/143 191/167 161/160

      002F draw textured polygon: 18-5-16

      002E write polygon UV: texture 0; 191/167 167/143 191/143

      002F draw textured polygon: 5-18-6

      0000 return

     0008 call 388 B

      0027 jump 756 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 143/143 161/160 143/167

      002F draw textured polygon: 9-16-10

      002E write polygon UV: texture 0; 161/160 143/143 167/143

      002F draw textured polygon: 16-9-18

      0000 return

     0000 return

    0000 return

   0008 call 184 B

    0015 jump 12 B if triangle 20-10-4 is invisible (false)

    0008 call 18 B

     0015 jump 12 B if triangle 20-25-8 is invisible (true)

     0008 call 192 B

      0027 jump 976 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 143/167 119/191 119/158

      002F draw textured polygon: 10-25-14

      002E write polygon UV: texture 0; 119/191 143/167 143/191

      002F draw textured polygon: 25-10-24

      0000 return

     0008 call 124 B

      0027 jump 1020 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 119/158 96/191 96/167

      002F draw textured polygon: 14-0-4

      002E write polygon UV: texture 0; 96/191 119/158 119/191

      002F draw textured polygon: 0-14-25

      0000 return

     0000 return

    0008 call 44 B

     0015 jump 12 B if triangle 20-25-8 is invisible (true)

     0008 call 418 B

      0027 jump 800 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 143/143 119/158 119/143

      002F draw textured polygon: 9-14-8

      002E write polygon UV: texture 0; 119/158 143/143 143/167

      002F draw textured polygon: 14-9-10

      0000 return

     0008 call 350 B

      0027 jump 844 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 119/143 96/167 96/143

      002F draw textured polygon: 8-4-7

      002E write polygon UV: texture 0; 96/167 119/143 119/158

      002F draw textured polygon: 4-8-14

      0000 return

     0000 return

    0000 return

   0000 return

  0008 call 14 B

   0015 jump 12 B if triangle 23-24-27 is invisible (true)

   0008 call 128 B

    0015 jump 12 B if triangle 22-13-11 is invisible (true)

    0008 call 38 B

     0015 jump 12 B if triangle 22-18-2 is invisible (true)

     0008 call 1148 B

      0027 jump 360 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 191/96 167/123 167/96

      002F draw textured polygon: 28-17-2

      002E write polygon UV: texture 0; 167/123 191/96 191/119

      002F draw textured polygon: 17-28-13

      0000 return

     0008 call 1080 B

      0027 jump 404 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 167/96 143/124 143/96

      002F draw textured polygon: 2-11-27

      002E write polygon UV: texture 0; 143/124 167/96 167/123

      002F draw textured polygon: 11-2-17

      0000 return

     0000 return

    0008 call 4 B

     0015 jump 12 B if triangle 22-18-2 is invisible (true)

     0008 call 922 B

      0027 jump 536 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 191/119 167/143 167/123

      002F draw textured polygon: 13-18-17

      002E write polygon UV: texture 0; 167/143 191/119 191/143

      002F draw textured polygon: 18-13-6

      0000 return

     0008 call 854 B

      0027 jump 580 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 167/123 143/143 143/124

      002F draw textured polygon: 17-9-11

      002E write polygon UV: texture 0; 143/143 167/123 167/143

      002F draw textured polygon: 9-17-18

      0000 return

     0000 return

    0000 return

   0008 call 34 B

    0015 jump 12 B if triangle 21-11-12 is invisible (true)

    0008 call 38 B

     0015 jump 12 B if triangle 21-8-26 is invisible (true)

     0008 call 1110 B

      0027 jump 448 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 119/96 143/124 119/119

      002F draw textured polygon: 26-11-15

      002E write polygon UV: texture 0; 143/124 119/96 143/96

      002F draw textured polygon: 11-26-27

      0000 return

     0008 call 1042 B

      0027 jump 492 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 96/96 119/119 96/119

      002F draw textured polygon: 3-15-12

      002E write polygon UV: texture 0; 119/119 96/96 119/96

      002F draw textured polygon: 15-3-26

      0000 return

     0000 return

    0008 call 4 B

     0015 jump 12 B if triangle 21-8-26 is invisible (true)

     0008 call 884 B

      0027 jump 624 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 119/119 143/143 119/143

      002F draw textured polygon: 15-9-8

      002E write polygon UV: texture 0; 143/143 119/119 143/124

      002F draw textured polygon: 9-15-11

      0000 return

     0008 call 816 B

      0027 jump 668 B if distance is above 6000 (false)

      002E write polygon UV: texture 0; 96/119 119/143 96/143

      002F draw textured polygon: 12-8-7

      002E write polygon UV: texture 0; 119/143 96/119 119/119

      002F draw textured polygon: 8-12-15

      0000 return

     0000 return

    0000 return

   0000 return

  0000 return

 0008 call 1944 B

  0027 jump 2262 B if distance is above 6000 (false)

  0062 write XYZ #30: 1024 0 50

  006D write XYZ #25 with Z delta: 1024 0 -49

  006B write XYZ #31 with X delta: 750 0 -49

  006D write XYZ #14 with Z delta: 750 0 -159

  006F write XYZ #32 with XZ delta: 800 0 -29

  006D write XYZ #4 with Z delta: 800 0 -129

  006B write XYZ #33 with X delta: 600 0 -129

  006D write XYZ #5 with Z delta: 600 0 -279

  006B write XYZ #7 with X delta: 550 0 -279

  006D write XYZ #34 with Z delta: 550 0 -139

  0064 write XYZ #35 with X delta: 450 0 -139

  006D write XYZ #9 with Z delta: 450 0 -249

  006B write XYZ #16 with X delta: 650 0 -249

  006D write XYZ #36 with Z delta: 650 0 -109

  0068 write XYZ #37 with XZ delta: 300 0 -39

  006D write XYZ #12 with Z delta: 300 0 -169

  006F write XYZ #38 with XZ delta: 200 0 20

  006D write XYZ #11 with Z delta: 200 0 -129

  006F write XYZ #39 with XZ delta: 99 0 90

  0068 write XYZ #40 with XZ delta: 49 0 100

  0064 write XYZ #41 with X delta: 0 0 100

  006D write XYZ #26 with Z delta: 0 0 -50

  006B write XYZ #42 with X delta: -1024 0 -50

  0066 write XYZ #43 with Z delta: -1024 0 49

  0064 write XYZ #44 with X delta: -250 0 49

  0066 write XYZ #45 with Z delta: -250 0 159

  0068 write XYZ #46 with XZ delta: -300 0 189

  0066 write XYZ #47 with Z delta: -300 0 69

  0064 write XYZ #48 with X delta: -900 0 69

  0064 write XYZ #49 with X delta: -700 0 69

  0066 write XYZ #50 with Z delta: -700 0 169

  0068 write XYZ #51 with XZ delta: -550 0 249

  0064 write XYZ #52 with X delta: -350 0 249

  0066 write XYZ #53 with Z delta: -350 0 109

  0064 write XYZ #54 with X delta: -150 0 109

  006D write XYZ #28 with Z delta: -150 0 -10

  006B write XYZ #55 with X delta: -850 0 -10

  0066 write XYZ #56 with Z delta: -850 0 89

  0068 write XYZ #57 with XZ delta: -400 0 279

  0066 write XYZ #58 with Z delta: -400 0 129

  0064 write XYZ #59 with X delta: -600 0 129

  0066 write XYZ #60 with Z delta: -600 0 229

  006F write XYZ #24 with XZ delta: 950 0 -59

  006B write XYZ #3 with X delta: 50 0 -59

  006F write XYZ #29 with XZ delta: 850 0 -89

  006D write XYZ #61 with Z delta: 850 0 10

  0068 write XYZ #62 with XZ delta: 900 0 30

  006D write XYZ #1 with Z delta: 900 0 -69

  006B write XYZ #63 with X delta: 700 0 -69

  006B write XYZ #13 with X delta: 100 0 -69

  006F write XYZ #64 with XZ delta: 400 0 -119

  006D write XYZ #18 with Z delta: 400 0 -229

  006F write XYZ #65 with XZ delta: 500 0 -149

  006D write XYZ #8 with Z delta: 500 0 -269

  006F write XYZ #6 with XZ delta: 350 0 -209

  006D write XYZ #66 with Z delta: 350 0 -89

  006B write XYZ #17 with X delta: 150 0 -89

  006F write XYZ #67 with XZ delta: 149 0 70

  006F write XYZ #15 with XZ delta: 250 0 -149

  006D write XYZ #68 with Z delta: 250 0 -9

  006F write XYZ #10 with XZ delta: 700 0 -189

  006F write XYZ #69 with XZ delta: -50 0 99

  0064 write XYZ #70 with X delta: -100 0 99

  006F write XYZ #2 with XZ delta: -99 0 -30

  006B write XYZ #71 with X delta: -900 0 -30

  0068 write XYZ #72 with XZ delta: -200 0 29

  0066 write XYZ #73 with Z delta: -200 0 139

  0064 write XYZ #74 with X delta: -450 0 139

  0064 write XYZ #75 with X delta: -550 0 139

  0068 write XYZ #76 with XZ delta: -950 0 59

  0066 write XYZ #77 with Z delta: -950 0 -40

  006B write XYZ #27 with X delta: -49 0 -40

  006F write XYZ #78 with XZ delta: -650 0 209

  0066 write XYZ #79 with Z delta: -650 0 109

  0068 write XYZ #80 with XZ delta: -500 0 269

  0066 write XYZ #81 with Z delta: -500 0 149

  0064 write XYZ #82 with X delta: -750 0 149

  0066 write XYZ #83 with Z delta: -750 0 49

  0068 write XYZ #84 with XZ delta: -800 0 129

  0066 write XYZ #85 with Z delta: -800 0 29

  0068 write XYZ #86 with XZ delta: 950 0 40

  0068 write XYZ #87 with XZ delta: -450 0 279

  0075 mark spawn position 1024 0 50

  0075 mark spawn position 1024 0 -49

  0075 mark spawn position 750 0 -49

  0075 mark spawn position 750 0 -159

  0075 mark spawn position 800 0 -29

  0075 mark spawn position 800 0 -129

  0075 mark spawn position 600 0 -129

  0075 mark spawn position 600 0 -279

  0075 mark spawn position 550 0 -279

  0061 transform XYZ 34-36)

  0075 mark spawn position 450 0 -249

  0075 mark spawn position 650 0 -249

  0061 transform XYZ 36-38)

  0075 mark spawn position 300 0 -169

  0075 mark spawn position 200 0 20

  0075 mark spawn position 200 0 -129

  0061 transform XYZ 39-42)

  0075 mark spawn position 0 0 -50

  0061 transform XYZ 42-55)

  0075 mark spawn position -150 0 -10

  0061 transform XYZ 55-61)

  0075 mark spawn position 950 0 -59

  0075 mark spawn position 50 0 -59

  0075 mark spawn position 850 0 -89

  0061 transform XYZ 61-63)

  0075 mark spawn position 900 0 -69

  0075 mark spawn position 700 0 -69

  0075 mark spawn position 100 0 -69

  0075 mark spawn position 400 0 -119

  0075 mark spawn position 400 0 -229

  0075 mark spawn position 500 0 -149

  0075 mark spawn position 500 0 -269

  0075 mark spawn position 350 0 -209

  0075 mark spawn position 350 0 -89

  0075 mark spawn position 150 0 -89

  0075 mark spawn position 149 0 70

  0075 mark spawn position 250 0 -149

  0075 mark spawn position 250 0 -9

  0075 mark spawn position 700 0 -189

  0061 transform XYZ 69-71)

  0075 mark spawn position -99 0 -30

  0061 transform XYZ 71-78)

  0075 mark spawn position -49 0 -40

  0061 transform XYZ 78-88)

  0047 write polygon UV: texture 51; 192/0 255/0 255/31 192/31

  008E draw textured polygon: 30-25-24-86

  0007 draw submesh at 4 B if ??? (true)

   0047 write polygon UV: texture 51; 192/32 255/32 255/63 192/63

   008E draw textured polygon: 86-24-1-62

   0007 draw submesh at 4 B if ??? (true)

    0047 write polygon UV: texture 51; 192/64 255/64 255/95 192/95

    008E draw textured polygon: 62-1-29-61

    0007 draw submesh at 4 B if ??? (true)

     0047 write polygon UV: texture 51; 192/96 255/96 255/127 192/127

     008E draw textured polygon: 61-29-4-32

     0007 draw submesh at 4 B if ??? (true)

      0047 write polygon UV: texture 51; 192/128 255/128 255/159 192/159

      008E draw textured polygon: 32-4-14-31

      0007 draw submesh at 4 B if ??? (true)

       0047 write polygon UV: texture 51; 192/160 255/160 255/191 192/191

       008E draw textured polygon: 31-14-10-63

       0007 draw submesh at 4 B if ??? (true)

        0047 write polygon UV: texture 51; 192/0 255/0 255/31 192/31

        008E draw textured polygon: 63-10-16-36

        0007 draw submesh at 4 B if ??? (true)

         0047 write polygon UV: texture 51; 192/32 255/32 255/63 192/63

         008E draw textured polygon: 36-16-5-33

         0007 draw submesh at 4 B if ??? (true)

          0047 write polygon UV: texture 51; 192/64 255/64 255/95 192/95

          008E draw textured polygon: 33-5-7-34

          0007 draw submesh at 4 B if ??? (true)

           0047 write polygon UV: texture 51; 192/96 255/96 255/127 192/127

           008E draw textured polygon: 34-7-8-65

           0007 draw submesh at 4 B if ??? (true)

            0047 write polygon UV: texture 51; 192/128 255/128 255/159 192/159

            008E draw textured polygon: 65-8-9-35

            0007 draw submesh at 4 B if ??? (true)

             0047 write polygon UV: texture 51; 192/160 255/160 255/191 192/191

             008E draw textured polygon: 35-9-18-64

             0007 draw submesh at 4 B if ??? (true)

              0047 write polygon UV: texture 51; 192/0 255/0 255/31 192/31

              008E draw textured polygon: 64-18-6-66

              0007 draw submesh at 4 B if ??? (true)

               0047 write polygon UV: texture 51; 192/32 255/32 255/63 192/63

               008E draw textured polygon: 66-6-12-37

               0007 draw submesh at 4 B if ??? (true)

                0047 write polygon UV: texture 51; 192/64 255/64 255/95 192/95

                008E draw textured polygon: 37-12-15-68

                0007 draw submesh at 4 B if ??? (true)

                 0047 write polygon UV: texture 51; 192/96 255/96 255/127 192/127

                 008E draw textured polygon: 68-15-11-38

                 0007 draw submesh at 4 B if ??? (true)

                  0047 write polygon UV: texture 51; 192/128 255/128 255/159 192/159

                  008E draw textured polygon: 38-11-17-67

                  0007 draw submesh at 4 B if ??? (true)

                   0047 write polygon UV: texture 51; 192/160 255/160 255/191 192/191

                   008E draw textured polygon: 67-17-13-39

                   0007 draw submesh at 4 B if ??? (true)

                    0047 write polygon UV: texture 51; 192/0 255/0 255/31 192/31

                    008E draw textured polygon: 39-13-3-40

                    0007 draw submesh at 4 B if ??? (true)

                     0047 write polygon UV: texture 51; 192/32 255/32 255/63 192/63

                     008E draw textured polygon: 40-3-26-41

                     0007 draw submesh at 4 B if ??? (true)

                      0047 write polygon UV: texture 51; 192/64 255/64 255/95 192/95

                      008E draw textured polygon: 41-26-27-69

                      0007 draw submesh at 4 B if ??? (true)

                       0047 write polygon UV: texture 51; 192/96 255/96 255/127192/127

                       008E draw textured polygon: 69-27-2-70

                       0007 draw submesh at 4 B if ??? (true)

                        0047 write polygon UV: texture 51; 192/128 255/128 255/159 192/159

                        008E draw textured polygon: 70-2-28-54

                        0007 draw submesh at 4 B if ??? (true)

                         0047 write polygon UV: texture 51; 192/160 255/160 255/191 192/191

                         008E draw textured polygon: 54-28-72-73

                         0007 draw submesh at 4 B if ??? (true)

                          0047 write polygon UV: texture 51; 192/0 255/0 255/31192/31

                          008E draw textured polygon: 73-72-44-45

                          0007 draw submesh at 4 B if ??? (true)

                           0047 write polygon UV: texture 51; 192/32 255/32 255/63 192/63

                           008E draw textured polygon: 45-44-47-46

                           0007 draw submesh at 4 B if ??? (true)

                            0047 write polygon UV: texture 51; 192/64 255/64 255/95 192/95

                            008E draw textured polygon: 46-47-53-52

                            0007 draw submesh at 4 B if ??? (true)

                             0047 write polygon UV: texture 51; 192/96 255/96 255/127 192/127

                             008E draw textured polygon: 52-53-58-57

                             0007 draw submesh at 4 B if ??? (true)

                              0047 write polygon UV: texture 51; 192/128 255/128 255/159 192/159

                              008E draw textured polygon: 57-58-74-87

                              0007 draw submesh at 4 B if ??? (true)

                               0047 write polygon UV: texture 51; 192/160 255/160 255/191 192/191

                               008E draw textured polygon: 87-74-81-80

                               0007 draw submesh at 4 B if ??? (true)

                                0047 write polygon UV: texture 51; 192/0 255/0 255/31 192/31

                                008E draw textured polygon: 80-81-75-51

                                0007 draw submesh at 4 B if ??? (true)

                                 0047 write polygon UV: texture 51; 192/32 255/32 255/63 192/63

                                 008E draw textured polygon: 51-75-59-60

                                 0007 draw submesh at 4 B if ??? (true)

                                  0047 write polygon UV: texture 51; 192/64 255/64 255/95 192/95

                                  008E draw textured polygon: 60-59-79-78

                                  0007 draw submesh at 4 B if ??? (true)

                                   0047 write polygon UV: texture 51; 192/96 255/96 255/127 192/127

                                   008E draw textured polygon: 78-79-49-50

                                   0007 draw submesh at 4 B if ??? (true)

                                    0047 write polygon UV: texture 51; 192/128 255/128 255/159 192/159

                                    008E draw textured polygon: 50-49-83-82

                                    0007 draw submesh at 4 B if ??? (true)

                                     0047 write polygon UV: texture 51; 192/160255/160 255/191 192/191

                                     008E draw textured polygon: 82-83-85-84

                                     0007 draw submesh at 4 B if ??? (true)

                                      0047 write polygon UV: texture 51; 192/0 255/0 255/31 192/31

                                      008E draw textured polygon: 84-85-55-56

                                      0007 draw submesh at 4 B if ??? (true)

                                       0047 write polygon UV: texture 51; 192/32 255/32 255/63 192/63

                                       008E draw textured polygon: 56-55-71-48

                                       0007 draw submesh at 4 B if ??? (true)

                                        0047 write polygon UV: texture 51; 192/64 255/64 255/95 192/95

                                        008E draw textured polygon: 48-71-77-76

                                        0007 draw submesh at 4 B if ??? (true)

                                         0047 write polygon UV: texture 51; 192/96 255/96 255/127 192/127

                                         008E draw textured polygon: 76-77-42-43

                                         0000 return

                                        0000 return

                                       0000 return

                                      0000 return

                                     0000 return

                                    0000 return

                                   0000 return

                                  0000 return

                                 0000 return

                                0000 return

                               0000 return

                              0000 return

                             0000 return

                            0000 return

                           0000 return

                          0000 return

                         0000 return

                        0000 return

                       0000 return

                      0000 return

                     0000 return

                    0000 return

                   0000 return

                  0000 return

                 0000 return

                0000 return

               0000 return

              0000 return

             0000 return

            0000 return

           0000 return

          0000 return

         0000 return

        0000 return

       0000 return

      0000 return

     0000 return

    0000 return

   0000 return

  0000 return

 0000 return

Maybe it's some kind of visibility test, or parameter-dependent. Very puzzling.

Link to post
Share on other sites

Ouch! I wouldn't have thought marib2.3 would be designed that way. :whoa:

When I first came across the 0007 opcode, it was on buildings and seemed to enable shadows. This has now been confirmed using your viewer. :thumbsup:

At the time, I linked this to the 'airfield detail' option:

tawoptions.jpg

But, as we are experiencing now, 0007 looks like it can be used in different ways depending on the type of model. So, maybe the .3 file 'Type' has a bearing, ie the '0000','0083', '0087' etc.

Oh, and thanks for the new version of viewer. Definite improvement. :D

The only thing I'm going´to comment on is the canopy on the F22 models. There is something odd drawn if the canopy is opened using 'Parameter 0004'.

Link to post
Share on other sites

Indeed! It might have the same effect on airplanes, i.e. when you switch 0007 in f22usa*.3, nothing but the shadow occluders is rendered.

Have a look at heavenly.3: It renders a beautiful sun with AGP enabled (you can control the time of day via parameter #0), but the moon is still as ugly as without AGP. Isn't there a special AGP texture for the moon? Why didn't the use it?

I just discovered 0024 is a call, not a jump (it enables lights in various airplanes).

Working on lights, I see the following with dgVoodoo glide wrapper:

lightsa.png

So there's three kinds of points in TAW:

  1. Building lights. These are point sprites with a size of about 4×4 pixels in the wrapper, so they were 2×2 in TAW's native resolution. Drawn by 0034 and 0096.
  2. Signal lights. These are points in the wrapper, so they were points in TAW, too. Drawn by 0033 and 0095, I think.
  3. Dots in lines. These are point sprites with a size of about 2×2 pixels in the wrapper (or maybe 4×2 with a bright texel on their left and a dark pixel on their right), so they were 1×1 in TAW's native resolution. Drawn by 0039.

But I don't know the difference between 0033 and 0095, or the meaning of the additional attribute in 0095 and 0096 …

Link to post
Share on other sites

Heavenly.3 is indeed heavenly. There are a whole bunch of files (including .3) which are included in the did.dat data archive, but apparently not used in the game. Maybe one of them is a version of heavenly that uses a AGP moon. DrKevDog is our expert on these files.

The little yellow lights on the tops of buildings are used to help find the targets in 'easy' and 'medium' difficulty. So these must be enabled separately to other lights, so may explain 0096.

As we know 0027 is a decision based on view distance, so we could assume that 0024,0025 and 0026 act in a similar way for other and maybe unrelated parameters.

Link to post
Share on other sites
The little yellow lights on the tops of buildings are used to help find the targets in 'easy' and 'medium' difficulty. So these must be enabled separately to other lights, so may explain 0096.
Can you name specific models for that? I watched the industrial areas around aswan at night with "easy" and "hard" difficulty but couldn't spot a difference :(
Link to post
Share on other sites

Just modified the EF-2000 0096 light opcodes. The first word in the operand seems to be unused — I could not spot any difference between 0005, 0000, FFFF, 0033 etc whatsoever. I verified I hit the correct lights by changing their color. I assume the first word in 0095 and 0096 to be legacy.

Mike, I'd like to say you're correct with 0024 and the distance, since it controls the plane's lights and those are disabled at a certain distance — but why does the opcode control blakhawk.3's rotor then? It doesn't make sense that way (yet) :(

Link to post
Share on other sites

Indeed! It might have the same effect on airplanes, i.e. when you switch 0007 in f22usa*.3, nothing but the shadow occluders is rendered.

Is this a culled process? When I disable 0007's in F22USA1.3 manually, I get a simple triangular shadow which appears to be flipped.

Have a look at heavenly.3: It renders a beautiful sun with AGP enabled (you can control the time of day via parameter #0), but the moon is still as ugly as without AGP. Isn't there a special AGP texture for the moon? Why didn't the use it?

AGP Moon

moon.jpg

The file is a 16kb 32bit .raw texture located at index position 405 which is a 32 bit slot. I suspect the same reason AGP was minimized in the game, in general, is the reason. AGP slots weren't introduced into the mainboard market until late 1997, ADF was also released in 1997 and the focus then was the Glide API which had supported cards of a primarily PCI slot construction. The AGP texture utilization was not implemented across all sections of the ADF/TAW platform.

Example: As of this entry I have not yet solved the problem regarding TAW AWACS 3D WORLD WINDOW's inability to correctly render 24 or 32 bit textures :o

Link to post
Share on other sites

DKD, does that mean you've got the viewer up and running?

Mike, I'd like to say you're correct with 0024 and the distance, since it controls the plane's lights and those are disabled at a certain distance — but why does the opcode control blakhawk.3's rotor then? It doesn't make sense that way (yet) :(

0024,0025 and 0026 don't have to be distance, but maybe some other attribute...although I can't think what. :unsure:
Link to post
Share on other sites
Is this a culled process? When I disable 0007's in F22USA1.3 manually, I get a simple triangular shadow which appears to be flipped.
The F-22's side rudders are the only shadow occluders, i.e. the only geometry that casts shadows back onto the F-22. So without 0007, you should indeed see the two rudders only.

AGP Moon

moon.jpg

Aawww it's beautiful. It's a pity they didn't use it. It's a pity we have no AGP textures in glide mode anyway.
Link to post
Share on other sites

Oh wow :blink:

Jealous :unsure:

And all I have is trouble with 0098 because I didn't consider the coverage level is reset when an new texture is set :lol:

47347013.png

Also, some information on 001A and 001B (draw semi-transparent triangle / quad): The first word seems to be zero always, which causes the primitve to be drawn with 50 % opacity. However, the engine also accepts numbers up to 31, where the triangle will be drawn fully opaque. Negative values cause it to crash. I can't work it out more precisely, because I have only a buggy software mode to test here.

Mike, if you could confirm that 001A and 001B never appear with a nonzero first word in the operand, I could complete their implementation :)

Link to post
Share on other sites

Thank you! :thumbsup:

From what I see, the U2 windshields are rendered fully transparent in software mode. So I'll implement 0000 as draw semi-transparent and 000e as don't draw at all.

It's a little late, but: could you do the same thing for 007e? Just while you replied I found out that 007e looks very much like 001b; it is used for rotors on low-LOD helicopter models.

Also, we have a problem in apache.3: Three out of four rotor blades are rendered lower than in TAW.

Link to post
Share on other sites

Late indeed 01:38 here, so this is definitely the last contribution today. :)

The 007e list is quite short, so might as well post the whole thing:

apache1.3 0054; 007e000000be001800190017001a    ;

apache1.3 0064; 007e000000be001b001d001c001e    ;

apache1.3 0065; 007e000000be001e001c001d001b    ;

apache1.3 0072; 007e000000be001a001700190018    ;

blakhawk.3 0054; 007e000000be001800190017001a    ;

blakhawk.3 0060; 007e000000be001b001d001c001e    ;

blakhawk.3 0061; 007e000000be001e001c001d001b    ;

blakhawk.3 0068; 007e000000be001a001700190018    ;

chinook1.3 0058; 007e000000b40013001500140016    ;

chinook1.3 0059; 007e000000b40016001400150013    ;

chinook1.3 0060; 007e000000b4001700190018001a    ;

chinook1.3 0061; 007e000000b4001a001800190017    ;

cobra1.3 0055; 007e000000be001800190017001a    ;

cobra1.3 0066; 007e000000be001b001d001c001e    ;

cobra1.3 0067; 007e000000be001e001c001d001b    ;

cobra1.3 0074; 007e000000be001a001700190018    ;

comanch1.3 0050; 007e000000be001800190017001a    ;

comanch1.3 0056; 007e000000be001b001d001c001e    ;

comanch1.3 0057; 007e000000be001e001c001d001b    ;

comanch1.3 0064; 007e000000be001a001700190018    ;

ka501.3 0054; 007e000000be001800190017001a    ;

ka501.3 0070; 007e000000be001a001700190018    ;

mi241.3 0055; 007e000000b4001800190017001a    ;

mi241.3 0066; 007e000000b4001b001d001c001e    ;

mi241.3 0067; 007e000000b4001e001c001d001b    ;

mi241.3 0074; 007e000000b4001a001700190018    ;

mi261.3 0055; 007e000000b9001800190017001a    ;

mi261.3 0061; 007e000000b9001b001d001c001e    ;

mi261.3 0062; 007e000000b9001e001c001d001b    ;

mi261.3 0069; 007e000000b9001a001700190018    ;

mi281.3 0054; 007e000000be001800190017001a    ;

mi281.3 0064; 007e000000be001b001d001c001e    ;

mi281.3 0065; 007e000000be001e001c001d001b    ;

mi281.3 0072; 007e000000be001a001700190018    ;

mi401.3 0054; 007e000000be001800190017001a    ;

mi401.3 0064; 007e000000be001b001d001c001e    ;

mi401.3 0065; 007e000000be001e001c001d001b    ;

mi401.3 0072; 007e000000be001a001700190018    ;

oilrig.3 0962; 007e0000007f0069006b006a006c    ;

oilrig.3 1222; 007e0000007f0069006b006a006c    ;

oilrig.3 1466; 007e0000007f0069006b006a006c    ;

oilrig.3 1614; 007e0000007f0069006b006a006c    ;

oilrig.3 1757; 007e0000007f0069006b006a006c    ;

oilrig.3 2323; 007e0000007f009f00a100a000a2    ;

oilrig.3 2603; 007e0000007f009f00a100a000a2    ;

oilrig.3 2869; 007e0000007f009f00a100a000a2    ;

oilrig.3 3103; 007e0000007f009f00a100a000a2    ;

oilrig.3 3281; 007e0000007f009f00a100a000a2    ;

stallion.3 0054; 007e000000b9001800190017001a    ;

stallion.3 0060; 007e000000b9001b001d001c001e    ;

stallion.3 0061; 007e000000b9001e001c001d001b    ;

stallion.3 0068; 007e000000b9001a001700190018    ;

Link to post
Share on other sites

DKD, does that mean you've got the viewer up and running?

Viewer not yet functional for me, however, I'm certainly getting there :)

Interesting thing regarding the list you posted on 007e, all heli's except the oil rig. Quite a creative use of 007e for the fire-flare from the flare boom nozzle on the offshore oil rigs.

Link to post
Share on other sites

Some interesting facts:

  • 0076, 007B, 007C and 0093 are calls, not jumps. This doesn't make any visible difference, but I'm quite sure they're designed that way.
  • 0098 set texture transparency, 00A7 set texture color and 00A8 reset texture color have an effect on 0088 draw transparent textured polygon only and must be disabled for all other draw calls.

Here's the current build with the above points, the semi-transparent polygons and the new point sizes implemented:

http://www.mediafire.com/?kb5f51h62x9oqa3

There are still problems with transparency in the ref_*.3 files, though. The current progress:

// fully implemented

_0000Return			= 0x0000,

_0001DrawFlatShadedLine		= 0x0001,

_0002DrawFlatShadedTriangle	= 0x0002,

_0003DrawFlatShadedQuad		= 0x0003,

_0004DrawFlatShadedPolygon	= 0x0004,

_0008Call			= 0x0008,

_0015JumpIfTriangleIsInvisible	= 0x0015,

_001ADrawTransparentTriangle	= 0x001A,

_001BDrawTransparentQuad	= 0x001B,

_0020JumpIfParameterIsBelow	= 0x0020,

_0021JumpIfParameterEquals	= 0x0021,

_0022JumpIfParameterIsAbove	= 0x0022,

_0027JumpIfDistanceAbove	= 0x0027,

_002DDrawDisplacedSubmesh	= 0x002D,

_002EFetchPolygonUV		= 0x002E,

_002FDrawSolidTexturedPolygon	= 0x002F,

_0030DefineUnitLength		= 0x0030,

_0031PushPolygonColors		= 0x0031,

_0033DrawPoint			= 0x0033,

_0034DrawLargePoint		= 0x0034,

_0037PushFogDistance		= 0x0037,

_0039DrawPoints			= 0x0039,

_003EDrawTransparentQuad	= 0x003E,

_0047FetchPolygonUV		= 0x0047,

_0048ChooseActiveParameter	= 0x0048,

_0049DrawTransformedSubmesh	= 0x0049,

_004BDrawStaringSubmesh		= 0x004B,

_004CFetchTriangleColors	= 0x004C,

_004DDrawGouraudShadedTriangle	= 0x004D,

_004EFetchQuadColors		= 0x004E,

_004FDrawGouraudShadedQuad	= 0x004F,

_0053WriteXYZs			= 0x0053,

_005CDrawSphere			= 0x005C,

_005FDrawSpheres		= 0x005F,

_0061TransformXYZ		= 0x0061,

_0062WriteRandomXYZ		= 0x0062,

_0063WriteNextXYZWithXYZDelta	= 0x0063,

_0064WriteNextXYZWithXDelta	= 0x0064,

_0065WriteNextXYZWithYDelta	= 0x0065,

_0066WriteNextXYZWithZDelta	= 0x0066,

_0067WriteNextXYZWithXYDelta	= 0x0067,

_0068WriteNextXYZWithXZDelta	= 0x0068,

_0069WriteNextXYZWithYZDelta	= 0x0069,

_006AWriteRandomXYZWithXYZDelta	= 0x006A,

_006BWriteRandomXYZWithXDelta	= 0x006B,

_006CWriteRandomXYZWithYDelta	= 0x006C,

_006DWriteRandomXYZWithZDelta	= 0x006D,

_006EWriteRandomXYZWithXYDelta	= 0x006E,

_006FWriteRandomXYZWithXZDelta	= 0x006F,

_0070WriteRandomXYZWithYZDelta	= 0x0070,

_0071DrawNextFlatShadedTriangle	= 0x0071,

_0072DrawNextFlatShadedQuad	= 0x0072,

_0073DrawNextFlatShadedPolygon	= 0x0073,

_007DDrawFlatShadedQuad		= 0x007D,

_007EDrawTransparentQuad	= 0x007E,

_0080DrawGouraudShadedTriangle	= 0x0080,

_0081DrawGouraudShadedQuad	= 0x0081,

_0083UseTexturePortion		= 0x0083,

_0084UseWholeTexture		= 0x0084,

_0088DrawBlendedTexturedPolygon	= 0x0088,

_008DDrawAfterburnerTriangle	= 0x008D,

_008EDrawMaskedTexturedPolygon	= 0x008E,

_0095DrawPoint			= 0x0095,

_0096DrawLargePoint		= 0x0096,

_0098Set0088Coverage		= 0x0098,

_009DDrawMaterialShadedTriangle	= 0x009D,

_009EDrawMaterialShadedQuad	= 0x009E,

_009FFetchPolygonMaterial	= 0x009F,

_00A3JumpIfAGPAvailable		= 0x00A3,

_00A7Set0088Color		= 0x00A7,

_00A8Reset0088Color		= 0x00A8,

_FFFFEndOfLOD			= 0xFFFF,

// somehow understood; not yet implemented

_0007DrawSubmeshIf___		= 0x0007,

_0024				= 0x0024,

_0025				= 0x0025,

_0026				= 0x0026,

_0038DrawFlatShadedQuad		= 0x0038,

_003FDrawLightSubmesh		= 0x003F,

_0040				= 0x0040,

_0041				= 0x0041,

_0042				= 0x0042,

_0043JumpIfTimeOfDayEquals	= 0x0043,

_0045				= 0x0045,

_0051MarkPylonPosition		= 0x0051,

_005DDrawSemiTransparentSphere	= 0x005D,

_0060DrawSemiTransparentSpheres	= 0x0060,

_0075TransformSpawnPosition	= 0x0075,

_0076				= 0x0076,

_007B				= 0x007B,

_007C				= 0x007C,

_0086MarkJointPosition		= 0x0086,

_0087				= 0x0087,

_0093				= 0x0093,

_00A2DrawFlatShadedQuad		= 0x00A2,

// unknown

_004A				= 0x004A,

_0052				= 0x0052,

_0054				= 0x0054,

_0077				= 0x0077,

_0094				= 0x0094,

72:22:5 :thumbsup:

Interesting thing regarding the list you posted on 007e, all heli's except the oil rig. Quite a creative use of 007e for the fire-flare from the flare boom nozzle on the offshore oil rigs.
As far as I can see, 007E is not used for the flare but for the sea spray at the pillars :)
Link to post
Share on other sites

I always thought the second operand word in 0047 would give the number of texture positions, but when trying to get the ian_*.3 files working I noticed was wrong. Any explanation on their structure?

Also, here's a screenshot of the rendered ian. Apparently, the vertices of two "render polygon" instructions are linked together to make up limbs … any ideas on that?

iant.png

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...