POV-Ray : Newsgroups : povray.beta-test : trying to understand the mesh_camera Server Time
1 Jun 2024 21:47:49 EDT (-0400)
  trying to understand the mesh_camera (Message 1 to 3 of 3)  
From: bitman
Subject: trying to understand the mesh_camera
Date: 8 Dec 2010 13:52:35
Message: <4cffd3f3$1@news.povray.org>
Hi Guys

I have some questions to understand the concept of the mesh_camera, maybe you can shed
some light on this:

1) I learned by reading the wiki that each pixel in the resulting image needs one face
in a camera mesh.
Just to ensure that I got it right, does it mean that a mesh like this could be used
to create an image with width 4 and height 2 ?

+----+----+
| 1 /| 3 /|    1 2 3 4
|  / |  / |
| /  | /  |
|/ 2 |/ 4 |
+----+----+
| 5 /| 7 /|    5 6 7 8
|  / |  / |
| /  | /  |
|/ 6 |/ 8 |
+----+----+

2) can I imagine a mesh_camera as an insects eye?
Each facette representing one ray and its direction looking out to the world in a
slightly different direction?

3) Is it true that I need a mesh of the right dimensions to match exactly the
resolution of my resulting image?
that implies that I had to prepare a different mesh whenever I change the resolution

4) Are there already tools to create plane meshes of given resolution?
Otherwise I had to write a script or Povray Macro to do this.

5) Using faces of a mesh for the mesh_camera seems to be gratuitously complicated to
me.
Why didn't the programmer choose a bunch of vectors, that could also describe the
origin and direction of rays.
Just a quick thought that made me wonder.
I think there must be another reason beside that it can't be called mesh_camera if it
is made using vectors :o

thanks


Post a reply to this message

From: Chris Cason
Subject: Re: trying to understand the mesh_camera
Date: 8 Dec 2010 14:05:24
Message: <4cffd6f4@news.povray.org>
On 9/12/2010 05:53, bitman wrote:
> 1) I learned by reading the wiki that each pixel in the resulting image
> needs one face in a camera mesh.

Unless you use one of the interpolated forms, yes.

> 2) can I imagine a mesh_camera as an insects eye? Each facette
> representing one ray and its direction looking out to the world in a
> slightly different direction?


See at http://www.ignorancia.org/en/index.php?page=mesh-camera, in
particular the custom camera demo image. (Short answer: yes).

> 3) Is it true that I need a mesh of the right dimensions to match
> exactly the resolution of my resulting image? that implies that I had to
> prepare a different mesh whenever I change the resolution

Depends on the type of mesh camera you are using.

> 4) Are there already tools to create plane meshes of given resolution? 
> Otherwise I had to write a script or Povray Macro to do this.

There are some macros included in the distribution.

> 5) Using faces of a mesh for the mesh_camera seems to be gratuitously
> complicated to me. Why didn't the programmer choose a bunch of vectors,
> that could also describe the origin and direction of rays. Just a quick
> thought that made me wonder. I think there must be another reason beside
> that it can't be called mesh_camera if it is made using vectors :o

Yes, it's because the mesh camera was designed to do things with existing
meshes, such as calculate sunlight in watts/m2 on a non-uniform surface and
texture baking. In both cases you already have a mesh containing what is
more or less the ray origin and direction you want to use, so it would not
be logical to force the user to export that into raw vector format and then
create a new format for them to re-import it as camera rays.

Being able to use the meshes to create a stand-alone camera that doesn't
have anything to do with a visible mesh in the scene is basically a side-
benefit.

-- Chris


Post a reply to this message

From: bitman
Subject: Re: trying to understand the mesh_camera
Date: 8 Dec 2010 14:37:47
Message: <4cffde8b$1@news.povray.org>
okay, that makes all pretty much sense
It seems I'm on the right track

Thank you Chris


Post a reply to this message

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