I am still not feeling well, but I will try to finally do the review of December.
Raytracer Quality Settings
Something I started in November, the quality settings of the raytracer. First I had to finish implementation of the new class and transfer the values to the raytracer. After that I started to add the new stuff to the GUI. Some more work and the settings were even transferred, I had totally forgotten to add that and the GUI started to work.
Then one of the lucky things happened, you often wonder why you hadn't thought of it before. I had a good idea how to handle the number of glossy rays. It was quite easy to implement and I could finish this part.
With the tests I needed to run I even had another go at finding out, why my parallelized version was only fast when run from CodeAnalyst. I found out, that it wasn't the CodeAnalyst which made it faster, but Visual Studio which made it slower. Even when no debug code is in the program, if you start a 64bit application in VS it is dramatically slower than normal and especially threads behave strange.
Raytracer Randomness
The next issue with the raytracer had to do with the glossy rays of the Ward BRDF shader. I want the raytracer to create the exact same image in each run, first for debugging reasons, but also because I think compositing could be problematic if the program doesn't behave deterministically. I can't prove the second assumption, though. The glossy rays were a problem because they use a random number generator. I needed a seed value for each pixel, but the values shouldn't correlate with the pixels or the results would show superimposed patterns.
Although simple, this feature meant a lot of work again. I had decided to start by moving some fixed values to a structure so I don't have to pass them one by one through the functions and can just pass the address of the structure. It also has the potential to make things easier in the future. As often, this was some boring, but necessary stuff. But at least such changes often lead to better code.
The next thing I found out was, that the idea I originally had didn't work. I thought you can just somehow combine some values (e.g. x- and y-coordinate and depth) and use those as seed, but that results in highly related random sequences and showed up as pattern superimposed to the rendered images. The first idea to solve that problem was to use another random number generator with bigger hidden state in the hope, that the sequences then would be much more different despite the similarities in start values.
Finally I had the idea of how to solve the problem. I looked at what I actually wanted and found out, that it was enough to use a random number generator which calculates one value per pixel. As long as that random number generator is always the same algorithm, uses the same seed and the pixels are enumerated in the same way, all conditions would be fulfilled. And it worked very well.
Testing the Implementation of Ward BRDF
The third issue in the raytracer was testing the Ward BRDF. I finally wanted to finish it, it has dragged on for a very long time. The first problem turned out to be blindness, I mistook glossy reflections for specular ones. But there was definitely something wrong. The shader created bright semicircles, I wasn't sure if they had anything to do with reality (in the meantime I know, no, they were complete artifacts).
I was able to find out, why I was seeing only semicircles, one of the terms from the paper only resulted in values between -90° and 90°. I now understand a cryptic reference to "keeping the angle in the starting quadrant", it basically meant that the angle (one of the random values) defined the quadrant and the result of an arctan had to be mapped to that same quadrant. After fixing some more problems I still didn't get what I thought should be the result.
The fixing of the last two bugs then finally brought much better results. The first I discovered from a paper named Notes on the Ward BRDF by Bruce Walter, in the Ward paper an arctan was missing. But that didn't change the rendering by much, the bigger bug was in my implementation. I had forgotten to multiply a component of the resulting vector by a factor of sin(theta) and so the directions were all wrong. And then the results looked much, much better, the images of the glossy rays were following the specular reflections.
But there still were no glossy reflections, it looked as if only very bright spots around lights were working. So I intended to create another model, but while rerendering the other two models I had used to develop and debug the Ward BRDF shader I quickly saw, what I had missed and so didn't need to do the model.
Small Stuff
I (finally) fixed the box constructor. But only by accident, I was looking for a completely unrelated problem. But I am happy to finally having done it.
I also started a little bit larger thing, making it possible to link materials so that I only have to change them once. Especially for objects made from many small parts it is a lot of work to change the materials currently. I only managed to implement the very first steps in December.
Game
Another month where I didn't get much done with the game. I am still working on the new structure for the tracks. Somehow this seems to stay the most important thing. Well, I guess not very surprising, a racing game bound to the track means, that the track is very important. I even got the new class to be filled by the old track class, but that nearly was everything I did.
Small Items
I nearly didn't make it in December to post two items. I still have some I haven't posted, though...
Schedule for January:
Development - Editor/Raytracer - New Stuff
- Finish the Skeleton handling.
- Add some simple form of hair.
- New operator for landscapes (short description)
- Rewrite 'Add Edges'-modifier to make it possible to cut a face along a fragmented edge
- Add moving constraints
- Add timelines for better animation support (description)
- Make the anivals exportable (description)
- Chamfer modifier
- Handle collisions of the cloth and the body
- Parallax mapping
- Add Depth of Field (description)
- Ward BRDFs
- Packet Tracing
- Parallel Tracing
- Speed up the OpenGL representation of polyhedron
Modeling
- Texture the character and the pieces of cloth.
- Add the skeleton to the character and the pieces of cloth.
- Model a tank top.
- Model some pants.
- Model some shoes.
- Model some skirt
- Model hair for character.
- Start on the second character.
- Continue on the ship.
- Continue on the Lab scene
- Finish Cat
- Start Bunny
Small Object - Modeling
Model four small or one medium sized object per month
Development - HTTPD
- Add the handling of compression.
- Do the benchmarks.
- Add connection to postgreSQL.
Development - Modeler and HTTPD
- Paper Doll System
Website
- Create Wallpapers
- Create Wallpaper page
Nearly a fourth of February has already passed, but here it comes, the review of January. Linking MaterialsSomething I had already started in December was the ability to link materials. I wanted to be able to define a material and link to it from oth
Tracked: Feb 07, 21:55