martes, 12 de noviembre de 2013

Blender Cycles: Making of a Cornell Box Scene

Hi everybody. Today I'm going to show you the making of a Cornell Box scene. I will explain a couple of tricks and the compositing I have used to make it more photorealistic.

Hola a todos. Hoy os voy a enseñar cómo hacer un escena de la Caja de Cornell. Explicaré un par de trucos y la posproducción que he utilizado para hacerla más fotorealista.

This is the Cornell Box scene I have made (you can see high resolution version here):

Esta es la escena de la Caja de Cornell que he hecho (puedes ver una verión de alta resolución aquí):


The scene is quite simple. A box made of diffuse lambert material, one sphere made of mirror material and a glass sphere. The material of the mirror sphere and the box has not secrets:

  • Box: Diffuse shader with roughness 0.0 (so it uses the Lambert's algorithm). The colors are blue (0.161,0.133,0.427), red (0.630,0.065,0.050) white ground/ceiling (0.725,0.710,0.680) and white wall (0.723,0.708,0.680).
  • Light: Emission shader with strength 15.0.
  • Mirror sphere: Glossy shader, with color (0.8,0.8,0.8) and Sharp option (perfect mirror without roughness).
La escena es bastante simple. Una caja hecha de un material difuso tipo Lambert, una esfera con un material tipo espejo y otra esfera de cristal. Los materiales de la caja y de la esfera de espejo no tienen secretos:

  • La caja: Diffuse shader with roughness 0.0 (so it uses the Lambert's algorithm). The colors are blue (0.161,0.133,0.427), red (0.630,0.065,0.050) white ground/ceiling (0.725,0.710,0.680) and white wall (0.723,0.708,0.680).
  • Luz: Shader de emisión con fuerza 15.0.
  • Esfera de espejo: Shader de brillo (Glossy), con el color (0.8,0.8,0.8) y del tipo Sharp (espejo perfecto aspereza).

First trick: the glass material  / Primer truco: el material del vidrio

Blender and cycles provide a glass material which I don't like. It produces sharp reflections:

Blender y cycles proporcionan un material de vidrio que no me satisface. Produce unos reflejos muy acusados:






To avoid that problem I have used a mix of refraction shader and glossy shader with fresnel factor:

Para evitar este problema he usado una mezcla de los shaders de refracción y  de brillo, con un factor de mezcla tipo fresnel:



I have kept the original IOR only for refraction (1.75) but I have used a lower IOR for glossy reflections (1.4). This way the glass reduces its reflections.

He mantenido el IOR sólo para la refracción (1.75) pero he reducido el IOR para las reflexiones brillantes (1.4). De este modo el vidrio reduce sus reflejos.


Second trick: the wall in front the camera / Segundo truco: la pared enfrente de la cámara

I have used a camera with 35mm of Focal Length, which is the standard focal length in Blender (it comes from Fotography). At this point the camera is out of the box, so if you close the box you can not see the scene. A common problem is seeing the World in the mirror sphere:

He usado una cámara con 35mm de distancia focal, que es la distancia focal estandar en Blender (procede de la fotografía). En ese punto la cámara está fuera de la caja, de modo que si se cierra la caja no se puede ver la escena. Un problema común es ver el universo (World) en la esfera de espejo:


To fix this problem I have tweaked the material of that wall:

Para solucionar este problema he ajustado el material de esa pared:






I have made it transparent for the back side and with diffuse material for its front side. So the camera can see through that wall.

Lo he hecho transparente por su cara posterior y coun un material difuso en su cara frontal. De este modo la cámara puede ver a través de esa pared.


Final compositing / Posproducción final

This is the final result without compositing:

Este es el resultado final sin postproducción:


The render looks fine, but it is a bit artificial. I have tried to make it more natural and photorealistic with this compositing setup:

El render está bien, pero es un poco artificial. He intentado hacer una imagen más natural y fotorealista con esta configuración de postproducción:


Basically the nodes make these tasks:

  • Filter Soften: This node reduces the shap borders in the rendered objects.
  • Lens Distortion: I have only used the chromatic dispersion which appear in the glass refractions.
  • Tonemap: This node makes tone mapping effect.
  • Color Balance: It produces more contrast in the render.
  • Glare Ghosts: This is an effect produced in camera lenses. This node creates it in the render.
Básicamente los nodos hacen estas tareas:
  • Filtro de Suavizado: Este nodo reduce los bordes afilados de los objetos renderizados.
  • Distorsión de Lente: Sólo he usado la dispersión cromática. Aparece en en las refracciones del vidrio.
  • Tonemap: Realiza efectos de mapeo tonal.
  • Balance de Color: Produce más contraste en el render.
  • Deslumbramiento de tipo fantasma: Este es un efecto que se produce en las lentes de las cámaras. Este nodo lo crea en el render.
I hope you like this brief tutorial.
Bye.

Espero que te haya gustado este pequeño tutorial.
Hasta la vista.

1 comentario:

Unknown dijo...

Hello El Brujo !

Thank you very much I realize every tutorial you post, and I learn a LOT.

Can you tell us what the render set up is for the Cornell and How long it takes, please ? (I know it depends of the config of the computer, but I wanna have a benchmark)

Thank you for your work !

Adrien

Este sitio emplea cookies de Google para prestar sus servicios, para personalizar anuncios y para analizar el tráfico. Google recibe información sobre tu uso de este sitio web. Si utilizas este sitio web, se sobreentiende que aceptas el uso de cookies. Más información Entendido