Jul 24, 2011

Electricity flow material

I have added a new article on my website about a simple material featuring electricity flowing down a printed circuit. Everything is here with the traditional executable and source code!

Basically, instead of this:
You get that:

Feel free to improve it and to discuss about it here! :)

Jun 26, 2011

PhD 3D Engine - Conclusion

I have finally written an article on my website about the engine I have developed for My PhD thesis. This engine made my life easier as a PhD student.

I have learned a lot during its development:
  • first shadow mapping, virtual indirection cubemap
  • first scripting integration
  • first record/replay
I was then able to quickly:
  • design my experiments using scripting
  • build environments under Maya+MentalRay
  • record user's actions in the VE
  • extract meaningful data for analysis
And finally, I was able to put nice screenshots in my papers and became a doctor! :)

Jun 24, 2011

OpenCL Slisesix

The SliseSix OpenCL demo is finally out! :)
Feel free to discuss it here.

Jun 10, 2011

OpenCL demo of Iniguo Quilez slisesix - SOON

I will soon release an OpenCL implementation of Iniguo quilez's slisesix demo . In this demo, you will be able to "interactively" move the camera in the scene.

I am also currently working on a high-quality/resolution version. It will generate a single screen-shot with depth-of-field and more visual effects impossible to do for a real-time exploration of the scene on my poor nVidia GeforceGTX275.

The demo will also feature a preview version of nVidia Timothy Lotte's SSAA algo called FXAA3 (preview version). He sent me a preview version for testing purposes and was kind enough to accept me including a preview version in the upcoming download-able demo. By the way, there will be a Siggraph course this year on SSAA.

Here are two screenshots:

The demo from shadertoy with fxaa3,volumetric fog and camera control.

Dynamic color correction and warm glow to make the monster alive

May 10, 2011

New website online - Still no 3D stuff... :-/

My new website is now up at the following address: http://sebastien.hillaire.free.fr/. I took my whole Sunday to finalize it (even though the project section is still missing). The website has been designed using Joomla: I recommend you to use it if you want a clean website.

I will now be able to finish the last article of my PhD requiring a revision. Then I will go back to 3D experiments in-between two sessions of Starcraft2. ;)

Apr 2, 2011

More updates coming soon

I know that I have not updated my blog for a while and this is due to many factors: many recent deadlines at work (crunch time ftw), re-design of my personal website (it turns out that it takes a lot of my free time, it should be finished soon), etc. I have also spent a lot of time updating my knowledge of ASM (never used during my PhD!) and experimenting with a particular focus on low level optimizations using MMX and SSE. Applications of this at work were really successful! :)

I will refocus soon on 3D experiments and, hopefully, I will be able to show you something about my work at Dynamixyz.

Stay tuned! :D

Dec 21, 2010

Symbolic computations

Just found a good symbolic (algebraic) computation program that can help you to develop/visualize/simplify your formulas. The graphical interface is name XCAS and uses the GIAC engine. You can download everything here.

As an example, you can "pre-compute" rotation matrix from Euler's angles for a 3 bands spherical harmonics vector and visualize it as following:

Good to start optimizing things...

Dec 19, 2010

Eye rendering

Some more rendering R&D I am on: eye rendering.

here are the supported features: light refraction at cornea for point/spot and environment lighting, light concentration, light scattering in the iris, procedural description of the organic structure of the iris.

A brown eye

A fantasy eye
I hope you like it! ;)

Dec 12, 2010

Skin rendering - environment lighting

In parallel to the development of the graphical pipeline of Dynamixyz, my work also involved some R&D on rendering. I may show some of my work here when my technical director allows me to do it.

Some results showing the GPU Gems 3 skin rendering method but this time no point or spot light: only environment lighting using spherical harmonics! Below, some screenshots showing a head model lit by its surrounding environment (with an without light directional light occlusion.) Of course, this is rendered in real-time and with gamma correction. These screenshots emphasize the importance of using a ambient lighting model that takes into account incoming light directions of the environment as well as directional occlusions.

Environment lighting with a cube-map having a
pure red color on a single face.
(left without, and right with directional light occlusion)

Environment lighting with a cube-map from Humus.
(left without, and right with directional light occlusion)

This is static and I am working on an idea to make everything dynamic. The occlusion is computed on the GPU using rasterization instead of ray tracing.

The head model is a free scan released by Infinite-Realities. Thanks to you Mr. Lee Perry Smith!

Dec 4, 2010

Books + interesting CUDA facts

Hi followers!

I know I am still not updating often this blog. In majority, this is, again, due to my new work and the preparation of my PhD thesis defense. So, I am doing a lot of interesting stuff at work that I may share in here some day. Besides, concerning my PhD, my last paper has been successfully presented last week at VRST2010 by my advisor (I was not able to go myself). This paper was about simulating the Human visual system using the new visual attention model I have proposed to predict user's gaze during real-time first-person navigation in interactive 3D virtual environments. Also, my last collaboration ended with a paper accepted for publication in the IEEE TVCG journal. This paper is about real-time haptic interaction with fluids: my small contribution is a cheap fluid rendering method. I may talk about it here soon. I now only have to think about my PhD defense presentation! :)

Note on CUDA

I have read the two books about CUDA (1 and 2). They are pretty amazing book for learning the basics but I was still hungry after that. So I have decided to read more documents like the nVidia best practice recommendations. I was surprised to see that these books/documents advice a set of "simple" rules to follow in order to get good performance such as "Increasing occupancy is the only way to improve latency hiding". But, as exposed in this very good presentation, you have to be careful with these advices. It reveals another set of rules for better performance with lower occupancy. Overall, like with every computing systems, you should always try several codes and use the one which give the best performance.

Amazing books

- This book about the two Id johns is very well written! I could not stop reading it!

- Are you looking for a book to learn physically-based rendering methods? Stop searching and buy this one! An incredible amount of methods are covered in this book with a new presentation style I have just discovered: literate programming. The book covers a large range of knowledge: from the basics (ray tracing, collision, etc) to the advanced one (metropolis light transport, sub-surface scattering, spherical harmonics, etc). There are all Math equations and corresponding source code! Perfect!

Oct 26, 2010

Best Fit Normal Map Generator + Source Code

The BFN generator is finally here! I have found time for this tonight.

So, this small application allows you to generate each face of a BFN cube-map. If you want to encode the BFN only as the length of the best fit normal or transform it to a 2D texture (as suggested in Crytek's presentation), you will have a little bit of work to do but it should not be such a big deal. You can select the resolution of the cube-map as well as the bias vector at compilation time.

Some screen-shots for 256x256x6 cube-maps:

At the origin: the BFN cube-map with a bias vector=vec3(0.5,0.5,0.5).
in the +X direction: the regular normalization cube-map.
In the +X+Y direction: a BFN cubemap with a bias vector=vec3(0.5,0.5,8.0/255.0). It results in less precision for normals having negative Z value and more precision for normals having positive Z value.

The reconstruction error of the regular normalization cube-map as compared to the ground-truth normal map. (scale factor of 50)

The reconstruction error of the BFN cube-map with bias a vector=vec3(0.5,0.5,0.5).
Some reconstruction errors are still visible. (scale factor of 50)

The reconstruction error of the BFN cube-map with bias a vector=vec3(0.5,0.5,8.0/255.0).
No more error patterns are visible. (scale factor of 50)

Reconstruction error on the back faces (scale factor of 50). There is a large error when using a bias vector of (0.5,0.5,8.0/255.0). However, it is not important since only the positive Z values are important when storing normals for a light pre-pass or deferred renderer.

Error when computing a specular lob with the regular normalization cube-map. The specular exponent is 64.

No noticeable difference when changing the bias vector of the BFN.

You can download the source here!

And finally, the important references :
  • Amantide ray marching paper.
  • Crytek's presentation from SIGGRAPH 2010 as well as their 2D BFN texture (which I recommend) can be downloaded here.

Oct 23, 2010

Some more links

Oh, by the way, my tool to generate the Best fit normals cube map will be available shortly (together with C++ sources). Many people asked me about it... Now, I just need to write a blog post and put it on my personal website for download.

Oct 13, 2010

News and random links

Hi everyone!

I am currently very busy because of the end of my PhD thesis and my new job! This is why I am not currently very active.

So, as I said, my PhD is over. The manuscript is currently proofread by my two advisors. I will defend my PhD on January 21st 2010.

I finally had a phone interview with the game company that contacted me 2 times last year. Despite the fact that "I have a very interesting profile", they told me that I still "have to get more experience"... So sad... :/ So this is what I am doing right now by working at Dynamixyz as a R&D engineer. It is a new French start-up so you can imagine that there is a lot of work to do!! :) I am mainly involved in the development of the CG part of their facial animation tools pipeline.

I want to finish this post with these interesting/funny random links:
  • Interesting paper from Insomniac on 2 band spherical harmonics with truncated triple product.
  • Patterncraft or how to teach design patterns using Starcraft2! Much more fun than typical school use cases! :)
  • The blog of a French guy working at Crytek. Sorry, it is in French. :)
  • Game design fundamentals blog post
  • 16bits ALU in Minecraft here
  • Log out fail in MoH
  • Amazing dance animations in this TF2 video
  • What is exactly a doctorate? Answer

Aug 31, 2010

Eye rendering - first try

I was in holidays near Deauville (France) last week, that's why I remains quiet.

I have started working on an eye rendering method inspired by the one presented in this paper. As you can see on the next screen-shots, I have some interesting first results. The characteristics of the eye is taken from biologists reports papers. The iris is rendering using the subsurface texture mapping method simulating single scattering in participating medium (in this case, the iris). The light refraction at the cornea is taken into account in a different way than what is done in the eye paper (their refraction function). The sclera (the white part) is currently not shaded.

I hope you like it!

Blue iris rendering with refraction.
(click on the picture for higher resolution)

Green and Brown eyes.

I have set-up the scattering/extinction parameters rapidly so you may not found the color of this eyes really "realistic"! I still have to improve the current algorithm and I have some interesting idea for that.

Aug 13, 2010

Quackecon 2010: Carmack's keynote

Every developers familiar with virtual texturing would have though: "this is a real scalable technology"! Carmack just proved it with his iPhone4 Rage demo running at 60fps!

By the way, I am looking for a full video of the keynote. I, I mean google, can't find it...

Also, John now has a twitter which would work as his old .plan files! Back to good old time?

Aug 12, 2010

BFN: about Crytek's approach

In my case, I have computed the best fist RGB value given a bias vector and, of course, the direction to fit. The BFN are stored in a cube map.

Crytek's approach is only storing the length of the best fitting vector for the requested normal direction. Furthermore, as explained in the notes (slide 94), 8-bits precision is sufficient if the best fit length is stored for the normal divided by maximum component.

As pointed out by Vince on my first post about BFN, there is some symmetry on each cube face. Indeed, the cubemap can be compressed into a single 2D texture (slide 94). This allows to save video memory at the cost of several ALU operations in the fragment shader (slide 95).

When using this final representation as a 2D texture, it is not possible to change the bias vector as I have proposed in my previous post. However, results seems to be good enough with Crytek's approach... (slides 42-43) Is it worth the cost to use a cubemap? My next step will be to compare the image quality with or without changing the bias vector in my deferred relief mapped renderer.