Mental Ray | Illustration | Ambiant Occlusion VS Global Illum.

Lately I had the opportunity to test Mental Ray. In MR 3.4 I found “Ambiant Occlusion”, a shading tool that is becoming a true alternative to Global Illumination. Amb. Occ. is nothing new to CG, but it last implementation in Mental Ray comes with a lot of handy parameters :

  • sampling rate : quite obvious, will determine the amount of rays cast by the shader
  • spread angle : will make the probing from narrow to wide angle, thus more or less sensitive to the details around
  • distance : a critical parameter that define the probing range from near to far

Among them, Distance is a real breakthru against Global Illumination. Small probing distance make shorter render times (more than 200% in some cases). And it gives subtles areas of shadow.

Of course, it doesn’t take account of the “boucing energy” phenomenon. Fortunately that’s the funniest part of the lighting job : adding pointlights here & there to mimic the bouncing of light. That what I did in this scene.

In the end, hires render time came under 2 minutes (VS 8 minutes for a full GI solution with LW)

C++ | Empirical raytracer

Yesterday, I decided add a windowed output to a a very basic raytracer I started to write 2 years ago. I wanted to figure out how a renderer is built inside. It comes with the following features :

  • unlimited pointlights
  • load/save alias|wavefront mesh file
  • load/save tga files
  • un-efficient antialiasing, variable sampling rate
  • no space partitionning strategy (hence VERY slow)
  • bitmap manipulation(copy, box blur…)
  • mesh manipulation(translate, scale, autofit…)
  • Render window using SDL

Here’s a row output of that thing. Text stream …

Rrenderer::Rrenderer(512, 512) Rmesh::loadFileWavefront() found 861 points, 1674 triangles Rrenderer::loadFiles(), loaded 1 file(s) Rrenderer::computeNormals(), 1 mesh(es) Rrenderer::computeBoundingBoxes(), 1 mesh(es) Rrenderer::fitScene(0.750000), scale scene by (0.806781) Rrenderer::computeBoundingBoxes(), 1 mesh(es) Rrenderer::renderScene(), rendering ... line 511 Rrenderer::renderScene(), 8794 ray/polygon hit, 11520044 ray Rrenderer::renderScene(), ray casting accuracy : 0.076337 %

… and bitmap.

Things to implement, as soon as possible : a decent adaptative AA, shadow casting, a BSP, gouraud shading.
Get a snapshot here.

Mental Ray | Rusty Metal

I was looking for some rusted metal shader for a scene I’m working on and I wanted it to be fully algorithmic, no bitmap at all.

The main idea is to have blurred reflection with some dusty bumps in the less accessible areas. This require several component to be layered : diffuse, noise, ambiant occlusion, blurred reflection …
I see many benefits in algorithmic shading :

  • small memory impact
  • no interpolation artifact
  • no more tilling issue

Here’s how it works, in pseudo-code :

amb_occ = ambiant_occlusion("cone=wide","distance=small","fallof=high"); C = diffuse() * noise("grey","orange") * amb_occ; C += specular() * noise() * amb_occ ; C += reflect("blur") * amb_occ ;

Quite simple, eh ? 😀

Giorgio de Chirico, Fumito Ueda et al.

This is about inspiration, the way that imaginary worlds can circulate from one artist to another. Mostly this is speculation and unprobable bonds between nonrelated elements.

Imagine that Fumito Ueda, being young, played again & again on his 8bits Master System, that during this period he was exposed to this kind of visuals. Sharp shadows and strange perspective of desolated streets …

Alien Storm / Sega / Master System (1991) Alien Storm
Sega Enterprise
Master System
マスターシステãƒ
(1991)

Imagine that studying in art he experienced an emotional shock seeing this art, odd perspective, empty streets …


Left to right : ‘Mystery and Melancholy of a Street’, ‘Nostalgia of the Infinite’ and ‘Montparnasse Station’ by Giorgio de Chirico (1888-1978)

Eventually, the same Fumito Ueda, helped by highly-skilled teammates, designed and developped the following video game :


ICO / SCEJ / PS2

This is what inspiration is all about …

Relevant links :

en.wikipedia.org/wiki/Giorgio_Chirico :: De Chirico on Wikipedia
www.i-c-o.net :: Ico official homepage
mrl.nyu.edu/projects/npr/mpr :: Artistic Multiprojection Rendering

Render details (Mandarine)

  1. Despite the very low amount of polygons, it is always possible for a model to catch the play of light
  2. Darker areas sometime claims to be colored. This can be observed with traditional medias, especially on sensitive color films
  3. Depth of field will blur the unwanted details, as long as the shapes remains readable, and will enable you to composite a texture layer

Doctor Atome, freaky sci-fi from 50’s

This scene uses a strong backlight, as a tribute to the earlier sci-fi movies. The first step was to setup dark silhouetes on a light background, then add a backlight so that shadows will be running accross the camera, and eventualy recreate the bouncing of light to emphasize the characters’ features.

Fresnel reflexion created a slight transition around the silhouetes. An arealight casts soft shadows (but in this case a pointlight with sharp shadows will probably works as well), and spotlights here and there were usefull to trace the bouncing of light. Using radiosity here would have been hard to control and probably far less accurate.

To sum up I would say that playing with violent contrasts, orange eyes versus a dark head, helps to suggest a menacing robot.

Tank scene by day

The modeling of this scene was very quick, for I wanted to focus on lighting, as always . It simply consists of some poles in a field, around a roughly shaped tank.

  1. The funniest is : there’s only one light on this scene that suggests a raising sun and casts rather long shadows. The blue backlight seen on the tank and the robot is pure reflexion of the blue environment. Eventually, I used a strong blue fog to give the scene its overall color and to strenghten the tank agains the background.
  2. Adding grass was an obvious choice to me, for it really catch the play of light.
  3. As the final render seemed too blue, color corrections on high colors proved very useful to achieve a warmer lighting.

Mental Ray | Hair & Fur

Mental Ray Hair & Fur
Testing Max 7SP1 = Mental Ray 3.4 + Shave & Haircut, I just found a lot of nice features :

  • generate geometry, thus can be combined with ambiant occlusion
  • conform fur along a spline, reminds me Worley-Sasquatch, with more feedback
  • tickness spinners are locked to max = 100% but it can be overrid with a texture slot
  • physics enabled (didn’t tested it)

‘Tried it with ambiant occlusion & baking. Damn ! It rocks.

Making of “Caillou”, lone robot in a forest

This scene was primarily designed for a realtime toon rendering. Thus the modeling is very simple, with few polygons and square-looking shapes. Later on, I decided to render it as if it was a realistic scenery, featuring little toys.

First of all, I played with depth of field to suggest the small scale. Most of camera lenses can hardly shoot a sharp image of the whole scene, so the foreground and the background are often out of focus.

Secondly, I used the same texture basis on each material of the scene, to have a coherent overall look :


Figure above shows the process :

  • Flat shaded geometry is usually dull. I needed something to texture the shadows : a hand-painted layer was camera-mapped onto the scene, with a slightly different angle than the viewpoint
  • It’s very powerful because it’s more than a simple 2D layer and you can move freely around the viewpoint without too much distortion. But this layer is hoverwhelming if you don’t modulate it with the luminance of the initial render.
  • Eventually, I just did some levels tweaking to get colored shadows and obtain a far more interesting result.

These are the techniques involved in the creation of this scene. Everything in this process is done with animation in mind, so that I could easily redo it on an image sequence.

  1. Textured scene + shadow map spotlight
  2. HDRI-based skydome
  3. Composite of the 2 previous passes
  4. Color corrections

Non Photo Realistic Rendering :

This piece of CG is my humble tribute to the work of the Japanese mangaka Taiyou Matsumoto, author of “Tekkon Kinkurito/Black & White” and “Number 5”. A few years ago “Tekkon Kinkurito” inspired another great Japanese artist, Koji Morimoto, to create an amazing animated 3D short. Nothing about what I did can stand the comparison with their respective works, but I can’t help to share such inspirational sources.

What astounded me with the comics of Mr Matsumoto was his ability to draw almost anything with an over-distorted fish-eye effect. Of course, there are plenty of ways to render a CG fish-eye lens, using RenderMan, Mental Ray or FinalRender. But for some reasons I needed this scene to render with the scanline renderer of 3dsMax.




The Fish-Eye lens effect

The easiest way to distort a render is : put a distorted mirror in front of the camera. That’s what I did ! The camera was targeted to a simple chrome ball reflecting the scene. I just had to trigger the raytracer to get a nice and fully customisable fish-eye lens.

  1. The toon rendering itself works quite the same way. For the cell-edge effect I needed something easy to tweak and fast to render, that’s why I used the “duplicated-geometry trick” : Duplicate your model, push the polygons along their normals, flip the normals, apply a black material, a noise modifier if required, it’s done !
  2. It’s easy to setup and so fast to render that it displays in the OpenGL viewport.
  3. For the cell-shading it’s rather simple too. You just need to set the contrast of each light to 100%, so that each surface will be rendered either light or dark without inbetween values. There’s nothing easier to setup imho, because you don’t need to deal with cell-shaders, the default Blinn material will do the job
  4. The fish-eye and the toon-rendering effects works perfectly together, so that I could quickly render the scene (with a nice model was kindly given to me by Mr Masami Tanzi).