Stud color with transparency


Stud color with transparency
#1
Following the suggestion on this thread of using fade_color:

POV-Ray: Transparency using fade_color

and after plenty of tweaking and testing, I have found a fairly satisfactory solution to transparent colors that approach the real thing. The scene in POV-Ray is setup with an area light and a white square floating above to simulate a studio lamp reflection. The part used is: 92579.dat, in Transparent Black (LDXColor40).

Here is the default values with dark and light surface as background:

       

It is hard to see the internal edges or the surface through the transparency. Compare that to the fade_color version:

       

As you can see, the part is well defined and the edges are darker than the walls (as it should be), it works on both light and dark surfaces and allows you to see what is on the other side of the part. The only downside to using fade_color is that the studs are no longer colorize and appear simply as transparent. This seems to be due to the part not having an LGEO substitution.

My question to you good people is: Is there a way to apply this fade_color technique onto the studs so that they have the same color as the part itself, even without an LGEO substitution? I am not familiar with the whole Ldraw format, so any light you can cast my way (no pun intended) will be greatly appreciated.

If you would like to test the technique for yourself, here is the fade_color modification that I settled on:

Code:
// 40 TRANSPARENT BLACK / 111 TRANSPARENT BROWN [LDRAW]
// KOYAN                     <85,79,68>
// LDRAW                     <99,95,82>
// LDRAW (DARKER)            <74,71,62>
// LEGO DIGITAL DESIGNER     <166,145,130>
// PEERON                    <191,183,177>
// CUSTOM                    <77,51,25> [http://www.flickr.com/photos/mtbin/5435835970/]
/*#declare lg_clear_brown = texture {
  pigment { color srgb <166,145,130>/255  // LEGO DIGITAL DESIGNER
  #if (lg_quality > 1)
    filter TransFilter  //TransFilter  //0.5  //0.7
    transmit TransTransmit    //TransTransmit  //0.6   //0.3
  #end
  }
  finish  { lg_transparent_finish }
} */

//COLOR TEST WITH MEDIA ON USING FADE COLOR + EMISSION

#ifndef (LDXColor40)
#declare LDXColor40 = material {
    texture {
      pigment {color srgb <166,145,130>/500       transmit 0.99        filter 0      }
      finish  { lg_transparent_finish   emission 0} //srgb <166,145,130>/127.5 }
      normal  { lg_transparent_normal }
    }
   
    interior {
      ior 1.6
      fade_color srgb <166,145,130>/255
      fade_distance 1
      fade_power 2
    }
}
#end

You may simply add the code block after "//COLOR TEST..." to your lg_color.inc file below the "// 40 Transparent Black..." block. Remember to comment out /* */ the initial part to keep it as backup. You can use this as a template for other transparent colors too. This does not seem to improve the neon transparent colors though, but I haven't played with those much yet.


**IMPORTANT NOTE** Certain issues may arrive from using this code as I have not been able to go through all the dependent files and code, specifically a known issue is with transparent slopes which will halt the rendering.
RenderMOC at Rebricable.com
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)