Simple Features

Image Textures

  • imageTexture.cpp - contains all information for sampling from image textures
  • To model all the complex materials that are needed for my scene, it is essential to first implement textures into the renderer. In "imageTexture.cpp" a bitmap image (.exr) or a PNG file is loaded into memory. To load PNGs an additional library called lodepng was used (source). Instead of having a fixed albedo color, the color is evaluated by sampling from the 2D image texture according to the uv position. The color value for a point on the mesh is bilinearly interpolated from the pixels of the image. See below for a comparison of a texture in Nori and Mitsuba:

    Mine Mitsuba

    Normal Mapping

  • normalTexture.cpp - contains all information for sampling from normal textures
  • mesh.cpp - in Mesh::setHitInformation the shading frame is computed acording to the normal map
  • Normal maps are an easy way to add additional detail to the surface without changing the geometry. The normal map sampling is implemented in normalTexture.cpp. The Normal Texture code is very similar to the Image Texture one from above, the only difference is the range of the values. While the color ranges from 0 to 1, the normals range from -1 to 1. Therefore, the rgb values have to be remapped to this range. In mesh.cpp in the Mesh::setHitInformation function the shading frame is then created using the normal sampled from the normal map. See below for a rendering with and without normal mapping:

    Mine Mitsuba

    Modelled my own meshes

    clay_rendering

    For the final project I modelled a couple of meshes myself, such as the building of the bar itself, the glowing jellyfish, the whisky glas and the octopus. I will show here the process of sculpting the octopus in Blender:

    I started the process by creating a base mesh of the octopus, which consisted of two spheres for the head and eight tentacles made from curves with an applied skin modifier. In a next step, I sculpted some of the coarser details on the head with the Blender sculpting tools.

    head_sculpting

    Then, I joined all the tentacles with the head and smoothed out the connections. To be able to later change the mesh even with more details, I decided to do a complete retopology of the sculpting by hand and then use a multiresolution modifier. This workflow allows me to model the details and also keep the low resolution topology of the octopus.

    head_sculpting

    With a high resolution subdevision I sculpted the small details on the octopus, such as the suction cups of the tentacles and the rough surface of the skin.

    head_sculpting

    Finally, I painted a texture using the software ArmorPaint, as Blender is not the best tool for 3D painting and finished it up by adding a slightly rough normal map to the mesh.