|
|
I'm relatively new to POV-Ray and I want to make a Minecraft-inspired cave
scene.
The only problem is: How can I make a torch shine or how should I define the
light source?
My torch is an object made of polygons, so I don't use a box or sth like that.
It would be nice to get an answer!
TMGellert
[ Here you find the POV-Ray Scene, if you need to see it in detail: ]
// Minecraft TNT Block
// TMGellert 05 Oct 2013
// I N C L U D E D F I L E S
#include "colors.inc"
// C A M E R A
camera { location <5, 2.625, -3> look_at <2, 1.25, 0> }
// S T O N E P L A N E S
plane { z, 0 pigment { image_map {png "stone.png" } } finish { } rotate 90*x
}
plane { z, 0 pigment { image_map {png "stone.png" } } finish { } translate
z/2 }
plane { z, 0 pigment { image_map {png "stone.png" } } finish { } rotate -90*y
translate <-0.5, 0, 0.5> }
// T N T B L O C K
#declare TNT_Base =
polygon{
4, <0,0,0>, <1,0,0>, <1,1,0>, <0,1,0>
pigment { image_map { png "tnt_bottom.png" } }
rotate <-90,0,0>
translate <-0.5,0,0.5>
}
#declare TNT_Side =
polygon{
4, <0,0,0>, <1,0,0>, <1,1,0>, <0,1,0>
pigment { image_map { png "tnt_side.png" } }
rotate <0,0,0>
translate <-0.5,0,0.5>
}
#declare TNT_Top =
polygon {
4, <0,0,0>, <1,0,0>, <1,1,0>, <0,1,0>
pigment { image_map { png "tnt_top.png" } }
rotate <90,0,0>
translate <-0.5,1,-0.5>
}
#declare TNT_Block = union {
object { TNT_Base }
object { TNT_Side translate <0,0,-1> }
object { TNT_Side rotate <0,90,0> translate <-1,0,0> }
object { TNT_Side rotate <0,180,0> translate <0,0,1> }
object { TNT_Side rotate <0,270,0> translate <1,0,0> }
object { TNT_Top }
}
object { TNT_Block }
// T O R C H
#declare Torch_Side =
polygon {
4, <47/16,0,-1/16> <49/16,0,-1/16> <49/16,5/8,-1/16> <47/16,5/8,-1/16>
pigment { image_map { png "torch.png" } }
}
#declare Torch_Top =
polygon {
4, <47/16,1/2,-1/16> <49/16,1/2,-1/16> <49/16,5/8,-1/16> <47/16,5/8,-1/16>
pigment { image_map { png "torch.png" } }
rotate <90,0,0>
translate <0,9/16,-9/16>
}
#declare Torch = union {
object { Torch_Side }
object { Torch_Side rotate <0,90,0> translate <3,0,3> }
object { Torch_Side rotate <0,180,0> translate <6,0,0> }
object { Torch_Side rotate <0,270,0> translate <3,0,-3> }
object { Torch_Top }
}
object { Torch }
Post a reply to this message
|
|