Jump to content
COMBATSIM Forum

Krycztij

Members
  • Content count

    1,651
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Krycztij

  1. 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
  2. Krycztij

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

    What a pity. Looks like we should start writing our own operating system. (What UAW almost has become due to the UI APIs ) Thanks a lot for testing. Next time my system breaks down, I’ll install ReactOS and check what its D3D can and can not do. (BTW, the "ERROR: Joystick input broken" message doesn’t look promising either. Probably no more RawInput support than Wine …) (And why do I need to enable Audio devices in my browser in order to write an answer here? Is The Dude trying to make Combatsim Radio? )
  3. Krycztij

    F22 ADF Extracted-Working

    I don’t know of one either.
  4. Krycztij

    TAW terrain format

    Of all things, this is what I least expected … wow!
  5. Krycztij

    TAW terrain format

    Anyone has resources on how TAWs terrain is encoded? I could not find something on google. I found out by myself, the ENV and MAP files are indexes for the terrain tiles (see screenshot) Does anyone have a list which index means which tile? Are the tiles .3 files? - Pjotr
  6. Krycztij

    F-22 ADF Original Patches

    Neither did I find the file on my 1999-era copy.
  7. Krycztij

    Stealth: A retro-style F117A simulator

    So I guess it didn’t work out with PPJohn from SimHQ?
  8. Krycztij

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

    Let’s not care about the practical part – the VRML will be preprocessed and cached as a binary file. Let’s just make the most out of it, and your work is just stunning!
  9. Krycztij

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

    The current look of EF2000/ADF/TAW in TFXplorer will be preserved 99 % after the transition. I try to not break anything. I had to remove the canopy reflections, but that’s it. I would love to make a big leap straight away. Consider that terrain is logically separate from vehicles (planes, ships and tanks) – we can proceed with TAW’s F-22 cockpit chasing TAW enemies in a VRML-powered terrain of our choice. Make it a point list with emissive material. Lean Viewer doesn’t support points yet, but it will. Consider streets preliminary. I’d love to have OpenStreet import and fill the streets with a million cars (that’s four million lights, isn’t it?) and this requires special case handling for streets, probably procedural generation of streets, street lights and bridges along predetermined paths. Until we get there, just place some bright points for street lights. Still better than TAW’s
  10. Krycztij

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

    I misunderstood, sorry! If you want to preserve as much data as possible, how do you want to add dynamic lighting? Imagine: A building has a bright texture at day … and a dark texture at night At night, something explodes right next to it and casts orange light on the building … but the building’s texture is dark, so there is no effect. It’s just dark under all circumstances. I would just always use the bright day texture and let the engine darken the lighting at night, not the actual texture. (Lights are a different beast. If it’s a lit area, put that into the material’s emissive component. If it’s building lights etc, we make a separate texture, e.g. with _EMISSIVE prefix and the engine will treat it automatically. I did that here, for example.)
  11. Krycztij

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

    Windsocks and parachutes are a very difficult corner case, and I don’t know yet how to handle them properly. Please just skip them for now. Some of TAW’s other models have moving/rotating parts: The turret of the Shilka, or some antennas on ships, and so on. If you find any way to do it, please … isolate the moving parts into a separate object do not store the entire rotation animation; just store the first frame if you have any hint at the axis or origin of the rotation, move the coordinate origin of the sub-object to this point To be honest, I’m not quite sure how to accomplish all that, but that’s what we need … The slowdown is due to the CPU making decisions during drawing: Are we on side XY of the model? Then draw this polygon first then that and skip the other one. After five or six polygons, a similar decision, and so on. The GPU expects a contiguous stream of polygons, but if we skip a polygon, then the stream is not contiguous any more. So all later polygons must be moved to an earlier position and close the gap. This can only be solved with at least one copy per polygon, and this takes ~200 cycles (not counting the overhead for decisions like “what time of day is it”, “how far away is the shape”, and – worst – “on which side of a plane defined by three points are we” (for Painter’s algorithm). At 200 cycles per polygon, you can quickly estimate an upper limit for smooth rendering: 3.2 GHz CPU @ 60 fps makes 53.3 million cycles per frame, so we can’t ever surpass 266 thousand polygons/frame. Assuming 100 % CPU for rendering and 0 % for gameplay here. On modern systems, it’s best to not invoke the CPU at all. Rule of thumb is, if the model has less than thousand polygons, don’t even try to check visibility on the CPU because this visibility computation will likely eat more time than the GPU needs for rendering. Just render it. (Exceptional is excessive material/shader use, e.g. each of the 1000 polygons using a unique material, but that’s rare.) That’s why we need one complete set of polygons per object and per LOD. Just let the GPU handle it. (Lean viewer renders everything blindly and without CPU interference, and it gets ~1000× TFXplorer’s polygon count.) Same for moving/rotating parts: Let the CPU only change the rotation matrix (16 values) and let the GPU rotate thousands of vertices to the new position (because GPUs are pretty good at that). That’s why I only want one indexed triangle set per moving part, and not TAW’s stuttering animation: We’ll just change the matrix and the part will move smoothly and with high efficiency. And as soon as that works, we’ll add Skeletal animation.
  12. Krycztij

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

    No, don’t use ROUTE. Apart from not being supported by Lean Viewer, that’s exactly what made TAW so slow and it would make your new terrain just as slow! The Python VRML library is interesting. I will take a look in the future …
  13. Krycztij

    I see we got a new paint job and all new emojis

    See https://stackoverflow.com/questions/9626115/color-in-the-unicode-standard . Win 10’s font rendering is more sophisticated and focused on hip mobile chat apps, so its emojis are more colorful. (You should try with a Mac.)
  14. Krycztij

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

    I don’t have an alternative to Visual Studio either. Eclipse is very clunky and buggy IMHO. I’m forced to use Qt Creator at work, and it has some advantages over Visual Studio (source code browsing/refactoring is easier) but you have to configure a lot regarding makefiles and stuff. (Thumbs up for Dev-C++, if I hadn’t found it in 1999 or so, I would probably never have started programming.) Please keep the LODs; there is an LOD node in VRML. Samples here, but remember that I don’t support “inline” so you’d place (or USE) your IndexedFaceSet there. Lean Viewer does not automatically support LoD, but you can select individual levels to display by double-clicking them in the scene graph. (If I’ve done it right, it should only ever display one of them at a time.)
  15. Krycztij

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

    Yes, it’s very user-offensive. My „trial“ license runs out tomorrow so I’ll have to enter an email address 😞
  16. Krycztij

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

    From my memory, it should map to meters. But also from my memory, it should have been 1024×1024 units in the VRML file. I’m confused and I don’t find my notes on the experimental checks, so I’d like to withdraw my statement …
  17. Krycztij

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

    I always try to be as compatible as it comes with the vanilla data. There’s always the uncertainty of whether our project will be banned somewhere *cough SimHQ cough* if we deliver our own TAW-based content instead. Yes I recognized it ❤️ Regarding scale, because this will certainly be a problem: When I last checked, the tiles were ca. 1024 m wide (should be 420 TFX units). This must be a giant building.
  18. Krycztij

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

    Yes, absolutely. This dependency on Painter’s Algorithm is the main performance bottleneck because it can’t be done in hardware and doesn’t scale with cores. Lean viewer’s thing is called depth buffering and TFXplorer uses it as well, but in a very limited scope to avoid problems with TAW’s geometry. The future VRML-based terrain will use depth buffering exclusively.
  19. Krycztij

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

    I love it, no matter what the texture 👍
  20. 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.
  21. 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.
  22. 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 …
  23. 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
  24. 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.)
×