Jump to content
COMBATSIM Forum

Krycztij

Members
  • Content count

    1,633
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Krycztij

  1. Krycztij

    TAW 3View — A Renderer for TAW's .3 Files

    Linux is actually a common request for my software, from something like 5 % of users. So I seek to enhance compatibility wherever I can, and I welcome and value your information FYI: You can set render states in D3D 11 to NULL to trigger default behavior. E.g. set depth-stencil to NULL and you get default Z buffering with "pass if closer" Z test. This saves me a dozen function calls where others pass explicit parameters. It’s easy to overlook in the documentation and I’ve never seen anyone else do it, so I suspect early Wine missed out on it and this resulted in a mis-configured render pipeline. Anyway, I hope to improve the lighting situation soon. There will be no hard-coded shadows in TFXplorer’s custom terrain. It will be computed from directional light, just the way it’s meant to be. Don’t waste your time on shadows. Still very slow progress and short on time, though.
  2. TAW 3View aims to help modders by providing quick feedback on palette/texture/mesh modifications (quicker than starting the game, at least ). In the long term, we hope to get a better understanding of how TAW manages and renders its content. I will use this topic to release new versions, to assist on technical problems, and to discuss bug reports and feature requests. TAW 3View's internals, the encoding of .3 bytecode and other details should be discussed in the Development Thread. Let's get started with a first Beta: TAW 3View Beta 1 System Requirements: I tested it on Windows 7 only, but it should work with Windows XP and Windows Vista, too. You need a Direct3D 9-compatible graphics card (ATI Radeon 9500 / Nvidia GeForce MX or higher -- basically any decent GPU you bought after 2003). Download: The software is still in an early stage of development; not well tested; I will not be held responsible if this software causes any damage to your computer. http://www.mediafire.com/?yrnyd6r96d6i650 Setup: If you have not already installed the DirectX Runtime June 2010 Update (x86), get it here. Otherwise, TAW 3View will not start due to D3DX9_43.DLL and other files missing. Extract the ZIP to your TAW\PROGRAM folder. Start 3View.exe. A console and a window should open and a tile of jeddah should show up. If not, look for errors on the console and post here. You can close the program again by hitting ESC, or closing the window or the console. Navigate to "TAW\PROGRAM\3" and find "abu_sim.3" (a file of that I know it works). If you have already associated .3 files with a program, right-click onto the file and choose "Open with...", "Select...". Else double-click onto the file, check "Select a program from a list of installed programs" and click OK. Click "Browse..." in the lower left of the new window; navigate to TAW\PROGRAM and select 3View.exe. Click OK. Check "Always use the selected program to open this kind of file" (if you are not a modder and want to open .3 with a hex editor instead); then click OK. A tile of Abu Simbel should pop up. Usage: This is difficult, but -- sorry, I didn't have time to build a fine user interface. And as an old saying goes: It was hard to program, so it should be hard to use! The first thing to notice is that it is very slow (performance has not priority at the moment). It becomes a little faster if you minimize the console. You can rotate the model with Numpad 2, 8, 4, 6. F1 toggles wireframe mode, F2 toggles lights. The mouse wheel can be used to adjust the distance. This may seem a little strange, but the engine auto-adjusts the zoom so the model has always the same size on screen. F3–F9 toggles various flags. Parameters can be increased and decreased with A/Y, S/X, etc. We don't know the meanings yet and most of them work in combination, but if you see a damaged model, it is very likely to get the undamaged version by decreasing "parameter" to 0 (or to get the fubar version by increasing it). The top-left says which LOD is loaded ("LOD x of n"). If n > 1, you can switch to the next LOD with the up arrow key (and back with down key, respectively). Known Bugs & Constraints: Many models are not rendered correctly: Wrong colors, wrong textures, missing polygons, flickering, etc. We're on it. More than 95 % of terrain tiles, however, should show up perfectly. It's slow. I'll consider performance later; currently, the primary goal is to get all models rendering. It's difficult to use. I'll build a user interface when most models show up properly and when we know how exactly the flags and parameters are controlled. It's wasted time otherwise. You cannot maximize, minimize or resize the program (I had no time to implement this yet). Double-clicking a .3 file while the viewer is running results in a second viewer popping up. Currently, the viewer uses the "1000" version of the textures and the "1200" palette only. I'll try to implement time of day, palette switching etc. for the next version. Although all vanilla models should load, I cannot guarantee that it doesn't crash if you load modified files. If you encounter an error popup, hit CTRL+C and paste it in your answer along with the name of the crashing model. If something crashes / hangs / does not start / etc, let me know here. Finally: Happy modding! I'd like to thank mikew and DrKevDog for their help. Basically, I just translated their advice to C++ and plugged a renderer on it -- Pjotr
  3. Krycztij

    TAW 3View — A Renderer for TAW's .3 Files

    Well I might add software rendering as a fallback path, just in case. But the software renderer needs to be provided by Wine and is a complex, rarely used component, so I suspect even more problems to arise … Okay. I got a suspicion, because I do clever things here and there (always 100 % compliant with the D3D API, though! ) but good to know it’s been fixed anyway.
  4. Krycztij

    TAW 3View — A Renderer for TAW's .3 Files

    So it’s a first conversion? Very good! No duplicate triangles? Interesting. I can’t imagine what the problem was …
  5. Krycztij

    Interpretation of SSD files

    The advantage with Clang is, many platforms (all but Windows and Windows Phone?) have no Microsoft compiler at all. So if you want to run TFXplorer on Android, Linux, MacOS – you better have it compile fine with Clang/GCC! Yes, somewhere downstream I have to deal with Linux file* instead of Win32 HANDLE sooner or later. But it’s just an isolated point. Of course I could develop it with standard C FILE*, which compiles everywhere – but then advantages like SIMD and file mapping would vanish. The next step towards multi-platform is a Vulkan renderer. But I digress – we agreed to do other things first
  6. Krycztij

    Interpretation of SSD files

    I’m incredibly glad to hear that! 90 % of C++ projects don’t compile after a few years due to missing dependencies and compiler changes. Seems like my decision to rely on nothing but WinAPI and DirectX paid off, at least for this small DLL project (Talking about compiler changes: Lean Viewer now compiles with Clang. Still way to go with TFXplorer, but it’s a good start for platform independence.)
  7. Krycztij

    Interpretation of SSD files

    No he didn’t 😞 I didn’t find any time, and I’m sooo sorry about that. My new job has given me so much inspiration (e.g. about connecting Python with a C++ product, something I’m very keen on doing in TFXplorer just for Mike’s joy!) but it’ll also keep me busy for some more weeks. Absolutely agreeing here! Such impressive work by both of you!
  8. Krycztij

    Interpretation of SSD files

    TFXplorer once had code to display the collision boxes, but I suspect I’ve deactivated it for a long time … maybe I’ll resurrect it this weekend for you (don’t know how much spare time I get ) … TARGET_AREA_DATA … I don’t even know what it’s for. TARGETS … not sure.
  9. It actually is a running gag in Germany, and it re-surfaced during the Ukraine crisis
  10. Krycztij

    Interpretation of SSD files

    Great analysis
  11. Krycztij

    TFXplorer

    The unit is always meters. (TFXplorer is SI-based since ~2015; TFX’s units have since been converted with a tiny rounding error.) Tiles can have an arbitrary size in meters, not necessarily integer
  12. Krycztij

    TFXplorer

    Announcing TFXplorer Discover the worlds of TAW, ADF, and EF2000 — without the limitations of the actual games! More screenshots here and here. System Requirements: Requires Air Dominance Fighter, Total Air War, Total Air War 2.0, or Super EF2000 installed. I personally tested it on Windows 7 only, but it should work on Windows XP, Vista, and 10 as well. You need a Direct3D 9-compatible graphics card (ATI Radeon 9500 / Nvidia GeForce MX or higher — basically any decent GPU you bought after 2003). Download: https://app.box.com/s/1f8sw293hh7h8f12qfx8abhwbf2qiu4h (updated September 9th, 2017) Setup: If you have already installed an older version of TFXplorer, or if you use 3View, you can skip the following step: If you have not already installed the DirectX End-User Runtimes (June 2010), get them here. Otherwise, TFXplorer will not start due to D3DX9_43.DLL and other files missing. If you have Total Air War 2.0 installed, copy TFXplorer x86 and the UAW folder to the Total Air War 2.0 folder. If you have ADF, TAW or Super EF2000 installed, copy them to ADF/TAW/EF2000’s PROGRAM folder. Double-click TFXplorer x86. The splash screen should appear. Usage: In-Game: Plane controls are just like TAW's. SHIFT+Q quits the game or switches to explorer mode. You can switch to explorer mode via SHIFT+Q; X: Press the left mouse button to move forward. SHIFT+S cycles the time of day. N toggles night vision at night. F1 toggles wireframe rendering. F2 takes a screenshot and saves it as a bitmap with a reconnaissance-like look. F3 switches from Glide to Direct3D and vice versa (only important for developers). F4 toggles target names. F5 brings you back to in-game mode. Repeatedly press S to increase viewing range, or X to decrease. NUMPAD 6, 2, 4, and 8 glide north, south, west, and east. NUMPAD 5 and CTRL+NUMPAD 5 glide up/down. 64-bit Version (it's faster!): Requires Windows Vista or later. Download: https://app.box.com/s/6lvmsbpyfi6swwz7awifd9ds712lgyom (updated September 9th, 2017) Have fun! Please let me know here of any problems, bugs, and suggestions — Pjotr
  13. Krycztij

    Interpretation of SSD files

    Please take into account my uploaded screenshots! https://app.box.com/file/24479249637 https://app.box.com/file/24479287085 https://app.box.com/file/24516749789 https://app.box.com/file/24467849463 https://app.box.com/file/24467848487
  14. Krycztij

    TFXplorer

    Minor update: Last week, I finally isolated the code for tile sidelength. This was a major problem in the way of new terrain, because TFX’s tile sidelength (16384 ft) was hard-coded everywhere. I can now use arbitrary sidelength with arbitrary geometry: Forward, step by step
  15. Krycztij

    Interpretation of SSD files

    Thanks, I’ll try soon! If you want to see the crashes in person, fly to Aden. Fly to the tile with the large airport tower. Shoot at the buildings. You’ll see that the collision boxes don’t match the visuals and eventually, it’ll crash. I suspect it’s something about the order of collision boxes …
  16. Krycztij

    Spitfire replica crashed

    A spitfire replica crashed in Germany yesterday. The plane caught fire in flight (cause unknown) and crash-landed on a field. The 69 years old pilot left the cockpit, but with severe burns (witnesses had to extinguish him) and he is now in critical condition. I’m living just a few kilometers from the crash site – I’ve even watched that plane flying loopings above my garden the day before yesterday. My hopes and wishes go to the pilot.
  17. Krycztij

    Spitfire replica crashed

    Yes; the first one was a glider crashing next to me last summer, but without injuries. What’s the chance …
  18. Krycztij

    Interpretation of SSD files

    TFXplorer doesn’t for two reasons: It’s hard. There is no path through a .3 shape that draws all triangles; it’s always branching on viewer position (which does not exist with physics) and so you always miss triangles. If you explore all branches, you’ll have overlapping/duplicate triangles, which is just as bad (triggers duplicate collisions, so a ball will bounce off the ground twice as fast). I never had the energy to find a good solution. I designed TFXplorer to follow ADF/TAW behavior as close as possible (after all, we wanted to speed up TAW 2.0 modding!), and this would have been a major difference. Remember that one mountain in EF2000 where physics and visuals don’t match? We never solved that one Yes please! The code was a rushed-down combination of copy-pasting your Python code and hacking in TFX 2 compatibility. It’s full of crashes and security issues. It needs a full rewrite, I’m afraid … keep me informed on anything you find. Should be the 0030 opcode: Every shape has one, and they are often nested …
  19. Krycztij

    Back to TFX1

    I don’t write the API with any specific format in mind – it’s a code API (note 1). The terrain plugin must implement a handful of functions like “does this ray hit the terrain, and if so, which material or object is there?”, and then physics work automatically. All our current code is moved to a TFX terrain plugin. This implements the functions using SSD’s COLLISION_BOXES, SSD’s COLLISION_TRIANGLES, and 3’s texture transformation in the header (note 2). Nothing will change there. However, once the API is finished and all TFX traces are removed from the simulation core, I’ll implement a second terrain plugin with a new format, most likely VRML. Nothing of it is coded yet, so all I say is preliminary and I’ll gladly listen to your wishes. I imagined: Tile-based, again (there is little way around this if you want to support arbitrary terrain sizes). Per tile, one VRML file with one or more objects in it. Each object has one specific material. Materials should probably use predefined names. So if you want to make a desert with a small lake in it, you probably have to write in VRML a height map with “sand” material a planar polygon with “water” material Terrain collision information *should* be generated automatically from the visuals. If you desperately need to override it, you could insert an object group with a special name, e.g. starting with COLLISION_, I guess. Interactive/destroy-able buildings could be realized by adding Inline nodes to the terrain VRML files, where each building is an individual VRML file. VRML files for buildings should be in the same format, but should use the COLLISION_ feature more often. Each VRML file should be accompanied by an INI file with some data on damage tolerance etc., but I have not yet thought about the individual properties we need (e.g. I want fire/explosive damage separate from impulse damage) we probably can embed them directly into the VRML file as well using a WorldInfo node Further data can be embedded into VRML using named objects. E.g. place an empty object with the name TAXI_OBJECT_1 at a specific XYZ in the airfield tile, and I’ll know it’s taxiing. (I know DCS does this as well, e.g. the spawn positions for missiles are encoded as named empty objects in the 3DS file describing aircraft.) This will be very slow to process on loading, so I’ll likely add a cache system with a binary format in API-optimal encoding. You should not care about this. One more statement regarding damage etc. in the API: Building handling is very immature in TFXplorer. We have the animated windsock, we have buildings that can be destroyed using COLLISION_BOXES (still crashes randomly), and that’s it. No interconnections, no accurate collision detection, no nationality. Current API: allows to create a building at a specific place in a tile allows to assign collision boxes (even in the wrong coordinate system because I never got to repair it; I will soon) expects three callback functions for timer (e.g. the windsock’s is “call me every n seconds so I can update my animation”) rendering on hit (e.g. TFX buildings’ is“spawn an explosion in my place and update my .3 parameter #7”) I’ll improve it but currently it’s not high-priority. E.g. I’d like to add electricity nodes so destroying a power plant will black out nearby cities etc. I’ll add nice class diagrams about the API structure when it’s done. But right now things are still changing and it would be a waste of time. Note 1: I can’t tie the terrain to a specific format anyway, because we’d probably like to use procedural generation or web-streamed content at some point in the future – i.e. the data is not yet existent when the game starts! Binding it to arbitrary code instead of arbitrary data makes much more sense from that point of view. Note 2: This is necessary to differentiate grass, sand, and water in COLLISION_TRIANGLES. I don’t use it now, but prototype code from ~3 years ago is in place and awaits activation. Priorities …
  20. Krycztij

    GTX590

    Yes, I open and clean my GTX 660 every once in a while because that design is very far from optimal. I should have mentioned that; sorry …
  21. Krycztij

    Back to TFX1

    Eventually, why not? It started as a tool to make us understand the TFX games and it will always be. Plus, soon terrain logic will be separate from the simulation core, so we can implement whatever we want without polluting the rest of the engine. (Nice that you mention place names. I’m currently writing an API for borders, because borders.txt has to be removed from the simulation core as well. I could use the above TFX 1 information to implement cities with area instead of point size …)
  22. Krycztij

    Back to TFX1

    Just write down every little thing you find out; no matter if short or unclear. I’ll come back to it and implement it once the time has come.
  23. Krycztij

    Back to TFX1

    Mike, this looks just amazing!
  24. Krycztij

    Back to TFX1

    It’s okay; that post may be handy for the next problem Did you check because I remember there was something odd about the map’s memory layout (mirroring or 90° rotation or something like that) and it was hard to figure out.
×