SphereAO

This post is very old. Please bear in mind that information here might be incorrect or obsolete, and links can be broken. If something seems wrong, please feel free to comment or contact me and I'll update the post.

Simple Ray-Tracer Screenshot

Simple ray-tracer screenshot

Over the last two days, I’ve written an extremely simple ray-tracer in C#, just as a proof of concept that this can be done in less than two hours, even without preparation. See attached screenshot…

In comparison, writing a simple ray/sphere intersection routine in HLSL took roughly 10 minutes, including phong lightning on the hit-point and binding the light to a FX Composer external light source, plus the performance was much more impressive :)

Related posts:

  1. Light propagation volumes
  2. More information on Caustic Graphics

This entry was posted in Graphics and tagged , , , . Bookmark the permalink.

6 Responses to SphereAO

  1. hehejo says:

    Oh cool. Das Bild schaut aus wie eine kleine Ansammlung von Bakterien.

    Was ist HLSL?

  2. Anteru says:

    Die DirectX High Level Shading Language, konkret hab ich das Shading Model 3 verwendet in dem Pixel Shader.

  3. maya says:

    Sieht super aus!
    Als wär es mit dem REM aufgenommen worden!

  4. Anteru says:

    Danke, gemessen am Zeitaufwand bin ich auch happy. Mit einem besseren Sampler würde es wohl noch besser aussehen, im Moment generiere ich einfach einen Vektor und schaue ob er in die selbe Hemisphäre wie der Normalenvektor zeigt; das ist natürlich nicht so gut wie eine gewichtete Verteilung und so … wenigstens ist meine gerecht :) Der Zufallszahlengenerator ist auch nicht der beste befürchte ich …

    Außerdem interpoliere ich nix, deswegen ist es so extrem körnig obwohl ich 127 Samples pro Pixel verwendet habe. Naja, bei 2 Stunden Aufwand ist mehr nicht drin, v.a. wenn man von 0 anfängt.

  5. Philipp says:

    Das find ich echt mal cool. In 2 Stunden einen Ray-Tracer zu schreiben hat schon was. Da dauert bei mir die Überlegungsphase schon länger, bevor ich überhaupt erst das Programmieren anfange *g*.

  6. hehejo says:

    Naja, das ist halt seine Welt und Anteru kennt sich da aus.
    Er weiß halt, was der RayTracer zu tun hat.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>