Live data from Hacker News

Path Tracing Quake in Blender

matthewearl.github.io

21–30 of 41 posts

Re: Path Tracing Quake in Blender

#21
> Texture coordinates can be encoded as Blender UV maps.

Will note that one minor detail about the Quake map format you may find interesting... Quake does not encode the texture coordinates for vertexes in the map. Instead, Quake encodes the coordinate system for textures of each face. This is transformed to screen-space during rendering.

This is different from modern renderers, which record the texture coordinates of vertexes.

Quake's system is less flexible, can't be used for character models, and can be inconvenient during asset creation, but it is a bit faster and more convenient at run-time. When you're rendering, you want to know the gradient of texture coordinates in the X and Y direction on screen, which is easy to calculate using Quake's system.

(Obviously the author knows this, but it wasn't spelled out in the article.)

Re: Path Tracing Quake in Blender

#22
A lot of valuable work on Blender side, but the main goal is questionable, and author explains why.

Pre-calculated lighting had very little to do with physical correctness, it was purely an artistic placement of light sources in a specific map processed with a specific tool (official or third party) with specific defaults. Two adjacent rooms could be lit in a very different manner because map maker decided it looked good; two maps coming from different sources could not be expected to share any common lighting principles. Quirks like overbright values were not even consistent among officially supported renderers, and were inherited by later Quake and Source engines (which would add their own quirks and light processing options). To put it shortly, there was no reference for the final result except the final result itself, and it often was unstable (changing textures, geometry, or processing constants would shift the look too much, and require fixes).

To make the game look as intended, you have to somehow rely on original lightmaps that are tightly coupled with original low resolution geometry and textures. Given that people still argue which of the original renderers gives the “true” picture, I have my doubts about making a new one that pretends some average light model is good enough for everything. Even for episode 1, hand-placed lights had to be reintroduced into the system, and ad-hoc fixes had to be done, but manual fixes are not an option for all the existing maps.

Re: Path Tracing Quake in Blender

#24
post #18

Love this. There are high-res textures for Quake which would have made this look even better. The Quake Revitalization Project[0] has created new textures "without changing the mood, theme, or atmosphere", and I believe they're packaged by default with projects like nQuake. [0]: http://qrp.quakeone.com/retexture/

If lighting and texture swaps are tasteful to a large crowd, I wonder if model swaps would be. Model swaps are more effort, but they were popular in the case of the modded FF7 community. I'd be interested in seeing a fully overhauled version of Quake.

Re: Path Tracing Quake in Blender

#25
post #18

Love this. There are high-res textures for Quake which would have made this look even better. The Quake Revitalization Project[0] has created new textures "without changing the mood, theme, or atmosphere", and I believe they're packaged by default with projects like nQuake. [0]: http://qrp.quakeone.com/retexture/

I never like projects like this. They always claim that they don't change the mood, theme, or atmosphere but maybe my definition of that is different. They definitely feel like they change the mood and atmosphere to me.

Re: Path Tracing Quake in Blender

#26
post #23

I'd love to see if the fake water surface texture could be replaced with a procedural deformation faking waves so that the path tracing could render caustics.

Unfortunately, Blender not very good at caustics. In theory, any path tracer can do them, but in practice, the sampling needs to prioritize caustic-generating regions to be even remotely efficient.

There might be add-ons that help, but vanilla Cycles will take orders of magnitude more samples to create a good image when there's caustics involved than when there's not. For that reason, it's still common to fake caustics in Blender using a texture or projection effect.

Re: Path Tracing Quake in Blender

#27
This was actually one of the first things I did with Blender when I got it! When I was a teen and Blender was at 2.5 or 2.6, I booted it up and tried to recreate the lighting in some Quake 2 maps that I had downloaded. Then I used the Shift + ` shortcut to go into first-person and re-explore my childhood in 15-fps ray-traced perfection.

Re: Path Tracing Quake in Blender

#28
post #10

Please can you do the same for Thief? :P

The Thief engine and Dromed Editor were interesting - you essentially carved out the level, and sometimes it wouldn't get the lighting maps right - which were very costly to generate.

I had a lot of fun making Thief levels though.

Re: Path Tracing Quake in Blender

#29
post #15

Earlier quoted context omitted.

Counter point: Motion blur is a simple form of low-pass filtering (in the time direction). You need some kind of filtering to prevent shutter artifacts (think video of a spinning wheel), and that stays true even at a million fps.

I don't think this is how it works. We have a discrete number of rods and cones which work as a well behaved spatial sampler. Human visual system temporal sampling is smeared stochastically across the rods and cones rather than being clocked. If you truly displayed 1 million fps and there were no shutter artifacts (as there are none in any fixed-pixel displays that we are currently looking at), then the motion would…

This has nothing to do with biology, it's an argument from signal processing, which is well-understood theory (Nyquist's theorem and so on). If an object oscillates at 1 MHz, and you take 1 million still frames per second, it will rest in the same place in every frame, and thus look static. In reality, such an object would look blurred to the human eye.(+) It's this kind of artifact that motion blur (to be more precise, low-pass filtering) can avoid.

Edit: The article you linked to is very confused about some basic terminology. It equates response time artifacts of an LCD monitor that display sharp, digital images with motion blur. That's so wildly wrong I'm not even sure where to start. Maybe here: When displaying video, motion blur is a property of the source, response time one of the output device.

(+) Edit 2: To expand on this, the human vision system integrates arriving photons over time, and this way implicitly behaves a lot like a low-pass filter. A low-pass filter is different from a fixed-rate shutter, which is what people mean when they say the eye doesn't have a fixed framerate. However, there is a limited temporal resolution.

A more everyday example of this effect would be a dimmed LED. You can pulse an LED at 1 MHz, it will look dimmed, not blinking. But when filming/rendering this LED at 1 million still images per second, it will either be all on or all off, both of which are wrong (i.e., an artifact of your chosen shutter speed).

Re: Path Tracing Quake in Blender

#30
post #16
post #12

Earlier quoted context omitted.

I find the motion blur distracting :(

If you notice it, it’s not done correctly (which in games unfortunately seems to be always; presumably because it’s faked with a blur in post-processing). Few people complain about motion blur in movies, where cameras produce it through physics alone. It’s artificially added to CGI scenes so that they don’t stand out and distract the viewer.

What do you mean "if" you notice. I complain about it every single time. Of course, it's much worse in games. Only vsync is worse
Post reply on HN