Quake 2 on Falcon030

All 680x0 related coding posts in this section please.

Moderators: Zorro 2, Moderator Team

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

shoggoth wrote:I poll this thread every 100ms now.
:D

Have now figured out how to combine directional sunlight with ambient radiosity from the skybox textures, using TGAs for the skybox in the lighting pass. Required getting hold of ION Storm's Anachronox version of the Arghrad tool - a modded version of the lighting tool I was using.

Now things are working properly.
User avatar
LaurentS
Captain Atari
Captain Atari
Posts: 316
Joined: Mon Jan 05, 2009 5:41 pm

Re: Quake 2 on Falcon030

Post by LaurentS »

dml wrote: shoggoth wrote:I poll this thread every 100ms now.

:D
So do I ;)
I don't even have time to code anything actually, as I spend all my free time pressing "F5" on my keyboard.
;)

The other question is : what to code on Falcon after this ? (a pong game maybe ;)

Keep on the good job Doug,

Laurent
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

Thanks both..

I'm recently writing shorter, more random posts because I'm trying to get more done with less time. It's still not in good enough shape for what I wanted to do but its getting closer now. By the next vid the scope should be more apparent, hopefully.


While playing with the old Quake toolchain I am reminded about my long term distrust of Radiosity lighting and some of the crappy results that can be produced without enough care and knowledge of various workarounds - and the huge memory and time requirements and other limiting factors.

So while doing that I've been raking around for existing C projects which attempt to software-raytrace .BSP files directly into images as a starting point for a better lighting system that doesn't use Radiosity and doesn't have any size/resolution limits so its easier to get good results on big open maps.

Unfortunately I can't find anything like that. Some convertors - but no C projects to do it directly. So I'd probably need to do it from scratch. For now I'll stick with the Rad tools but if I get a chance I'll try to build the other thing to see if it can be done better. All it needs is a way to locate the surface ID and lightmap UV coords from a ray contact in the world. The rest can be built upon that.

To summarize - the potential for good lighting in exterior scenes is spoiled by the fact that each surface needs to be broken into rad patches which need stored for projection & summing - and more, bigger surfaces mean more patches, storage and time. So the 'workaround' is to use larger patches, lower resolution, which in turn fails to capture the very thing you're trying to get - ambient occlusion in corners and other subtle shadowing effects. Instead you get staircase-like hard shadow edges and fuzzy (or no) ambient occlusion effects. The results can be disappointing for what can involve a lot of waiting - so it would be fun to fix that problem and get the result rendered on the Falc.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

...another few steps forward.

Lightmap edge softening now works with coloured lightmaps, and the 68k surface cache filler now works in coloured lightmap mode also.

Scaled textures now work better with mipmaps - pixel density remains approximately flat instead of varying from place to place. This also provides a global bias control which helps regulate texture quality vs speed.

Next step is to figure out how to bypass the famously 'brown' Q2 palette for custom .WAL textures...
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

It always seems like the simplest things turn out to be the most difficult.

Each of the .WAL texture conversion tools I looked at for Quake2 textures appear to have the game palette baked into them. You can't just make textures with any palette you like. Even the tools that appear to let you load and use custom palettes - as soon as you export to .WAL they get mapped back to the brown/orange Q2 palette.

Nice. So apart from HalfLife etc., nobody hacked IdTech2 to use their own palettes? Because the colourmap table looks complicated? :D

If I can't figure out which tool will actually let me do this, I'll stick a remip module into the Falcon engine and have it make them directly from TGAs or some other source format, and shortcut the issue that way...

[EDIT]

..worked around for now, by hacking the texture tool's fixed palette.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

Made a bit more progress with map building & lighting last night, and F030 can now use custom palettes.

Have now oriented the skybox so it matches exactly the direction of the sun (if any) represented in the sky textures.

The lighting tool can read the sun position from the map data and the whole scene gets lit using the directional sunlight summed with ambient emission from each of the skybox textures and bounces from nearby surfaces.

This means its now possible to light the map near-realistically using just the sky textures & sun without any hand-placed spotlights or other hacks. The results so far are looking nice :)

This approach has been tried experimentally a few years ago in the Q3 engine but I was interested to see if it could be approximated for the Falcon project without the shader capabilities of Q3 and its improved map/lighting tools.

Answer: with some hacking around, yes!

I'll soon start on some custom map material for the next vid... :twisted:
AnthonyJ
Captain Atari
Captain Atari
Posts: 165
Joined: Sat Jan 26, 2013 8:16 am

Re: Quake 2 on Falcon030

Post by AnthonyJ »

dml wrote:This means its now possible to light the map near-realistically using just the sky textures & sun without any hand-placed spotlights or other hacks. The results so far are looking nice :)
Because "just" getting Q2 running on a Falcon isn't good enough!
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

AnthonyJ wrote: Because "just" getting Q2 running on a Falcon isn't good enough!
:D

Q1 principles permit speed. Q2 principles permit transparency & colour.

But it needs to look pretty - and preferably not brown... Q3 to the rescue!


[In this case I'm exploring Q3 toolchain tricks for use with Q2 formatted data, so it doesn't involve deep changes on the Falcon side of things - just finding more modern solutions to those problems using tools that still work with Q2. Unfortunately q3map2 (for Q3) generates unloadable maps so the actual Q3 tools can't be used here - Arghrad seems to do what's needed though if you set the map up carefully and actually define a physical skybox in the map...]
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

I was getting weird results from the Arghrad lighting tool. It can be made to produce nice lighting, but there are some inexplicable things going on. I basically had to adjust things up and down until it looked approximately right - but not really what I would call full control.

Couldn't find the source for Arghrad to understand it better - seems like the guy kept modding it for different people but never released the code? :-z

To cut a long story short, I got hold of the source for q2map, which contains the 3 main map processing tools from Id including qrad3, which Arghrad is based upon (the IdTech tool versions are confusing because of all the 2's and 3's involved for the games and the tools themselves). I'll start modding it myself to see if I can make more sense of that.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

Well that was painful, but also useful. Now I'm beginning to understand why the lighting in some Q2 maps looked so weird, and sometimes very very wrong.

The radiosity tools are full of hacks. The most obvious one tries to clamp and normalize light levels without changing the hue - which means adding light from different directions can leave you with a dominant colour (like orange) instead of white. This is mostly why I was getting bad results. Probably an art thing. Can't think of any other sensible explanation. Thankfully, easily fixed.

Some other changes - like adding a true sun - not so easy. There's no obvious way to detect what kind of surface a ray has hit - just that it's solid. Any ray thrown at the sun just hits the skybox and casts a shadow. A browse of the HalfLife rad tool indicates they fixed that in their maps, and sky brushes report 'sky' on contact.

Not sure how I'm going to solve that one but at least the problem is clear.

As a bonus and to compensate for the irritation I added..

1) support for PNG, TGA & JPG source textures - so lighting doesn't have to be done from 8-bit brown Quake .WAL textures
2) beginnings of support for sunlight (which Arghrad does, and qrad doesn't)
3) a stochastic/random sampling mode in the radiosity routine with configurable number of sample points. The original version used either 1 sample or 5, in a regular grid (using the -extra parameter). My version is less likely to miss stuff (and of course, requires a longer wait).

Even with a hacked sun - not infinitely far away but just inside the skybox - and some early fixes, the last results I saw are much better and more realistic looking than anything I saw with the available tools. Probably because I can understand what its doing now.

Upgrades! :twisted:
User avatar
Total Eclipse
Captain Atari
Captain Atari
Posts: 399
Joined: Tue Jul 20, 2004 2:20 pm
Location: Sheepy Magna, UK

Re: Quake 2 on Falcon030

Post by Total Eclipse »

I'd just like to say that I probably understand only about 5% of what you talk about in this thread.

However, its still extremely fascinating, and extremely impressive to see what you've achieved! :D
Atari 1040STfm, Power Computing PC720B external floppy. 40MB HDD
Now playing with MiST :)
User avatar
calimero
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2639
Joined: Thu Sep 15, 2005 10:01 am
Location: Serbia

Re: Quake 2 on Falcon030

Post by calimero »

I just planed to ask Doug if he can explain how lighting work in his Quake engine but I stumble on: http://www.bluesnews.com/abrash/chap68.shtml (text about textures and lighting by Mike Abrash) so I first want to read this text before I ask Doug anything :) but I have fast question: radiosity data are precomputed by Quake map tools and stored in lightmaps?
using Atari since 1986.http://wet.atari.orghttp://milan.kovac.cc/atari/software/ ・ Atari Falcon030/CT63/SV ・ Atari STe ・ Atari Mega4/MegaFile30/SM124 ・ Amiga 1200/PPC ・ Amiga 500 ・ C64 ・ ZX Spectrum ・ RPi ・ MagiC! ・ MiNT 1.18 ・ OS X
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

calimero wrote:I just planed to ask Doug if he can explain how lighting work in his Quake engine but I stumble on: http://www.bluesnews.com/abrash/chap68.shtml (text about textures and lighting by Mike Abrash) so I first want to read this text before I ask Doug anything :) but I have fast question: radiosity data are precomputed by Quake map tools and stored in lightmaps?
Yes - lighting is performed using a radiosity precalculation tool (qrad2/3, arghrad, q2map) - bouncing light around the scene until it settles down and all light is accounted for. This was necessary for soft lighting with realtime software rendering (with a single core CPU, in those days).

Modern GPUs of course don't have those kinds of requirements and you can do complex stuff per pixel in realtime.

However you still end up with 2 sets of textures per pixel - main ones and lightmaps, and the lightmaps are 1/16th the resolution (scale) of the main maps, and they need combined 1:1. Combining them is relatively straightforward on a Pentium, but was still x86-optimized with a lot of tricks. It is a bit more of a challenge over the Falcon's bus!
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

At the weekend I'll have another pass at the lighting tool and try to add the following:

- sun emitting parallel rays from outside of the skybox (without being shadowed by the skybox itself)
- atmospheric scattering
- lightmap softening
- some approximate analogue of HDR for oversaturated lighting

I also noticed that my understanding of how the radiosity worked is not exactly what is happening - texture reflectivity is reduced to a single value per texture (not even per surface, but per texture) and in turn used for any surface that texture is used with.

This is actually quite wrong for a number of reasons - aside from losing information from the texture (e.g. a texture stretched over a big surface, like the skybox, becomes a single average colour - which may be nothing like the colours expected from that surface in different parts of it) - the surface may only use a small part of the texture, and expose (e.g. worst case) a small area of red pixels only, from a large texture which is mostly blue. The colour used for radiosity lighting from that surface would be purple and not red because its the average colour of the whole texture, including unused areas.

This worked most of the time because of the way most maps were made - but it is an inobvous source of incorrect lighting.

It's probably a lot of effort to fix this and I don't see that anyone else has bothered - I'll probably dodge it too - but I think fixing it would make building properly lit maps a bit easier at least in some cases... certainly fewer reasons of weird colours appearing.


Anyway I think the output is already good enough to raise the bar again on the Falcon for textured scenes. I don't want to post spoiler screenshots now but I think the results of this experiment - when they appear - will have been worth all the trouble.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

Total Eclipse wrote:I'd just like to say that I probably understand only about 5% of what you talk about in this thread.
Half the time I'm just thinking out-loud, and half the time I'm trying to fill empty void before the next screenshot or video :D
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

calimero wrote:I just planed to ask Doug if he can explain how lighting work in his Quake engine but I stumble on: http://www.bluesnews.com/abrash/chap68.shtml (text about textures and lighting by Mike Abrash) so I first want to read this text before I ask Doug anything :) but I have fast question: radiosity data are precomputed by Quake map tools and stored in lightmaps?
BTW I'll do a writeup on my site for all the tools I use to make Falcon maps so anyone else should be able to repeat the process. Not sure how useful that is (yet) but the engine source code will follow later and will make it possible to build Falcon things with the tools & code, for anyone who wants to play with it.
VladR
Atariator
Atariator
Posts: 18
Joined: Thu Mar 05, 2015 7:30 pm

Re: Quake 2 on Falcon030

Post by VladR »

dml wrote:At the weekend I'll have another pass at the lighting tool and try to add the following:

- sun emitting parallel rays from outside of the skybox (without being shadowed by the skybox itself)
- atmospheric scattering
- lightmap softening
- some approximate analogue of HDR for oversaturated lighting
I wouldn't recommend messing with the features above, until you get the most important lighting feature working - radiosity. The features above will add approximately 7-18% of the visual impact, compared to the radiosity alone.
dml wrote: I also noticed that my understanding of how the radiosity worked is not exactly what is happening - texture reflectivity is reduced to a single value per texture (not even per surface, but per texture) and in turn used for any surface that texture is used with.

This is actually quite wrong for a number of reasons - aside from losing information from the texture (e.g. a texture stretched over a big surface, like the skybox, becomes a single average colour - which may be nothing like the colours expected from that surface in different parts of it) - the surface may only use a small part of the texture, and expose (e.g. worst case) a small area of red pixels only, from a large texture which is mostly blue. The colour used for radiosity lighting from that surface would be purple and not red because its the average colour of the whole texture, including unused areas.
That kind of lighting scheme is anything but Radiosity. I wouldn't even call it a hack. At first, it looks like Lambertian directional lighting - e.g. discrete lighting value per each surface (imagine default directional lighting of a cube, where each face of a cube has 6 different colors, depending on light direction).
But, the moment you reuse the lighting value for multiple polygons, which will most probably have different per-face normals, you will introduce ugly visual artifacts that have nothing to do with any (even simplest) lighting schemes.

Example - imagine two walls with 90' degree between them - according to this scheme, if they used same material, their lighting information would be same, but in reality there would be a steep difference in their brightness, even with the simnplest Lambertian lighting model.

dml wrote: This worked most of the time because of the way most maps were made - but it is an inobvous source of incorrect lighting.
The only way this may have worked, is if they introduced drastic limitations to the way maps were textured, and the level builders had to keep those in mind while texturing. Possible, but far from ideal.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

To be clear, it's the reflectivity coefficient that gets derived from the texture colours, not the final intensity (lighting) of the surface.

Radiosity bouncing is still performed correctly but the reflectivity values derived from the texels are partly driving it - i.e. a red texture used on a surface will result in bounced blue/green light being absorbed and red surviving/bouncing out again to other surfaces.

So its still wrong because it is texture-based and not surface-based approximation driving the radiosity but in most cases it works out ok because the textures are usually uniform - unused areas of a texture on any surface look much like used areas, 95% of the time, in the existing maps.

But it depends on how the textures are used and the scope for error in each case - it could go very wrong if this knowledge isn't present when building maps with it. It clearly has gone wrong in some maps.

I'd like to fix the tool for the sake of completeness and have it sampling surfaces instead of textures, but its fairly easy to avoid those problems now that I've read the code and aware of it.
VladR
Atariator
Atariator
Posts: 18
Joined: Thu Mar 05, 2015 7:30 pm

Re: Quake 2 on Falcon030

Post by VladR »

If you meant the coefficient of how much light gets reflected upon each bounce, then yes-the radiosity calculations will get executed properly - namely the Form Factor calculations between the two patches.

I am slightly worried about your example with the red texture. It kinda implies that the radiosity in Quake2 is merely hacked by Id. Reflective coefficient with different RGB values? That is an abomination and not a Radiosity. It looks as if the initial energy distribution wasn't energy-based, but RGB-based. Radiosity is supposed to simulate energy transfer between all points of the surface. Lighting is just one application and RGB values should be assigned/remapped into discreet values at the last possible stage, long after all energy of the light source has been redistributed across all patches.

So, how exactly does Id's radiosity solver work ? Is it Progressive Refinement?

Can it achieve Color Bleeding? Then again, it's such a subtle effect that I would not be surprised if it was not visible, given the low frequency nature of the light maps.

Radiosity, as you noticed, is a pet peeve of mine. I spent a great deal of effort in past in creating a radiosity solver and later optimizing it into real-time solution...
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

VladR wrote: I am slightly worried about your example with the red texture. It kinda implies that the radiosity in Quake2 is merely hacked by Id. Reflective coefficient with different RGB values?
The reflection coefficient for a surface is derived from its texture (the average colour of the entire texture). It is not derived from any other material e.g. shaders or rich descriptions elsewhere.

The single exception to this is the FLAGS field which contains bits to indicate whether the surface is emissive or not.

So the input side to the radiosity algorithm is pretty simple. The problem I described relates to the reflectivity estimation itself, because it is not derived from the surface's literal use of texels but rather by abstract reference to the whole texture.

You must keep in mind however that we're talking about 1993 and this hadn't been done before in a game - ever. The only significant changes between 1993 and 1997 involved a transition from mono->colour lightmaps. This aside it appears to be much the same.

After this period a lot of other improvements appeared for other games (not just by Id) and I'm not referring to any of that here. Only what I find in the IdTech 1/2 rad tools.
VladR wrote: That is an abomination and not a Radiosity. It looks as if the initial energy distribution wasn't energy-based, but RGB-based. Radiosity is supposed to simulate energy transfer between all points of the surface. Lighting is just one application and RGB values should be assigned/remapped into discreet values at the last possible stage, long after all energy of the light source has been redistributed across all patches.
If you're referring to my RGB absorbed/bounced text, I was describing the visible effect of the radiosity, not the computation of it.

Given that most of the people reading this thread I think are Atari enthusiasts and/or programmers, not necessarily 3D engine programmers (and far less radiosity specialists) I'm not sure discussions about form factors, patches, hemicubes and energy transfer are going to make interesting reading. So almost all of my descriptions so far are based on what can be perceived when you look at the result.

VladR wrote:So, how exactly does Id's radiosity solver work ? Is it Progressive Refinement?
Can it achieve Color Bleeding? Then again, it's such a subtle effect that I would not be surprised if it was not visible, given the low frequency nature of the light maps.
Yes, it is performing radiosity and does achieve colour bleeding. This can be seen from the maps themselves without looking at the algorithm - but the algorithm looks like it should, based on what I have seen in the couple of hours I spent looking at it.
VladR wrote: Radiosity, as you noticed, is a pet peeve of mine. I spent a great deal of effort in past in creating a radiosity solver and later optimizing it into real-time solution...
I did something similar in 2002 for a commercial game title, and yes - it was a lot of effort and a steep climb to satisfactory results. Especially so given the limited power of the device and the available reference at the time was not very good. I did not, for example, have access to this code I'm looking at now (both a good and a bad thing!).

I recommend you grab Id's source and have a look yourself. If you find something you don't like, let me know and I may add it to my list of stuff to fix :) I already have some notes.

Also worth looking at the HalfLife (1) version, which despite being limited to mono, has significant changes from the Id version. I haven't had nearly enough time to study it but I'd be surprised if there was not something useful in there w.r.t the Id version.
VladR
Atariator
Atariator
Posts: 18
Joined: Thu Mar 05, 2015 7:30 pm

Re: Quake 2 on Falcon030

Post by VladR »

dml wrote: You must keep in mind however that we're talking about 1993 and this hadn't been done before in a game - ever. The only significant changes between 1993 and 1997 involved a transition from mono->colour lightmaps. This aside it appears to be much the same.
That might be an excuse for a small amateur indie team. Not for hardened veterans who had access to enormous finances after the success of Wolfenstein & Doom 1&2. You must realize they could have easily afforded to hire 50 people to work just on the editor/tools/radiosity solver, if they wanted.
dml wrote: After this period a lot of other improvements appeared for other games (not just by Id) and I'm not referring to any of that here. Only what I find in the IdTech 1/2 rad tools.
Yes, for this thread, I'm also curious only about the toolset/engine features related to Quake 1/2.
dml wrote: Given that most of the people reading this thread I think are Atari enthusiasts and/or programmers, not necessarily 3D engine programmers (and far less radiosity specialists) I'm not sure discussions about form factors, patches, hemicubes and energy transfer are going to make interesting reading. So almost all of my descriptions so far are based on what can be perceived when you look at the result.
Actually, I'd like to think of this as a welcome change to the current format. I think it won't hurt end users if they read a paragraph or two on how stuff works under the hood and that it's not really the real-time 3D engine that gives the game its final look, but rather the offline lighting toolset that takes hours to complete the lighting of the whole level.
You never know if it ignites a spark or two and somebody else might want to give it a try themselves, or just try to read more on the subject.
dml wrote: Yes, it is performing radiosity and does achieve colour bleeding. This can be seen from the maps themselves without looking at the algorithm - but the algorithm looks like it should, based on what I have seen in the couple of hours I spent looking at it.
That's interesting. Can you post some screenshots where you can see the color bleeding ? I actually find it hard to believe you'd see it given the low-resolution nature of the lightmaps. Although, I keep thinking about Q1's resolution, whereas Q2's lightmap resolution is higher. It actually just might be enough to convey the details needed, if only a bit. A screenshot would be very nice, though.
dml wrote: I did something similar in 2002 for a commercial game title, and yes - it was a lot of effort and a steep climb to satisfactory results. Especially so given the limited power of the device and the available reference at the time was not very good. I did not, for example, have access to this code I'm looking at now (both a good and a bad thing!).
Situation was same couple years later when I did my radiosity solver. Very little info on the subject, save for math-heavy 200-page science papers.
dml wrote: I recommend you grab Id's source and have a look yourself. If you find something you don't like, let me know and I may add it to my list of stuff to fix :) I already have some notes.
Nah, I always preferred to write the engine from scratch by myself. Never liked to tinker with someoneelse's work. But, in this particular case, I am all for you using Id's engine, as you got all the man-years of research / coding / debugging effort at your fingertips and you are merely porting and optimizing it for another platform. Which is a lot of fun, as you can focus on just one little aspect of the whole game codebase, and the one which has always been the most fun - e.g. counting cycles and optimizing the hell out of the code and algorithm.
Are you having less work at your job or merely got hooked on the idea of getting Q2 to run Falcon so you devote your free time to it now ?
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

Wow, that's a lot of conclusions you've jumped to in one post :)

A lot of answers can be found by going back and reading the rest of the thread.

Only porting & optimizing - that's not exactly accurate. In fact such an approach would fail if tried.

I don't use Id's code for more than reference on the Falcon build. I have other interpretations of IdTech in different forms on the PC which is also used for reference and quick turnaround tests - e.g. the hackup for float-free texturemapping was done there. The Falcon codebase however is 'from scratch' as you say.

The minimum requirement here is that the Falcon version reads & displays .BSP formatted data from Q2, and at some point Q1. But that is not where it ends - the file format and higher level bits are adaptors, so the rendering engine can draw other material - it is not tied to Quake.

There's a grey area around the BSP traversal since it deals with Id-specific structures but this is an adaptor, and not part of rendering itself. It just builds a queue for rendering and it ends there. Other adaptors can be made for meshes, other types of scene content.

Technical level of the thread / representation of what is being done and how - I think that's well covered in the thread itself.

Colour bleeding can be seen in recent screenshots in the colour-lightmap version earlier in the thread. Other versions won't show it, because for most of the lifespan of this project only mono lightmaps were supported.

As for tinkering with/learning from other people's stuff - I agree it is good to avoid this *before* you try to do something yourself, but it's bad to continue to avoid it afterwards.

Anyway, I don't want to spend time justifying decisions or objectives. I do this for fun as-and-when, on a favourite platform. That pretty much covers it for me. :)
User avatar
shoggoth
Nature
Nature
Posts: 1447
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden

Re: Quake 2 on Falcon030

Post by shoggoth »

I sense a disturbance in the force - I'm sure several of the participants in this thread are well hung - no need for measurements though :)

Let's just enjoy the loveliness of this thread and the marvellous falconesqueness of it.
Ain't no space like PeP-space.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3991
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Post by dml »

Falconesqueness - I think that needs to be a word. I'll vote for it. Could even be a demo.

BTW did you imply DarthML or DarthVladR? (no, don't answer that :-D )
VladR
Atariator
Atariator
Posts: 18
Joined: Thu Mar 05, 2015 7:30 pm

Re: Quake 2 on Falcon030

Post by VladR »

dml wrote:Wow, that's a lot of conclusions you've jumped to in one post :)

A lot of answers can be found by going back and reading the rest of the thread.

Only porting & optimizing - that's not exactly accurate. In fact such an approach would fail if tried.
Well, not in a literal sense. There's obviously lots and lots of refactoring, benchmarking, figuring out how the code works together and eventually trying to play to Falcon's strengths. I've read the thread from the beginning and your approach is sound - I'd call it Iterative Refactoring.

dml wrote:I don't use Id's code for more than reference on the Falcon build. I have other interpretations of IdTech in different forms on the PC which is also used for reference and quick turnaround tests - e.g. the hackup for float-free texturemapping was done there. The Falcon codebase however is 'from scratch' as you say.
I'm glad you're not totally hardcore, as some other Atarians, that want to do everything on the HW itself. While fun, it's woefully not productive, so I applaud your decision for the middle ground.

dml wrote:As for tinkering with/learning from other people's stuff - I agree it is good to avoid this *before* you try to do something yourself, but it's bad to continue to avoid it afterwards.
Yeah, that's an altogether different debate. Would be offtopic for this thread, though.
dml wrote:Anyway, I don't want to spend time justifying decisions or objectives. I do this for fun as-and-when, on a favourite platform. That pretty much covers it for me. :)
Sorry, if you misread my replies. No need to justify or anything. I am merely curious about the technical stuff, as I every now and then, outside of my 3D work on PC/consoles, play with 3D coding on Atari Jaguar. And Falcon is probably as close as it gets to it, that's all.


Different question: How do you exploit the DSP parallelism on Falcon ? I noticed you have previously done some benchmarking with regards to the bandwidth - e.g. whether it even makes sense to upload the data back and forth, considering the latency. I'd really enjoy if you wrote a bit more on your experience :cheers:

Return to “680x0”