Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    Scale Modelling with POV-Ray -
Italiano Italiano
Français français
Deutsch Deutsch

- POV-Ray Tutorial

  - Scale Modelling
    with POV-Ray

  - Squared Background
      in m and cm
  - Orthographic View
 > Adapting Plans
      to Background Grid
  - Multiple Views Rendering


Adapting Plans to Background Grid

How to adapt a plan to a raster plane in POV-Ray
For pecise working we use an orthographic camera looking vertically to the plain of the plan image. We use a background plan with a raster width of 1m / 0.1m.
( Raster_Plate macro, see: Squared Background)
In front of this background we place a box with an texture of an image_map by a transparent plan image (gif or png, non-interlaced!).
This box must be scaled to the original aspect ratio of the plan image.

Size of the plan box:
1st method: Use an image of the plan cutted to the total length or height of the object. Than we only have to scale by the original total length or height of the object.
2nd method: We have to know the original length of an detail in the plan. We add a cylinder of this length in front of the plan. Then we have to encrease the box of the plan image until the detail in the plan fits to this cylinder.

  plan image name: E63_Plan_Side1_255.gif,
  plan image size: 640 x 320 pixel,
  background palette number: 255
  original object lenght: 10.26 meter.
#declare Base_Texture =
  texture{ pigment{ color rgb<1,1,1>*1.2 }}
object{ Raster_Plate(
   1.0,   0.010, // 1st distance/width,
   0.1,   0.080, // 2nd distance/width,
   Base_Texture, // non= pigment{Clear}
   0.6, // Intensity, // Line gray intensity
   <-5.13,-0.05,-0.0>, <5.13,0,5.10>, //box
  ) //----------------------------------------
} //------------------------------------------

//#declare Plan_Front =
box{ <0,0,0>,<1,1,0.00001>
     // image on xy plane (aspect ratio 1:1)
     // from <0,0,0> to <1,1,0>
     image_map{ gif "E63_Plan_Side1_255.gif"
     map_type 0 // 0=planar
     interpolate 2 // 0=none, 1=linear,
      // 2=bilinear, 4=normalized distance
     once //
  // For transpartent palette images:
  // (<=256 colors)
  //    gif version 87a, non interlaced,
  // or png palette, non interlaced.
     transmit 255, 1 // Palette, Amount
    } // end of image_map
   } // end of pigment
  } // end of texture
scale<1,320/640,1> // original aspect ratio
translate<-0.5,0,0>// centered in x

//  Adjusting to raster size  -----------------
//original loco length:
scale 10.26 // in meter
translate<0,0.00,-0.01>  // in front!

} // end box with image_map

The Plan
 The Plan
Adapting the plan
 Adapting the plan
Plan adapted
 Plan adapted

This scene in POV-Ray: Plan_Loco_001.pov
Needs gif image: E63_Plan_Side1_255.gif

(Put the image in same directory like the scene file
or in the POV-Ray include file directory)

Continue with the construction
 Continue with the construction

© Friedrich A. Lohmüller, 2011