POV-Ray : Newsgroups : povray.general : Light beam, laser, noise... Server Time
27 Dec 2024 05:19:54 EST (-0500)
  Light beam, laser, noise... (Message 1 to 8 of 8)  
From: Pierre-Étienne Messier
Subject: Light beam, laser, noise...
Date: 28 Feb 2003 20:22:28
Message: <3e600b54@news.povray.org>
Hello everyone,

I am currently learning the wonderful world of Pov-Ray and I currently 
have a few questions.

For a project I am currently working on, I'd like to create a computer 
simulation (rendering) of an optical system.  I think it could be done 
in Pov-Ray but I'm not 100% sure, hence that's why I post :)

At least, I need to create a tiny light beam (like a laser, white light 
ray, etc.).  I found this page on Google and contacted the author to get 
more information on this :

http://www.mbork.de/bsp/bsp_2.htm

He said that this was rendered in Pov3.0, and it cannot be done the same 
way with newer Pov.  Anyone got an idea to make a such light ray ?

Also, I'd like to get my renderings a little bit "dirtier" : is it 
possible to add a subtle grainy effect (like the grain of a film in the 
photography world) to the entiere rendering ?

Thanks !



Post a reply to this message

From: Christopher James Huff
Subject: Re: Light beam, laser, noise...
Date: 28 Feb 2003 21:01:17
Message: <cjameshuff-8B9FCD.20564328022003@netplex.aussie.org>
In article <3e600b54@news.povray.org>,


> http://www.mbork.de/bsp/bsp_2.htm
> 
> He said that this was rendered in Pov3.0, and it cannot be done the same 
> way with newer Pov.  Anyone got an idea to make a such light ray ?

It is not impossible to do the same way, it's just that there's a better 
way. Instead of multiple light sources or cylinders of glowing media, 
pov can simulate the paths photons actually travel through the scene. 
Look in the documentation for the photon mapping feature, and the 
optics.pov demo scene.


> Also, I'd like to get my renderings a little bit "dirtier" : is it 
> possible to add a subtle grainy effect (like the grain of a film in the 
> photography world) to the entiere rendering ?

The best way is to do things like use normals and grainy patterns, and 
otherwise try to get dirty textures. There are ways to add a flat noise 
to the image, but it does not make the scene itself look more real, it 
is more of a film effect.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Pierre-Étienne Messier
Subject: Re: Light beam, laser, noise...
Date: 28 Feb 2003 22:03:50
Message: <3e602316$1@news.povray.org>
Thanks for the fast answer !

Christopher James Huff wrote:
> It is not impossible to do the same way, it's just that there's a better 
> way. Instead of multiple light sources or cylinders of glowing media, 
> pov can simulate the paths photons actually travel through the scene. 
> Look in the documentation for the photon mapping feature, and the 
> optics.pov demo scene.

I think I'll look again at that example, I already saw it before and I 
think that's what I need but I didn't understood it at first.


> The best way is to do things like use normals and grainy patterns, and 
> otherwise try to get dirty textures. There are ways to add a flat noise 
> to the image, but it does not make the scene itself look more real, it 
> is more of a film effect.

I think the flat noise effect is what I am looking for.  A picture worth 
thousands of words, so :

http://www.elysiun.com/forum/viewtopic.php?t=9743

The pics are not from me and are not done in PovRay, but that's the 
effect I am looking for.



Post a reply to this message

From: Christopher James Huff
Subject: Re: Light beam, laser, noise...
Date: 1 Mar 2003 10:58:41
Message: <cjameshuff-7302D1.10540601032003@netplex.aussie.org>
In article <3e602316$1@news.povray.org>,


> I think the flat noise effect is what I am looking for.  A picture worth 
> thousands of words, so :
> 
> http://www.elysiun.com/forum/viewtopic.php?t=9743
> 
> The pics are not from me and are not done in PovRay, but that's the 
> effect I am looking for.

Ok...well, look in the manual for "crand". Or look here:
http://povray.org/documentation/view/187/#s06_07_03_02_03

I still do not recommend it, though. The crand feature only works on 
textures, so it might be difficult to apply to your situation. It just 
isn't a very good solution, and is considered obsolete. If you want a 
camera film effect, it would be better to do it in an image processing 
program.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Kaveh
Subject: Re: Light beam, laser, noise...
Date: 2 Mar 2003 20:06:51
Message: <1fr8020.x13mwb19qze63N%kaveh@delete_this.focalimage.com>


> Hello everyone,
> 
> I am currently learning the wonderful world of Pov-Ray and I currently
> have a few questions.
> 
> For a project I am currently working on, I'd like to create a computer
> simulation (rendering) of an optical system.  I think it could be done
> in Pov-Ray but I'm not 100% sure, hence that's why I post :)

[...]

Pierre

I started a similar project a while ago. I don't know exactly what you
want to do, whether you want it just to look correct, or to have a
system where an optical physicist can code in the data for optical
equipment and see the result in povray. 

I have written a few routines for optical components like lenses of a
specific focal length, mirrors, etc. I am happy to put these at your
disposal for eventual release into the public domain. If you are
interested, please mail me.


-- 
Kaveh


Post a reply to this message

From: Rune
Subject: Re: Light beam, laser, noise...
Date: 3 Mar 2003 10:26:34
Message: <3e63742a$1@news.povray.org>

> Also, I'd like to get my renderings a little bit "dirtier" :
> is it possible to add a subtle grainy effect (like the
> grain of a film in the photography world) to the entiere
> rendering ?

Make a sphere or disc with a semi-transparent noisy texture. Scale it
very tiny and translate it to be just in front of the camera (if it is a
disc) or centered around the camera location (if it is a sphere). Make
sure the finish of the noise texture has an ambient of 1 and a diffuse
of 0 so that it is not affected by lighting in the scene. I don't have
any ready-to-use code but try out some things and see what works for
you.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated Oct 19)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Rune
Subject: Re: Light beam, laser, noise...
Date: 3 Mar 2003 12:01:40
Message: <3e638a74$1@news.povray.org>
Rune wrote:
> I don't have any ready-to-use code but try
> out some things and see what works for you.

Oh well, I made some code anyway...

This one should make dark areas in the image noisy, while keeping bright
areas relatively noise-free. Isn't that the way it is in real
photographs?

// AddNoise macro by Rune S. Johansen
// Example of use:
// AddNoise(camera_location,1.0,0.002,0.5)
#macro AddNoise(camera_location,noise_level,noise_scale,noise_colors)
   sphere {
      0, 1 hollow no_shadow no_reflection
      texture {
         average scale noise_scale
         texture_map {
            #local I = 0;
            #while (I<3)
               #local C = vaxis_rotate(x,1,120*I);
               #local D = 0.5+(2*C-1)*noise_colors;
               [
                  pigment {
                     spotted translate 10*C
                     color_map {
                        [0,rgb 2-D transmit 1-noise_level    ]
                        [1,rgb D   transmit 1+noise_level*1.2]
                     }
                  }
                  finish {ambient 1 diffuse 0}
               ]
               #local I = I+1;
            #end
         }
      }
      scale 0.001 translate camera_location
   }
#end

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated Oct 19)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Rohan Bernett
Subject: Re: Light beam, laser, noise...
Date: 19 Mar 2003 20:35:05
Message: <web.3e791a3a8182c320d02c7b870@news.povray.org>
>At least, I need to create a tiny light beam (like a laser, white light
>ray, etc.).

A laser? Easy. Just make a cylindrical light and use the 'paralell' keyword
in it. And use Photon mapping to make it reflect off mirrors, and be bent
by lenses. Making the light paralell makes the light behave like a real
laser. There does, however, seem to be a bit of a problem involving a
mysterious black disc which can appear in certain circumstances. Exactly
which, I'm still not sure of. I think it might be a bug in the cylindrical
lights, but I could be wrong.

Rohan _e_ii


Post a reply to this message

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