how to combine mesh, albedo and normal map for creating photorealistic rendering of a face?

344 views
Skip to first unread message

thelinuxmaniac

unread,
Dec 2, 2011, 6:27:09 AM12/2/11
to pb...@googlegroups.com
I have the following:
- a triangular mesh of a human face
- an exr file containing the albedo of the face (frontal view)
- a normal map (in exr format) of the face (frontal view)

How can I combine the information in these 3 files to generate a photorealistic rendering of the face? Here is the code that I am using for simple renderings:

== Code Start ==
Scale -1 1 1
Film "image" "string filename" ["renderings/face0.exr"]
    "integer xresolution" [1200] "integer yresolution" [1200]

LookAt 0 0 1    0 0 0  0 1 0

Sampler "lowdiscrepancy" "integer pixelsamples" [16]
PixelFilter "box"

Camera "perspective" "float fov" [60]

SurfaceIntegrator "directlighting"

WorldBegin

#-------[ lights
AttributeBegin
  CoordSysTransform "camera"
  AreaLightSource "area" "color L" [12 12 12  ] "integer nsamples" [16]
  Translate 0 2 -10
  Material "matte" "color Kd" [ 0 0 0 ]
  Shape "disk" "float radius" [3]
AttributeEnd

AttributeBegin
  AreaLightSource "area" "color L" [2 2 2] "integer nsamples" [16]
  Translate 0 10 2
  Rotate 90 1 0 0
  Material "matte" "color Kd" [ 0 0 0 ]
  Shape "disk" "float radius" [10]
AttributeEnd


#-------[ texture
Texture "bump" "float" "imagemap" "string mapping" ["planar"] "string filename" ["textures/face0_diffuse_texture.exr"] # diffuse texture

#-------[ Material
Material "uber" "color Kd" [.8 .7 .4 ] "color Ks" [.05 .05 .05]
     "float roughness" [.01] "texture bumpmap" "bump"

#-------[ Objects (3D mesh)
AttributeBegin
    Translate 0 0 0
    #Rotate 40 1 0 0
    #Scale 4.25 4.25 4.25

    Include "face0_geometry.pbrt" # 3D mesh

AttributeEnd

WorldEnd

Matt Pharr

unread,
Dec 2, 2011, 9:22:44 PM12/2/11
to pb...@googlegroups.com
Photorealistic may be difficult!  Rendering photorealistic people is quite hard in practice.  What are the shortcomings of the results you're seeing?

One question is whether the projection you're using is working well for projecting the texture onto the geometry.  (If so, then great!)

Then you most likely want to use the subsurface scattering integrator and to use a material with subsurface scattering.  You'll probably want to use the kdsubsurface material, which allows you to bind a texture with something like a diffuse scattering coefficient to the material and then turn that into the parameters that have to be set for the subsurface scattering integrator.

Thanks,
-matt

--
You received this message because you are subscribed to the Google Groups "pbrt" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pbrt/-/pGcWE2Q6wWwJ.
To post to this group, send email to pb...@googlegroups.com.
To unsubscribe from this group, send email to pbrt+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pbrt?hl=en.

thelinuxmaniac

unread,
Dec 5, 2011, 3:38:31 AM12/5/11
to pb...@googlegroups.com
No, the projection of texture (which is available as an exr image) on the 3D mesh is not working correctly. However, I am hopeful that it will work correctly because I have a 4x4 matrix that transforms the 3D mesh such that it aligns with the camera view that captured the texture. I will take some time to figure out the details but I am hopeful that it will work. Let me try out some more techniques and I will update you as I progress.

Thanks for that integrator and material type tip. I was looking for it.

Regards,
Abhishek

Weiyi Zhang

unread,
Nov 18, 2013, 5:40:57 PM11/18/13
to pb...@googlegroups.com
Hi,

This may be a late reply but any updates on applying normal map and diffuse texture to triangle meshes? I'm working on the same issue and would love to gain some insight. Thanks!
Reply all
Reply to author
Forward
0 new messages