POV-Ray : Newsgroups : povray.unofficial.patches : MCPov: Lazy Man's Spotlight Server Time
19 Jul 2024 10:24:50 EDT (-0400)
  MCPov: Lazy Man's Spotlight (Message 1 to 1 of 1)  
From: clipka
Subject: MCPov: Lazy Man's Spotlight
Date: 12 May 2009 17:35:01
Message: <web.4a09ea50f296f22c1f9594820@news.povray.org>
I guess I just found an easy way to do off-screen spotlights in MCPov, without
the need to model some corresponding spotlight casing geometry.

In this particular case, the challenge was actually even worse: I wanted some
light-probe-based scene illumination, but pretty much confine it to the center
of the scene.

In standard POV it wasn't too difficult: With a light dome created by
LightMapGen and PoseRay, I just had to add some spotlight statement to each
light source.

But how on earth would I do this in MCPov?

I already pictured myself throwing together some ugly macro to litter the sky
sphere with faceted geometry to confine the light directions, but I really
wasn't happy with the idea - I guessed the facets would probably have created
lighting artifacts.

Fortunately, a discussion some months ago about a MCPov shot of a praying
mantis, and how to model its eyes' texture, provided me with the essential

AOI pattern!

So I came up with this one, which turned out to work perfectly:

  sphere {
    <0,0,0>, 100000
    texture {
      pigment {
        pigment_map {
          [0.0005 image_map { ... } ]
          [0.0006 color rgb 0]
      finish { ambient 1 diffuse 0 specular 0 }
    montecarlo { mc_sky { 100 } }

A similar approach could be used for individual spotlights: All you need is a
single disc per spot, giving it a pigment like this (e.g. for a white

      pigment {
        pigment_map {
          [0.10 color rgb 1.0 ]
          [0.12 color rgb 0.8 ]
          [0.14 color rgb 0.2 ]
          [0.16 color rgb 0.0 ]

There - a lazy man's MCPov spotlight...

Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.