Lighting a night time scene in POVRay.


Lighting a night time scene in POVRay.
#1
Hello, fellow AFOLs and LDrawers.

I would like to ask for some advice, please.

I wish to render some of my LDraw models in a night setting. In other words, they will be in darkness (or near darkness), but I would like light to appear to come from inside the model. Think lights coming from the window of a house and illuminating the street.

My usual method is to model in LDCAD and use its export feature to generate a .pov file, which I then render using POVRay. I have been learning how to edit the .pov file to alter the lighting, change the floor etc. I tried to place a lightsource inside the scene, but this is clearly the wrong way to do it. Can anyone offer advice on how to achieve what I am trying to do?

Apologies if this topic has already been covered elsewhere.

Many thanks,

Max
Reply
RE: Lighting a night time scene in POVRay.
#2
(2025-02-01, 22:20)Hughes Wrote: I tried to place a lightsource inside the scene, but this is clearly the wrong way to do it. Can anyone offer advice on how to achieve what I am

This is the correct way, it's probably just about finding the right coordinates.

For example to modify 5580 just change the default lights color to something dimmer:
Code:
color srgb <0.2,0.2,0.2>

and add a point light below it (just above //=====Cameras...)
Code:
light_source {
  <50,-208,120>, rgb <1,0.75,0> //an orange light
}

resulting in:
   

To find the new lights position you could use e.g a temporary 1x1 plate.
Reply
RE: Lighting a night time scene in POVRay.
#3
(Yesterday, 7:35)Roland Melkert Wrote: This is the correct way, it's probably just about finding the right coordinates.

For example to modify 5580 just change the default lights color to something dimmer:
Code:
color srgb <0.2,0.2,0.2>

and add a point light below it (just above //=====Cameras...)
Code:
light_source {
  <50,-208,120>, rgb <1,0.75,0> //an orange light
}

resulting in:


To find the new lights position you could use e.g a temporary 1x1 plate.
Thank you very much indeed for your very helpful and prompt reply, Roland. I managed to render the attached image by following your advice.

    Now I need to become more expert in choice of lights, position etc.
Reply
RE: Lighting a night time scene in POVRay. Making the lamps glow.
#4
Could I please ask one more question to the forum members?

In the rendered image I would like the lamps on the platform to glow so that the light does not appear to come from nowhere.

Looking at the POVRay documentation, I have been trying to create a lightsource and use the looks_like keyword to achieve this effect, as described here: Assigning an Object to a Light Source. The object I want to assign to the lightsource is 3941.dat. As far as I understand the .pov file, this gets changed into an object entitled sf_3941_dot_dat. So I basically tried to add the following lines into the .pov file, having added a declaration at the beginning of the file stating #declare Lightbulb=sf_3941_dot_dat.

Code:
light_source {
    <820,-192,-140>
    color srgb <1,1,1>
    looks_like { Lightbulb }
  }   //illuminate the light itself. This is the left platform light.

Please excuse my lack of programming know-how. I am really just making a wild guess how to achieve the result!

Either I am on the wrong track or I am doing something wrong, as the file is parsed without errors, but nothing seems to change in the image. 

Any advice, please? Many thanks.
Reply
RE: Lighting a night time scene in POVRay. Making the lamps glow.
#5
(Yesterday, 21:05)Hughes Wrote: Any advice, please? Many thanks.

i.m. not sure, have you tried without the original 3941 bricks?

or maybe test at a different, midair, location.
Reply
RE: Lighting a night time scene in POVRay.
#6
No luck yet, but I will try to understand POVray a bit more and then hopefully come up with a solution. Many thanks for your help and will let you know if and when I succeed!
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: Jeff Jones, 10 Guest(s)