Posts

Showing posts from 2007

3D Engine Design

During the past weeks, I haven't been able to come up with something new and/or meaningful. But for those interested in building a 3D engine, I came across the Lightfeather 3D engine . And the guys over there describe (in a high level manner - functional point of view) the design of their engine. So an experienced graphics developer might use this information to design a "copy" or get inspired by the Lightfeather engine. Following is the "table of contents" of the Lightfeather 3D engine design: Introduction Geometry Scene Portals Rendering

Talk like an animal, walk like an animal ...

Well, after some time has passed, it seems that Microsoft's Terrarium is at least surfacing again. I have played around with Terrarium while doing some AI in the university. Official links are not working but googling a bit has popped a Microsoft site about some Canadian Terrarium contest. Look here http://msdn.microsoft.com/canada/terrarium/ in the bottom of the page you may even download some video made at the contest but it is not working. The new download link on windowsclient.net is this one https://windowsclient.net/downloads/folders/starterkits/entry1269.aspx Browsing through MSDN has surfaced that Tom Anderson did a VB.NET port of Terrarium from .NET framework version 1.x to 2.0. You will find the respective MSDN post here http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373738&SiteID=1 Unfortunately, he has stopped working on the project and there is no visible link to me where one can grab the .NET 2.0 port of Terrarium. Maybe there is some time left to play aro...

Newbie on the CCR Road

This post is about the CCR part of MRS, in particular I am going to do some simple examples about ports and a simple arbiter the Receiver. CCR components use ports to communicate with each other. Just like a human being uses speech, verbal speech, or mimicry to communicate, so do CCR components use ports to communicate with each other. Ports are used to Send a message to a particular receiver. Receive a message from a particular sender. In terms of CCR port, we have to define how the message, looks like that our port is going to receive. For this, we have to define the message's underlying data type or more precisely we have to create a port, which receives a message with some particular data type. Port < string > stringPort = new Port < string >(); This creates a new port, which is able to send and receive message of type string. Now, that we have defined our port, how are do we send a message? Nothing simpler than that, the port offers an instance method Post. This m...

A simple GreatestCommonDivisor service in C# - Part2

What if we wanted to consume our previously built GCD Service by a web browser, such as Internet Explorer? ... Nothing easier than that. In fact, with minimal effort we can implement this functionality. Firstly, we have to (1) declare that our service supports the HTTPQuery operation, secondly we have to (2) implement a handler for this HTTPQuery request, and thirdly we may (3) test the service with a browser. 1. Just add the HTTPQuery port to the GCD service's port set, which is defined in GCDTypes.cs (assuming that your service is named GCD). [ServicePort()] public class GCDOperations : PortSet {} So now that we have declared that our service is capable of understanding a HttpQuery action, we need to implement a routine, which handles such HttpQuery requests - a HTTPQueryGCDHandler. 2. Add the following lines to the GCD.cs [ServiceHandler(ServiceHandlerBehavior.Concurrent)] public virtual IEnumerator HTTPQueryGCDHandler(HttpQuery httpQuery) { if (! string .IsNullOrEmpty(htt...

A simple GreatestCommonDivisor service in C# - Part 1

I was finally able to get the GCD service up and running. Essentially it does nothing different than my previously posted GCD service, which is implemented in VPL. So to recall, this service computes the greatest common divisor of two positive integer numbers (inputx, inputy) and outputs the result as greatestcommondivisor. Based on this description of what the service does, the remainder of this post will guide you through the process of how I built such a rather simple DSS service using the MRS object model and C# as implementation language (as mentioned you could also choose VB.NET, C++). This kind of tutorial is divided into distinct steps beginning at creating a new service project to the final result being the service we want. Create new DSS Service The first thing one has to do in order to set up a basic GreatestCommonDivisor service is to create a new DSS service.We will do so by creating a new Visual Studio 2005 Project. More specifically it is a "Simple DSS Service (1.5)...

Online Lectures

Hi folks, I found this link about online learning in video form on another blog and thought I could repost it here http://videolectures.net/ so thanks goes out to http://smart-machines.blogspot.com/ Both links are available in the sidebar. Other online lectures http://www.researchchannel.org/prog/displayinst.aspx?fID=880 Christian

Microsoft Robotics Studio - First Sight

Microsoft Robotics Studio (MRS) I have recently come accross this great piece of new technology, offered for free by big MS [1]. MRS allows to program robots and other external devices via a visual programming language (VPL) or your prefered .NET programming language, such as VB.NET or C#. MRS main abstraction is a service. Assuming you use VPL, a service is graphically represented as a box. Services exist in their own space and can be combined via message passing. In fact, services communicate via a SOAP-like protocol. This communication act is graphically represented by wires between services. Where such a wire connects the output of one service to the input of another. It is up to the developer of a service to decide what a service does, i.e. what kind kind of messages a service understands and what output a service produces. Therefore one can develop rather simple services such as a NoOP service, which does nothing, to a more complex service that for example takes a picture from a...

Working the Snake - Python

I finally found my way to (Iron) Python[1][2] - well I did some Python in the beginning of my studies but lost focus after some time. The experience was quite impressive, since development time is greatly reduced by such a dynamic language. I managed to get some small programs running in less then 1 hour and of course I want to share them with you - precious audience. Since these are my first scripts, I assume that they are not quite correct/stable/... - they are simple and not very error-safe (no checking of arguments ) ... The first is some simple factorial program, which tries to find the greatest common divisor ( gcd )of two numbers by employing the fact that gcd (x, y) = gcd (y, r) where r = x mod y. Since I do not know how a scope for loops can be created (scoping a while/for loop) I did the routine recoursively. The second function builds on the first and is allows to ask whether some number x is a prime number by using the simple strategy of finding a gcd within the range of 1...
Well not much happened today. I was able to implement a triangle filling routine and read a bit on .NET remoting. I thought about how to implement a Z-Buffer for my small system and thought about homogenous clipping as well. The problems I have right now are: I want to implement basic triangle 2D screen-space clipping. Which itself is not a big deal but I do not want to implement a polygon filling scan-line algorithm. A polygon may be the outcome of a triangle clipped against a rectangular clip window. So what is there to do ? Either clip a triangle which produces a polygon and implement a "simple" scanline algorithm to fill that polygon. The other option is of course to split the triangle into a series of triangles. Either way has its intricacies. As mentioned in yesterday's I want to implement homogenous clipping for triangles. Which makes things even more complicated then a simple 2D clipper. The reason is that not only a triangle can be split into a series of triangle...
In reference to yesterday's post I continued a bit and implemented the following Line drawing via DDA and Bresenham Basic Cohen-Southerland Clipping in 2D These routines may not be the fastet but this actually not the point since the code is written in managed C# and makes no use of any optimizations. It's sole purpose is learning. The next things that need to be done are drawing of triangles (including basic fill) a Z-Buffer (at least I have already set up the basics) clipping in homogenous clip space simple scene-graph If anyone is interested in some sources - I can either post them here or put them online on my website. I also thought about making the whole engine a bit more flexible. So I thought I could divide all the pipeline elements into pipeline stages. Each stage has access to some renderstate and does only execute on some defined input. As a consequence one would get something similar to vertex and fragment programs and a non-fixed function pipeline. But of course th...
I have been quite busy these days writing my own small 3d engine. I did some small stuff with OpenGL in the past and to understand at least a bit better what is going on behind the scenes, I decided to do my own small renderer. I know, why write another software renderer if there is so much available. But at least for me I can say, that what I implement I do understand a little better. Of course, it takes some time to get the basics running. Until know it does only little (only perspective projection is covered), such as the transformation from an object's local space to actual screen space. But many things are left to do such as homogenous clipping, 2D clipping, painting ... The things I want to implement as a next step are rasterization (lines via bresenham, basic filling - flat shading) homogenous clipping 2d clipping a primitive scene graph Since basic rasterization often produces flicker, I looked for a basic method to do double-buffering with windows forms and .NET and these ...

Back again :D

A long time ago ... in this galaxy :D ... Well, it has been a while since I wrote the last post. But since I was finally able to conclude my studies this thursday, the 8th of march, I hope to be around more often. I will probably start my first work on april the 2nd. My new employer will be Avanade Deutschland GmbH (german office of Avanade Inc.). And I am quite happy about that since I expect a great learning experience - well but let's see ... Since I am not too busy these days I will try to have a look onto several things such as SQL Server 2005 and maybe I get my hands dirty with Phoenix again. Best regards Christian