Currently browsing tag

programming

Sleep Sort

Usually, the only content coming from open-message-board extravaganza 4chan is … questionable, at best, but someone pitched a sorting algorithm that’s trivial, beautiful and a bit unique: Sleep Sort. Bonus points for having a great lazy name, and it does work. It basicly forks a process and lets it sleep for …

HTTP XML Post using Python

It’s basic stuff like this that always slips my mind when I need it. There are literally millions of ways to do this, but for me, this one is the most practical. This should work on all Python versions (both 2.x and 3) and doesn’t use any nonstandard libraries. Of …

Days intervals in PHP

I needed a funtion that provided me with an array of all the dates between two given dates. This is quite a trivial function, but all over the net there are several implementations which are often quite bloated. By leveraging the power of strtotime it’s actually pretty easy! function getDays($start, …

Suggestive Contours Code

The little download counter on my super secret world domination dashboard indicates that my thesis code implementations of rendering suggestive contours on 3d meshes has been downloaded over a hundred times. Which tickles my curiosity. If you’re doing anything fun, serious, silly (or can’t get the damn thing to work …

Displaying Shadow Volumes

Today I found a way to render the shadow volumes used in the stencil buffer technique I posted about yesterday in Ogre3D. Sometimes all you need is a ninja and three penguins to get a good insight. These are the shadow maps for one single point light source. Notice how …

Then we will fight in the shade

I’ve spent the day reading up on shadowing techniques for real-time rendering which can be used in the Ogre3D project I’m working on. I was not familiar with the details of the shadow volume method using stencil maps. It’s actually pretty clever, and it’s interesting to read how John Carmack …

Ogre3D ASCII

I’m working my way through Ogre3D at the moment, to freshen up my C++/Visual Studio skills. I got my student copy from DreamSpark : seems that I’m still registered as a student, and thus qualified for free software – Yoink!. Browsing through the samples, I thought this was a nice touch: …

PBRT Renders

Here are some PBRT renders I made, to compare between using photon mapping and using regular raybouncing. I recompiled PBRT with the advanced Photon Mapping Integrator (C++ code available here) to speed up the Final Gathering algorithm. There’s still a lot of noise in the final image, but the caustics …

Contour and Valley detection using GLSL

Today, I managed to perform contour/suggestive contour rendering in imagespace – thus working on a rendered diffuse shaded image. After using the Sobel edge detection filter  to detect regular contours, I looked for an efficient algorithm to detect valleys and creases, in order to draw suggestive contours as well. As …

VBO Win

Using Vertex Buffer Objects to transfer my mesh data (vertices, normals, curvatures) directly into GPU memory using STATIC_DRAW_ARB pointers just tripled the performance of my GLSL shader implementation. Running a heavy model (+300k vertices) drawn with contours and suggestive contours at 24 fps, average.