POV-Ray : Newsgroups : povray.windows : How do I make a torch shine? Server Time
28 Mar 2024 09:08:38 EDT (-0400)
  How do I make a torch shine? (Message 1 to 6 of 6)  
From: TMGellert
Subject: How do I make a torch shine?
Date: 5 Oct 2013 14:50:01
Message: <web.52505e91b15a3c3ca3ea0a370@news.povray.org>
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

From: Christian Froeschlin
Subject: Re: How do I make a torch shine?
Date: 5 Oct 2013 15:55:36
Message: <52506eb8$1@news.povray.org>
Note this newsgroup is for Windows-specific questions
(e.g. GUI, installation, command line parameters), you
might find more help in povray.newusers

> The only problem is: How can I make a torch shine or how should I define the
> light source?

some pointers:

to make an object glow by itself in 3.6: Increase ambient in texture

to make an object glow by itself in 3.7 RC: Increase emission in texture

In both cases this will make the object appear bright. However,
it will not only illuminate its surroundings unless "radiosity" is
activated.  An alternative is to define a "light_source" at the position
where the torch should emit light. If the light source is within the
object you need to add "no_shadow" to the object so the light
can actually get out.


Post a reply to this message

From: TMGellert
Subject: Re: How do I make a torch shine?
Date: 6 Oct 2013 05:20:00
Message: <web.52512a7f4256294aa3ea0a370@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> Note this newsgroup is for Windows-specific questions
> (e.g. GUI, installation, command line parameters), you
> might find more help in povray.newusers
>
> > The only problem is: How can I make a torch shine or how should I define the
> > light source?
>
> some pointers:
>
> to make an object glow by itself in 3.6: Increase ambient in texture
>
> to make an object glow by itself in 3.7 RC: Increase emission in texture
>
> In both cases this will make the object appear bright. However,
> it will not only illuminate its surroundings unless "radiosity" is
> activated.  An alternative is to define a "light_source" at the position
> where the torch should emit light. If the light source is within the
> object you need to add "no_shadow" to the object so the light
> can actually get out.

Hm, I can't make this work. I can define the 'ambient' value but I struggle with
the radiosity setting. How do I write this so it could work?


Post a reply to this message

From: Stephen
Subject: Re: How do I make a torch shine?
Date: 6 Oct 2013 06:12:53
Message: <525137a5$1@news.povray.org>
On 06/10/2013 10:16 AM, TMGellert wrote:
> Hm, I can't make this work. I can define the 'ambient' value but I struggle with
> the radiosity setting. How do I write this so it could work?

Since you are new to Pov. If it were me, I would build your scene using 
traditional lighting, until you get the hang of it. Personally I never 
use radiosity as I've never had the good results that some people here 
have. It is a subject on its own.
To get your torch to light and show a beam. You will need to use media.
You put a hollow container around your light source (hollow is a 
keyword) and use scattering or emissive media. You will need to read up 
on that, as well. :-)

-- 
Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: How do I make a torch shine?
Date: 6 Oct 2013 15:09:16
Message: <5251b55c$1@news.povray.org>

> Christian Froeschlin <chr### [at] chrfrde> wrote:
>> Note this newsgroup is for Windows-specific questions
>> (e.g. GUI, installation, command line parameters), you
>> might find more help in povray.newusers
>>
>>> The only problem is: How can I make a torch shine or how should I define the
>>> light source?
>>
>> some pointers:
>>
>> to make an object glow by itself in 3.6: Increase ambient in texture
>>
>> to make an object glow by itself in 3.7 RC: Increase emission in texture
>>
>> In both cases this will make the object appear bright. However,
>> it will not only illuminate its surroundings unless "radiosity" is
>> activated.  An alternative is to define a "light_source" at the position
>> where the torch should emit light. If the light source is within the
>> object you need to add "no_shadow" to the object so the light
>> can actually get out.
>
> Hm, I can't make this work. I can define the 'ambient' value but I struggle with
> the radiosity setting. How do I write this so it could work?
>
>

For a start point using radiosity, just add radiosity{} in your 
global_settings section.
This will turn radiosity on using default parameters. Those parameters 
are a descent starting point.

If the torch flame have some transparency, just adding a regular 
light_source inside ot will work, giving uneven and coloured illumination.

To get beter realism, you should use light fading. Add this:
fade_distance 1 fade_power 2

Adjust the light's intencity to get the illumination you want. There is 
no upper limit to a light's intencity.


To further improve realism, you can concider using an area_light.
The following, added to your light_source definition is a good start:
area_light 1*x 1*z 9 9 adaptive 0 circular orient
Using adaptive is importent to greatly improve the rendering time. It 
allow the use of a LOT of samples without slowing you down to much.

This make the light act like a spherical light with a diameter of 1 unit.

Example using both propositions:

light_source{
	<0,1.5,0> // the light's location
	rgb 100 // it's colour and intensity, adjusted for the fading
	fade_distance 1 fade_power 2
// physicaly acurate fading demand fade_power 2
	area_light 1*z 1*x 17 17 adaptive 0 circular orient
	}


Alain


Post a reply to this message

From: Christian Froeschlin
Subject: Re: How do I make a torch shine?
Date: 8 Oct 2013 06:42:44
Message: <5253e1a4@news.povray.org>
Alain wrote:

> This will turn radiosity on using default parameters. Those parameters 
> are a descent starting point.

Also there is a convenient set of presets in rad_def.inc

#include "rad_def.inc"

global_settings
{
   radiosity {Rad_Settings(Radiosity_Normal, off, off)}
}

Replace Radiosity_Normal with, e.g., Radiosity_Debug,
Radiosity_Fast or Radiosity_Final as appropriate.


Post a reply to this message

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