Wednesday, April 30. 2008
Again a day without much time. I fixed the terrain stuff I started yesterday (saving and loading didn't compile). Next is actually defining the first class of fractals, then I have to define an interface to the fractal and integrate it into the building process of the terrain. For now I will probably hard code the process object, but everything is set up to facilitate exchanging it, only the UI for actually doing that will be missing. When it is working I might actually implement that UI or postpone it until I implement a second fractal process, I will see.
Tuesday, April 29. 2008
Today I finally started to implement the fractal process. I will make the objects implementing the process exchangeable so I can experiment with this part. I am not sure if there is one process I will stick to in the end, but at least as long as I am trying to come up with something usable it has advantages to be able to at least use something. So I again spent quite some time on management code and UI. I also tried the changes to the tiled material I made yesterday and after fixing two small bugs it worked as expected. It still stops in the middle of a function as I haven't finished implementing it. If it is finished it should be possible to add condition objects to the tiled material object. Then I have to add similar code for the distributions and it should start to work and I can add the changes to the raytracer.
Monday, April 28. 2008
I continued with the tiled material. Now most of the code should be in place to create a new material. I still need to add it to the tree, though. Due to the problems with Visual Studio I ran into I couldn't even test the latest code. But when I look at the old code and see the abstractions I have since written, I have to say I am now much more productive. Even if it seems slow I again have to point out, that creating all the code to handle the first object is the biggest part, as soon as that is working I add a hand full of lines to the existing code to handle new classes implementing the rest of the functionality.
I today strangely ran into problems which were related to my change from VC6 to VS 2008 quite some time ago. As I had no more problems with VS 2008 I yesterday finally decided to uninstall VC6. Today I noticed there were small problems, one was that the resource compiler was removed together with VC6, easy to solve with a repair installation. Also a difference between VC6 and VS 2008 is, that the later doesn't bring the OpenGL-headers with it, you have to install the Windows SDK (the libs are enough). The one problem which I still am working to resolve is a bit funny. I couldn't execute my programs (or more correct the debug version of my programs), a DLL (MSVCRTD.DLL) was missing. That is a debug-DLL from VC6 and was removed together with the compiler. It turned out, that it was the libpng which was causing it. The debug version I was trying to use was compiled long ago with VC6 and needed the debug-DLL. I just recompiled it with the current compiler which should solve the problem. I didn't manage to finish recompiling all of my project so couldn't test if it works now.
Sunday, April 27. 2008
I worked a lot on the tiled materials. Currently nothing is working as I had to remove the old parts and insert the new ones. The program is compiling once again, but many parts are still missing, so I can't even test big parts of the new code. The big issue is to move from a list to a tree of components. That should make it much more versatile and useful but also means a thorough rewrite. While working on it I also thought about things related to the tiled materials. One of the open issues is, that I will need something quite similar for placing objects like trees or stones. I am not sure but I think I might be able to design parts of the program so, that I can use big parts of what I currently implement to add that to the program in the future. It might even be useful for terrain generation, as there I also would like to have a way to influence the fractal process introducing variance into the terrain. I have been thinking about how to add a simple process so the terrain doesn't look as boring as it currently does. One of the problems is to influence the parameters to create interesting and variable terrain and it might be an idea to use the conditions to control the terrain generation based on properties of the hand drawn outlines.
Saturday, April 26. 2008
I didn't do a lot of programming today as I worked on finally fixing my hardware problems. I added two more discs to my server and then created a software RAID. On top of that sits LVM and I have already started to copy some of the partitions from the old hardware RAID (which doesn't work with 2.6 Linux kernels, at least the data doesn't appear, it is possible I could reformat it and then it would work) to the software RAID. When everything is copied and I use the new RAID and I don't notice problems, I will remove the disks and the hardware controller and then I should be able to at least get my server back to normal state. The reasons for a RAID controller (and I have a real one, with own controller and RAM) are getting thinner, there is basically only one remaining, for all OSes they appear as one disk and so they should in theory have less problems to cooperate. Well, my RAID-array works with Linux-kernels 2.4 but not with 2.6.
Friday, April 25. 2008
I continued work on the tiled material. The biggest thing was to decide on a class structure for the new abilities. I think I came up with something that will work. I also thought about how to convert old scenes using the current system and started on the interface to add the new objects. I also planned a new UI-element which should make implementing the UI easier. The new structure will have three classes, one gets the height and slope of a point and is supposed to derive an intensity from that. The second class will then use that intensity to decide on how to render a material. One will be the same as the current model, where that intensity is used as a water line into a Perlin noise texture and whenever the intensity is higher than the value of the noise texture the material is rendered. Another possible example would be simply blending the material using the intensity as alpha value. The last class in the design is a simple filter to change the material and thereby adding some variance.
Thursday, April 24. 2008
I worked on the importer of the "game" today. I am still not finished and will probably take some more time. What is finished is reading the file, what is still missing is creating a representation Java 3D can understand. I have started with that later part and some of it is already finished. To continue I will have to move some functions to a new class I started today and then I should be mostly done. I might have hit on a a bug in the definition of the format already, the sub objects can currently only have one material. It really is the most useful case as it is also the one which is fastest, but I will still think about it a bit more.
Wednesday, April 23. 2008
It seems I can program when tired but not model. The projection modifier seems to work as expected and I probably only selected a wrong face when I tried it yesterday. Today I was able to finally finish the geometry of the traffic cone. I won't post an image, I still haven't made the necessary changes to the exporter and the importer into the "game" and I want to post a screen shot from that program. I will try to implement that stuff tomorrow. The modifier works very well and it reacts to changes I make to the geometry of the object I project to. So I can start with a rough guess and see, how it looks and then just change the object projected to and see how the object reacts. Very nice and works exactly as intended.
Tuesday, April 22. 2008
Another day short on time. I found out, that there are two bugs with the projection modifier, the first was a modeling bug, when I created the projection modifier for the traffic cone I either had no selection or there was a bug which resulted in no selection. So the problems I had with damaged faces are to be explained by all the vertices being projected to one side of a box. The other one seems to be more important. When I selected the faces I intended to change, the result was as expected for exactly half of the selected vertices. The wrong part was exactly the vertices, where the z-coordinate is positive. I will have to look what is causing that problem, but I hope it isn't too hard to find.
Monday, April 21. 2008
Again had not a lot of time as I fetched my new car today. I hope I soon can return to my regular schedule. But anyhow I worked a bit on the projection stuff. The problem seems to be somewhere with the selections. I fixed the function which creates the faces, it now checks the faces for problems resulting from edges which are identical after the projections so that the face is no longer valid and then just ignores the face. That allowed me to see, what the projected points look like and the projection modifier seems to have affected a lot of vertices it shouldn't have seen at all. I have to implement another little function I somehow forgot which should display the selected vertices. Then I hope to see, where the problem is coming from.
Sunday, April 20. 2008
As weather is getting better I was working outside with the laptop, so today I worked mainly on the tiled material. I am slowly reshaping the UI so it is better suited to the changes I am about to make. For now I keep the same back end stuff and am "only" enhancing the user interface. It again takes considerable time to do that as it isn't easy to create generic interfaces to manipulate the UI-components. Having no direct access always has that consequence, but at the same time regularly leads to good and reusable designs. The first thing that has to change is, that adding a new channel (and later conditions and materials) should be reflected in the displayed tree. Currently it isn't, but I am working my way towards that, the request to sync is already relayed to the MFC-UI-element. Then I will add two new command buttons to create the new elements, conditions and materials. For that step I will also need to implement a conversion function so I can still load old scenes.
Saturday, April 19. 2008
I keep finding small problems with the projection modifier. The reason the box didn't work was, that the code looking for intersections was checking for back sides and sorting them out. It originated from the raytracer and I had forgotten to take that part out or rather to make it configurable to check for back sides or not. It is fixed now. But there were two other problems, this time with the generic support functions to handle the changing of edges and faces. The function handling edges had a bug where an edge connecting a point to itself wasn't detected. The faces still have a similar bug it doesn't detect when an edge is used twice in a face. What I don't understand is, why that is even happening, but I will fix it even if there is something else wrong. These generic functions have to be able to handle all the special cases, as only then they will be useful. If I have to see, if I can guarantee that the result is always well behaved before using them, I won't ever use them, as those border cases are affecting nearly all the modifiers. When it is fixed, I will see what is happening and then will probably able to quickly find out, how to fix the root of the problems.
Friday, April 18. 2008
Again a day without a lot of time. I looked into the projection modifier again and it seems to work when the target is a plane, but not if it is a box. To exclude at least one potential problem both objects were untransformed. But it still didn't work with the box, I even gave the plane similar extents like the side of the box I intended to project to. A breakpoint in the code showed, that it is mostly working, it only can't find an intersection of the line with the box.
Thursday, April 17. 2008
For a change today my car broke down. I slowly hope this month is over. I didn't have a lot of time to look into the program, so I choose to try to finished the traffic cone with the projection modifier I had written. But I didn't even get so far as I hit a problem in the OpenGL implementation of the polyhedron. A small bug (selection was not updated and so referenced an edge no longer in existence) but it still crashed the application. I hope I slowly have all of them after the big rewrite in November/December.
|