Transparency map not casting the right shadow

General discussion regarding exporter development in general.

Moderators: Ratow, coordinators

Transparency map not casting the right shadow

Postby pciccone » Fri May 14, 2010 3:20 pm

Hi.
I'm in final step of writing an exporter but I'm still struggling with a couple of material issues. Look at the attached image. While the transparency for the hair renders correctly, the shadow projected on the left cheek of the subject is completely solid, there are no strands visible.

The material is defined as a mix with a grayscale jpeg providing the trans map. I have to use this configuration as my exporter takes a pre-existing model and exports it, I have no way of changing the original model and update the textures to support alpha channels. Here is the generated code

Code: Select all
# Material "Hair_33.mat2"
Texture "Hair_33.mat2.Kd" "color" "imagemap" "string filename" ["SFH_LightBrown.jpg"] "string mapping" ["uv"] "string wrap" ["repeat"] "string filtertype" ["bilinear"] "float uscale" [1.0] "float vscale" [-1.0] "float gain" [1] "float gamma" [2.2]
Texture "Hair_33.mat2.Kd.scale" "color" "scale" "texture tex1" ["Hair_33.mat2.Kd"] "color tex2" [1.000 1.000 1.000]
MakeNamedMaterial "Hair_33.mat2" "string type" ["matte"] "texture Kd" ["Hair_33.mat2.Kd.scale"]

# Hair_33.mat1
MakeNamedMaterial "Hair_33.mat1" "string type" ["null"]
Texture "Hair_33.map" "float" "imagemap" "string filename" ["SFH_Trans.jpg"] "string mapping" ["uv"] "string wrap" ["repeat"] "string filtertype" ["bilinear"] "float uscale" [1.0] "float vscale" [-1.0] "float gain" [1] "float gamma" [2.2]
# Hair_33
MakeNamedMaterial "Hair_33" "string type" ["mix"]
"texture amount" ["Hair_33.map"] "string namedmaterial1" ["Hair_33.mat1"] "string namedmaterial2" ["Hair_33.mat2"]


Any suggestion on how to solve this issue will be greatly appreciated.
Attachments
scene.png
User avatar
pciccone
Developer
 
Posts: 686
Joined: Wed Jan 13, 2010 11:02 am
Location: California

Re: Transparency map not casting the right shadow

Postby jeanphi » Sun May 16, 2010 9:51 am

Hi,

Which version and which integrator are you using?

Jeanphi
jeanphi
Developer
 
Posts: 6577
Joined: Mon Jan 14, 2008 7:21 am

Re: Transparency map not casting the right shadow

Postby pciccone » Mon May 17, 2010 8:30 pm

I'm using 0.7RC2 and this is what is written by the exporter before the WorldBegin section. I didn't include the LookAt and Camera statements:

Code: Select all
Film "fleximage"
  "integer xresolution" [1024]
  "integer yresolution" [576]
  "integer haltspp" [0]
  "integer halttime" [0]
  "bool premultiplyalpha" ["false"]
  "string tonemapkernel" ["reinhard"]
  "float reinhard_prescale" [1.000000]
  "float reinhard_postscale" [1.200000]
  "float reinhard_burn" [6.000000]
  "integer displayinterval" [12]
  "integer writeinterval" [120]
  "string ldr_clamp_method" ["lum"]
  "bool write_png" ["true"]
  "string write_png_channels" ["RGB"]
  "bool write_png_16bit" ["false"]
  "bool write_png_gamutclamp" ["true"]
  "string filename" ["reality_scene"]
  "bool write_resume_flm" ["false"]
  "bool restart_resume_flm" ["true"]
  "integer reject_warmup" [128]
  "bool debug" ["false"]
  "float colorspace_white" [0.314275 0.329411]
  "float colorspace_red" [0.630000 0.340000]
  "float colorspace_green" [0.310000 0.595000]
  "float colorspace_blue" [0.155000 0.070000]
  "float gamma" [1.800]
PixelFilter "mitchell"
   "float xwidth" [1.500000]
   "float ywidth" [1.500000]
   "float B" [0.333300]
   "float C" [0.333300]
   "bool supersample" ["true"]
Accelerator "tabreckdtree"
  "integer intersectcost" [80]
  "integer traversalcost" [1]
  "float emptybonus" [0.200000]
  "integer maxprims" [1]
  "integer maxdepth" [-1]
Sampler "metropolis"
  "float largemutationprob" [0.400000]


Thanks!
User avatar
pciccone
Developer
 
Posts: 686
Joined: Wed Jan 13, 2010 11:02 am
Location: California

Re: Transparency map not casting the right shadow

Postby pciccone » Mon May 17, 2010 8:59 pm

Hi Jeanphi, you are the man! I forgot that I didn't implement the integrator in my exporter, now it works beautifully. Thank you!
User avatar
pciccone
Developer
 
Posts: 686
Joined: Wed Jan 13, 2010 11:02 am
Location: California

Re: Transparency map not casting the right shadow

Postby tomb » Tue May 18, 2010 6:36 am

On a side note, that's a nice model & render - may I ask what software the exporter is for? :)
User avatar
tomb
Developer
 
Posts: 1919
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: Transparency map not casting the right shadow

Postby patro » Tue May 18, 2010 6:52 am

tomb wrote:On a side note, that's a nice model & render - may I ask what software the exporter is for? :)
yeah!!
wich program, exporter... and the model is made with...
User avatar
patro
 
Posts: 1798
Joined: Fri Feb 29, 2008 9:06 pm
Location: mount Etna

Re: Transparency map not casting the right shadow

Postby pciccone » Tue May 18, 2010 8:54 am

Thank you for the feedback. I can't say anything about the software yet but I will be posting here more information in just a few days, together with more renders.

Cheers.
User avatar
pciccone
Developer
 
Posts: 686
Joined: Wed Jan 13, 2010 11:02 am
Location: California

Re: Transparency map not casting the right shadow

Postby tomb » Tue May 18, 2010 9:17 am

pciccone wrote:Thank you for the feedback. I can't say anything about the software yet but I will be posting here more information in just a few days, together with more renders.

Cheers.


Ooh, a mystery! ;) Looking forward to it!
User avatar
tomb
Developer
 
Posts: 1919
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: Transparency map not casting the right shadow

Postby patro » Fri May 21, 2010 6:50 am

hi!!!
we want to know more about the software and the exporter...
is it makehuman? I hope!! :)
I read it has a blender exporter....
User avatar
patro
 
Posts: 1798
Joined: Fri Feb 29, 2008 9:06 pm
Location: mount Etna

Re: Transparency map not casting the right shadow

Postby pciccone » Fri May 21, 2010 8:28 am

Hello, I will give more details very soon but I can tell you that it's not Make Human.
User avatar
pciccone
Developer
 
Posts: 686
Joined: Wed Jan 13, 2010 11:02 am
Location: California

Next

Return to General

Who is online

Users browsing this forum: No registered users and 0 guests