Sticky Postings
Some days late, I totally forgot about it yesterday, but here is the review of February.
Continue reading "To Do in March"
Tuesday, March 9. 2010
Edge LoopI added a new UI-control to show the length of the edge being split. So now only the second part is missing, adding a transparent quad with a texture with a "+" and a "-" on it to show in which direction the edge will move. Channel MaterialI have defined all the necessary pins for the shader model. When doing so I also thought about the next steps and there are some problems. One is, that the raytracer uses quite different data and for example handles antialiasing whereas the OpenGL-renderer doesn't. I will have to think about a way to handle that, I only have an idea at the moment. If possible I would like to avoid to implement the operators twice, once for OpenGL and once for the raytracer.
Monday, March 8. 2010
Continuing with the channel material is not as easy as I had thought. The problem to finished the preprocessing step is, that the output operator had the wrong pin-type. For some reasons the shaders need to output quite some data so I can use it in the raytracer. So I had to add a new pin type to represent that. And now I first need to implement a component turning color into shader output. I could obviously just leave it at the color pin I use now, but honestly I would not like to write much code I will very soon have to throw away. So I decided, that I will add an adapter to the list of operators which will use the shader models I have for my other material class and make it usable for the Channel Shaders. I always intended to add that so I can at least use some of the code I have written for my older, simpler system.
When I tried to use the result of the Edge Loop-modifier I found out, that something didn't work correctly. I obviously didn't get the correct length of the edge. When I today looked into it I found out, that the Change Geometry had a bug, when an edge was split multiple times it didn't correctly record that in a map. So I fixed that, although I already knew at that point, that it won't be the correct solution. But it is a very important class and so fixing problems with it is also very important. In the meantime I have found an easy way to get the length of an edge. I could destroy it if I made a change in the future, so tomorrow I will add a comment to explain that. But I am still not finished, there is one more problem. I can't see, where the edge starts, so if I want to split an edge close to the middle, I can't tell if I use the right length. I think I will add a small helper tomorrow which shows a texture with "+" and "-" so I can immediately tell, which direction is which.
Saturday, March 6. 2010
Today I also worked on the HTTPD. I have extended the response- and request-classes so that the request can tell the response, that the client (i.e. the browser requesting a page) can handle compressed pages. As the evaluation, if a client understands compression is costly, I added a virtual function to the response so an implementation can inform the request, that it can't compress the contents and so it doesn't have to look into the header. Currently the error response doesn't return any data, so it obviously doesn't need to support compression. The same would be true of binary data like images, but I haven't defined a response to handle that yet, currently I can only send texts.
I have finished the changes to the Edge Loop modifier. It now works mostly as I expect it. There is a small issue where values only change after the scene is refreshed I don't quite understand, but it doesn't look too bad to use. So tomorrow I will finally try to use it for a real model.
Friday, March 5. 2010
I was so lazy yesterday, I haven't done anything at all. Today I have continued with adding the Channel Material to the OpenGL-part of the program. The first step to use the Channel Material is to evaluate the graph of operators and build some structures. As I know, that the graph has no loops as I simply don't allow them (the program currently doesn't make any checks if there are any, though), I can evaluate the operators in a sequence, so that the input values of any operator are available when I evaluate it. That means the first structure I need is a list of operators. This list defines in what sequence the operators are evaluated. As it only contains operators reachable from the output operator, it also means that I can add as many dummy operators as I like to the material, evaluation will not suffer. I think that is an important aspect as it allows to play with alternatives. The second structure is the size of the necessary state. The state is the sum over all output values and the input values to the channel shader. The input values are things like the uv-coordinates, the 3D position and the normal of the point where we want to evaluate the shader. What the evaluation step has to do besides creating the list of operators is to tell each operator where it shall store its output and where it can find its input. All inputs which are not connected will receive a default position to read, so a pin for 2d-coordinates will receive the original texture coordinates. For channel types where there is no input, e.g. the color, I will create dummy places filled with some default value, e.g. black for the color or 0 for the intensity.
Wednesday, March 3. 2010
I have also continued a little bit on the channel material. I have started to create the OpenGL-version of the materials. I know I wrote previously that I would start with the Raytracer, but I noticed, that the first steps have to be done in the core and that is much easier to do with the OpenGL-version. So I have started with the class and will continue until the common stuff works. I haven't decided if I will then just fake the shader, e.g. paint the object gray or do a bit more, e.g. create a texture and use the Phong shader or the OpenGL fixed pipeline Gouraud shading.
The code is working now, at least in general. I still have to fix some issues, the code currently doesn't notice changes done directly in the graphic. I will try to get it fixed on Friday. I need that code to continue on the "simple room" model I have started. To make it possible to put items into the walls I need some structure where I want to put items (because of the limitation on my CSG implementation). I used simple boxes for the four walls, and I would like to put edges at certain heights, so I can cut out the hole for a window or door or to put a socket into the wall at a fixed height over the floor.
Tuesday, March 2. 2010
I had some other things to do today, but at least I am back at the code I wrote on Sunday. I also extended it a bit into the direction I am heading and am now rather certain it is the right direction. So hopefully I will manage to implement it tomorrow.
Monday, March 1. 2010
Yesterday I started with a small change I still haven't finished. The edge loop modifier, which splits quads will get a way to define the split point numerically. As I am able to select the loops, I can add a UI for it. I want to have two ways to specify the point where to split, as factor of the edge length and in physical units, e.g. meters. I didn't think it would be a big problem, but I got a bit tangled up in all the ways I can define UIs. I think I now know, how to do it and will try to fix it tomorrow.
Sunday, February 28. 2010
It has been forever that I really worked on the HTTPD, I have sometimes done some small stuff, but mostly to get it compiling again. Last weekend I managed to update my SuSE 11.1 installation to 11.2 (astoundingly the updater really works) and it finally seems to support my system well enough that I can work. The network is detected with the right speed (in 11.1 the network came up with 10Mb/s) and even my audio card works again. I am still at the point to add compression to the HTTPD, but I first added something else. As I want to write web services in C++ I need some support to make it easier to create pages. The first addition was, to have a class which creates the HTML-header (containing the DTD, the title and so on). I will extend it later so I can also pass the location of CSS- or JS-files, that way I can write it down correctly once and don't need to remember or look up how to do it. Yes, I know I am lazy. With that I extended my first test page to contain a bit more text. Next weekend I will try to finally add primitive support for compression.
I continued with the changes to the editor. Today I worked on the way I move the camera. I have a button to move around a selected object. Basically I get the difference in x- and y-coordinates the mouse has moved. Then I rotate around the selected object along the y-axis and use the x-difference to govern how far I move. After that I rotate around the object in x-direction using the y-difference in mouse coordinates. That way the up-direction mostly stays upright and it is rather easy to use and works quite well. But all my buttons in that location react to left clicks with movement and to right click with rotations. So I had not really had a good idea of what to do with the "Rotate Around"-button on movement. It was set to behave like another button, but that wasn't good. Today I finally changed it to do the same as the rotation, but it rotates around its own origin, so it only turns the camera, but doesn't move it. While doing that I noticed, that my rotations were too fast. That wasn't any new information, but it had never been important enough to fix. But today as I was working at that place I just fixed it and added handling of modifier keys similar to the one of movements. If I move while holding shift the movements get slower, holding the control key makes it faster. So I added similar handling to rotations, now I should be able to control it much better. I have also finished the other camera setting, I now can define a speed factor for the movements and the focal length (I only allow three fixed settings, 50mm, 35mm and 24mm equivalent to 35mm film). I even added a new setting to define the center of rotation for "Rotate Around" when nothing is selected. So I will have to use the new stuff and see, if it is useful.
Saturday, February 27. 2010
I finished the change from yesterday. Now the OpenGL render function has an additional parameter to request transparent rendering. I also implemented it for the polyhedron class. So this should be finished now. Then I started with the addition of the changes to the camera. First I reworked the UI I already had for settings which are specific for a model. There was quite some clutter I had to clean up. I also started to implement the factor to make it possible to adjust the speed the camera moves. For the camera angle I can't implement a simple setting. Instead I have to get the camera object of the system camera and ask that one to show a usable editing interface. I hope, that these additions will help me to model. Also I really enjoy not working on the channel shader. I will return to it soon, though.
Friday, February 26. 2010
I reworked the stuff I did earlier in the week. I now actually allow it to specify, if an ObjectPointer is rendered normally, transparently or not at all. To implement that I had to drag some old code out into a file of its own and had to do quite a lot of changes. But now it compiles (and hopefully works). So next is actually changing the OpenGL-rendering functions so I can really instruct objects to be transparent. A lot of changes for a small feature, but I am very sure it will benefit the program. It will solve some problems I had for quite some time without having the right idea of how to solve them.
|