SarahC

Emissive blocks - covered by plastic!

Recommended Posts

Help!

I can't get around this plastic cover over my glowing bricks!

Every object appears to have a skin... I've created a simple box with the same parameters and it glows fine.



 

#version 3.6;

#declare ldd_level_of_detail = 3;

#declare ldd_light_color = <255/255,255/255,255/255>;

#declare ldd_color_variance = 2.00;

#include "ldd_default_colors.inc"

#include "ldd_default_materials.inc"

#include "ldd_part_materials.inc"

#include "ldd_part_bevels.inc"

#include "ldd_part_position_variances.inc"

#include "ldd_main.bin"

#declare ldd_camera_transformation = transform { matrix <0.70710676908493042,0,-0.70710676908493042,-0.40824830532073975,0.81649661064147949,-0.40824830532073975,0.5773501992225647,0.57735037803649902,0.5773501992225647,11.132489204406738,11.132489204406738,11.132489204406738>}
#declare ldd_camera_location = ldd_vtransform(<0, 0, 0>, ldd_camera_transformation);
#declare ldd_camera_distance = 19.282037734985352;
#declare ldd_camera_look_at = ldd_vtransform(<0, 0, -ldd_camera_distance>, ldd_camera_transformation);

#declare ldd_camera_angle = ldd_default_camera_angle;

#declare ldd_model_transformation = transform { translate <0,0,0> }

#include "ldd_3005.bin"
#include "rad_def.inc"

global_settings {
  assumed_gamma 1.4
  max_trace_level 50
  adc_bailout 0.01/2     
  radiosity { Rad_Settings(Radiosity_OutdoorHQ, on, on) }
}

//background { color rgbft <255/255, 255/255, 255/255, 1, 1> }

light_source {
  <100,100,0>
  color 40/100*ldd_light_color
  area_light 5, 5, 10, 10
  adaptive 1
  jitter
  circular
  orient
  transform { ldd_camera_transformation }
}
  
  /*
light_source {
  <-100,100,0>
  color 40/100*ldd_light_color
  area_light 5, 5, 10, 10
  adaptive 1
  jitter
  circular
  orient
  transform { ldd_camera_transformation }
}

light_source {
  <0,100,0>
  color 40/100*ldd_light_color
  area_light 5, 5, 10, 10
  adaptive 1
  jitter
  circular
  orient
  transform { ldd_camera_transformation }
}
    */
camera {
  right  -(image_width/image_height)*x
  location ldd_camera_location
  look_at ldd_camera_look_at
  angle ldd_camera_angle

}

#declare ldd_model1 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,-1.2000000476837158,0,-0.40000000596046448}})
#declare ldd_model2 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,-1.2000000476837158,0.95999997854232788,-0.40000000596046448}})
#declare ldd_model3 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,-0.40000003576278687,0,-0.40000000596046448}})
#declare ldd_model4 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,0.39999997615814209,0,-0.40000000596046448}})
#declare ldd_model5 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,-1.2000000476837158,0,0.40000000596046448}})
#declare ldd_model6 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,-0.40000003576278687,0,0.40000000596046448}})
     
     
#declare ldd_modelz = union {           
    object{ldd_model1}
   
    object{
        
        ldd_model4
                       
        pigment{ color rgbf <1, 1, 1, 1>} 
        
        hollow
        
        interior{
            media{
                emission <1.0,0.1,0.5>*7
            }
        } 
        finish {  emission <1.0,0.1,0.0>*7 ambient 1 }
        
        
   }
}


         
ldd_modelz

ldd_statistics()

plane { y, min_extent(ldd_modelz).y  texture { pigment { color ldd_colors[1] } } }

 

2017-12-05_06-25-58.jpg

Share this post


Link to post
Share on other sites

I don’t know how LDD2POVRay works but with regular POVRay, I delete the brick altogether and use a light_source instead with the brick in its “looks_like” parameter.

Here’s an example with an LDView export where I replaced a 1x2 plate (3023) with a light source (an array light placed at mid-height). The last matrix and rotation are what places the light_source where the plate was, all the previous transformations are generic (the same for all 3023 plates). (Scale in cm.)

light_source {                                                                               
  <0, 0, 0>, srgb <173,237,237>/255                                                          
  area_light 1.52*x, 0.72*z, 6, 3                                                            
  adaptive 1                                                                                 
  jitter                                                                                     
  looks_like {                                                                               
    lg_3023_clear                                                                            
    rotate <90, 0, 0>                                                                        
    rotate <0, 90, 0>                                                                        
    translate <0, -0.16, 0>                                                                  
    material {                                                                               
      texture { lg_glowing_light_blue }                                                      
      interior { lg_ior }                                                                    
    }                                                                                        
  }                                                                                          
  fade_power 2                                                                               
  fade_distance 2                                                                            
  photons {                                                                                  
    reflection on                                                                            
    refraction on                                                                            
  }                                                                                          
  translate <0, 0.16, 0>                                                                     
  matrix <1, 0, 0, 0, 0.707107, -0.707107, 0, 0.707107, 0.707107, -8.799998, -8.318311, -1.9\
41052>                                                                                       
  rotate <-90, 0, 0>                                                                         
}                                                                                            

 

Share this post


Link to post
Share on other sites
On ‎5‎. ‎12‎. ‎2017 at 7:39 AM, SarahC said:

Every object appears to have a skin... I've created a simple box with the same parameters and it glows fine.

That's because you did not removed original texture from the brick so POV-Ray created layered texture (emmisive under plastic). Gloving edges are due to interior property you have added.

In the original scene:

#declare ldd_model1 = ldd_3005(array[2]{21,0},

declares  that brick should be element Id 3005 and use material 21.

To override how the material 21 is defined, do it before it is declared by converter.

Converter declares it in ldd_default_materials.inc.

You can override by adding:

#include "ldd_materials_declarations.bin"

#declare ldd_finishes[21] = finish {  emission <1.0,0.1,0.0>*7 ambient 1 }

Before line that includes ldd_default_materials.inc.

This way you can define complete textures, not only modify finish.

Complete example:

#version 3.6;

#declare ldd_level_of_detail = 3;

#declare ldd_light_color = <255/255,255/255,255/255>;

#declare ldd_color_variance = 2.00;

#include "ldd_default_colors.inc"
#include "ldd_materials_declarations.bin"

#declare ldd_finishes[21] = finish {  emission <1.0,0.1,0.0>*7 ambient 1 }

#include "ldd_default_materials.inc"

#include "ldd_part_materials.inc"

#include "ldd_part_bevels.inc"

#include "ldd_part_position_variances.inc"

#include "ldd_main.bin"

#declare ldd_camera_transformation = transform { matrix <0.70710676908493042,0,-0.70710676908493042,-0.40824830532073975,0.81649661064147949,-0.40824830532073975,0.5773501992225647,0.57735037803649902,0.5773501992225647,11.132489204406738,11.132489204406738,11.132489204406738>}
#declare ldd_camera_location = ldd_vtransform(<0, 0, 0>, ldd_camera_transformation);
#declare ldd_camera_distance = 19.282037734985352;
#declare ldd_camera_look_at = ldd_vtransform(<0, 0, -ldd_camera_distance>, ldd_camera_transformation);

#declare ldd_camera_angle = ldd_default_camera_angle;

#declare ldd_model_transformation = transform { translate <0,0,0> }

#include "ldd_3005.bin"
#include "rad_def.inc"

global_settings {
  assumed_gamma 1.4
  max_trace_level 50
  adc_bailout 0.01/2     
  radiosity { Rad_Settings(Radiosity_OutdoorHQ, on, on) }
}

//background { color rgbft <255/255, 255/255, 255/255, 1, 1> }

light_source {
  <100,100,0>
  color 40/100*ldd_light_color
  area_light 5, 5, 10, 10
  adaptive 1
  jitter
  circular
  orient
  transform { ldd_camera_transformation }
}
  
  /*
light_source {
  <-100,100,0>
  color 40/100*ldd_light_color
  area_light 5, 5, 10, 10
  adaptive 1
  jitter
  circular
  orient
  transform { ldd_camera_transformation }
}

light_source {
  <0,100,0>
  color 40/100*ldd_light_color
  area_light 5, 5, 10, 10
  adaptive 1
  jitter
  circular
  orient
  transform { ldd_camera_transformation }
}
    */
camera {
  right  -(image_width/image_height)*x
  location ldd_camera_location
  look_at ldd_camera_look_at
  angle ldd_camera_angle

}

#declare ldd_model1 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,-1.2000000476837158,0,-0.40000000596046448}})
#declare ldd_model2 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,-1.2000000476837158,0.95999997854232788,-0.40000000596046448}})
#declare ldd_model3 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,-0.40000003576278687,0,-0.40000000596046448}})
#declare ldd_model4 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,0.39999997615814209,0,-0.40000000596046448}})
#declare ldd_model5 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,-1.2000000476837158,0,0.40000000596046448}})
#declare ldd_model6 = ldd_3005(array[2]{21,0},array[1]{0},array[1][12]{{1,0,0,0,1,0,0,0,1,-0.40000003576278687,0,0.40000000596046448}})
     
     
#declare ldd_modelz = union {           
    object{ldd_model1}
    hollow         
    interior{
            media{
                emission <1.0,0.1,0.5>*7
            }
        } 
}


         
ldd_modelz

ldd_statistics()

plane { y, min_extent(ldd_modelz).y  texture { pigment { color ldd_colors[1] } } }

 

Or you can use the the "looks like" approach with lights like in this example:


#version 3.6;

#declare ldd_level_of_detail = 3;

#declare ldd_white = <255/255,255/255,255/255>;

#declare ldd_black = <0/255,0/255,0/255>;

#declare ldd_stretch_palette = 1;

#declare ldd_light_color = <255/255,255/255,255/255>;

#declare ldd_ambient_light_color = 0/100*ldd_light_color;

#include "ldd_lego_colors.inc"

#include "ldd_main.bin"

#declare ldd_camera_transformation = transform { matrix <0.76167279481887817,0,-0.64796173572540283,-0.30815255641937256,0.8796766996383667,-0.36223039031028748,0.56999683380126953,0.4755721390247345,0.67002588510513306,11.696864128112793,12.339683532714844,17.410989761352539>}
#declare ldd_camera_location = ldd_vtransform(<0, 0, 0>, ldd_camera_transformation);
#declare ldd_camera_look_at = ldd_vtransform(<0, 0, -22.957365036010742>, ldd_camera_transformation);
#declare ldd_camera_angle = 25; 
#declare ldd_model_transformation = transform { translate <0,0,0> }

#include "ldd_3814.bin"
#include "ldd_3818.bin"
#include "ldd_3819.bin"
#include "ldd_3820.bin"
#include "ldd_3626.bin"
#include "ldd_3815.bin"
#include "ldd_3816.bin"
#include "ldd_3817.bin"
#include "ldd_4599.bin"
#include "ldd_6141.bin"
#include "ldd_33320.bin"
#include "rad_def.inc"


global_settings {
  assumed_gamma 1.4
  max_trace_level 50
  adc_bailout 0.01/2  
  radiosity { Rad_Settings(Radiosity_Fast, on, on) } // fast radiosity - comment out for better quality
  /* uncomment these radiosity settings for better quality
  radiosity {
    pretrace_start 0.08
    pretrace_end 0.005
    count 1600
    nearest_count 20
    error_bound 0.02
    recursion_limit 1
    low_error_factor 0.25
    gray_threshold 0
    minimum_reuse 0.015
    brightness 1.0
    adc_bailout 0.01/2
    normal on
    media on
  } 
  */       
}

background { color rgbft <255/255, 255/255, 255/255, 1, 1> }

// traditional light is commented out - uncomment to make scene brighter
/*         
light_source {
  <101,101,101>
  color 75/100*ldd_light_color
  area_light 30, 30, 10, 10
  adaptive 1
  jitter
  circular
  orient
  transform { ldd_camera_transformation } 
  media_interaction off
}*/
     
camera {
  right  -(image_width/image_height)*x
  location ldd_camera_location
  look_at ldd_camera_look_at
  angle ldd_camera_angle
}

#declare brick_0 = union { 
  ldd_3814(array[3]{21,0,0},array[2]{0,0},array[1][12]{{1,0,0,0,1,0,0,0,1,-0.39999991655349731,1.6000000238418579,0.39999961853027344}})
ldd_3818(array[1]{21},array[1]{0},array[1][12]{{0.98325490951538086,-0.18223552405834198,0,0.17517611384391785,0.94516557455062866,0.2756374180316925,-0.050230953842401505,-0.27102187275886536,0.96126192808151245,-0.61999970674514771,2.5099999904632568,0.39999961853027344}})
ldd_3819(array[1]{21},array[1]{0},array[1][12]{{0.98325490951538086,0.18223552405834198,0,-0.18223552405834198,0.98325490951538086,0,0,0,1,0.62000006437301636,2.5099999904632568,0.39999961853027344}})
ldd_3820(array[1]{24},array[1]{0},array[1][12]{{0.98474615812301636,-0.17398057878017426,0.0024053670931607485,0.16658905148506165,0.94671988487243652,0.27562692761421204,-0.050230953842401505,-0.27102187275886536,0.96126192808151245,-0.91031485795974731,2.0959556102752686,0.97849023342132568}})
ldd_3820(array[1]{24},array[1]{0},array[1][12]{{0.98480772972106934,0.17364819347858429,0,-0.17364819347858429,0.98480772972106934,0,0,0,1,0.87797993421554565,2.2703990936279297,1.0828781127929687}})
}
#declare brick_1 = ldd_3626(array[4]{24,0,0,0},array[3]{55196,0,0},array[1][12]{{1,0,0,0,1,0,0,0,1,0,2.880000114440918,0.39999961853027344}})
#declare brick_2 = union { 
  ldd_3815(array[3]{23,0,0},array[2]{0,0},array[1][12]{{1,0,0,0,1,0,0,0,1,-0.40000000596046448,1.6000000238418579,0.39999961853027344}})
ldd_3816(array[4]{23,0,0,0},array[3]{0,0,0},array[1][12]{{1,0,0,0,1,0,0,0,1,-0.40000000596046448,0,0.39999961853027344}})
ldd_3817(array[4]{23,0,0,0},array[3]{0,0,0},array[1][12]{{1,0,0,0,1,0,0,0,1,0.40000003576278687,0,0.39999961853027344}})
}
#declare brick_3 = ldd_4599(array[1]{26},array[1]{0},array[1][12]{{-0.98659539222717285,0.16226089000701904,0.017338462173938751,0.068929694592952728,0.51068824529647827,-0.85699862241744995,-0.14791196584701538,-0.84431588649749756,-0.51502722501754761,-0.91503679752349854,1.9815648794174194,2.2981905937194824}})
#declare brick_4 = ldd_6141(array[1]{44},array[1]{0},array[1][12]{{-0.98659539222717285,0.16226089000701904,0.017338469624519348,0.068929694592952728,0.51068824529647827,-0.85699862241744995,-0.14791196584701538,-0.84431588649749756,-0.51502722501754761,-0.93709433078765869,1.818144679069519,2.5724301338195801}})
#declare brick_5 = ldd_33320(array[1]{28},array[1]{0},array[1][12]{{0,0,-1,0,0.99999970197677612,0,1,0,0,-2,0,3.6000001430511475}})

#declare ldd_model = union {
  object { brick_0 }
  object { brick_1 }
  object { brick_2 }
  object { brick_3 }
  object { brick_4 } 
  object { brick_5 } 
}

ldd_model

ldd_statistics()

// removed standard plane
//plane { y, min_extent(ldd_model).y  texture { pigment { color rgb ldd_colors[1] } finish { ldd_finish_shinyPlastic_255 } } } 


// this is spotlight placed in the same location as "brick_4" which is the trans 1x1 round plate

light_source
{            
    <0,0.4,0> // location is slightly offset from <0,0,0> because otherwise stud from the black brick_3 would overlap the light source and no light would be visible
    color rgb 1 //pure white
    spotlight // spotlight - has conical shape
    radius 15 // angle of the cone with full light intensity
    falloff 25 // angle of the cone within which the light is gradually dimmed to 0
    point_at <0,-1,0> // direction in which light points - in this case, it points down, because 1x1 plate has basic orientation in LDD with stud hole down and we want the light to come out of stud hole
    matrix <-0.98659539222717285,0.16226089000701904,0.017338469624519348,
    		0.068929694592952728,0.51068824529647827,-0.85699862241744995,
    		-0.14791196584701538,-0.84431588649749756,-0.51502722501754761,
    		-0.93709433078765869,1.818144679069519,2.5724301338195801> // this is the same transformation matrix as is specified in declaration of brick_4
    media_attenuation on // media will influence the intensity
    media_interaction on // media will make light beam visible
}
     
// this box is filled with media, that interacts with light beam and makes it visible     
     
box
 { <min_extent(ldd_model).x+4, min_extent(ldd_model).y-2, min_extent(ldd_model).z+9>, <min_extent(ldd_model).x-2, min_extent(ldd_model).y+4, min_extent(ldd_model).z+2>
   pigment { rgbt 1 } hollow
   interior
   { media
     { scattering { 1, 0.2 extinction 0.01 }
       samples 30
     }
   }
 }
   

// wooden floor starts here

#include "woods.inc"
  
#declare Floor_Texture =
    texture { pigment { P_WoodGrain18A color_map { M_Wood18A }}}
    texture { pigment { P_WoodGrain12A color_map { M_Wood16B }}}
    texture {
        pigment { P_WoodGrain12B color_map { M_Wood18B }}
        finish { specular 0.25
                 roughness 0.02
                 reflection { 0.1, 0.3 }
        }
    }

plane { y,  min_extent(ldd_model).y 
    texture { Floor_Texture
            scale 5
            rotate y*90
            rotate <5, 6, 5>
            translate z*15
        }  
}

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.