POV-Ray : Newsgroups : povray.general : 2D image of parsing Server Time 1 Mar 2024 13:58:25 EST (-0500)
 2D image of parsing (Message 1 to 5 of 5)
 From: Kima Subject: 2D image of parsing Date: 14 Aug 2020 09:55:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"dateCreated": "2020-08-14T13:55:00+00:00",
"datePublished": "2020-08-14T13:55:00+00:00",
"author": {
"@type": "Person",
"name": "Kima"
}
}
This question is not practical, and I just want to better understand POV-RAY!

As I understand, POV-RAY calculates the location and texture of objects during
the PARSING process. Then, in the RENDERING process, calculates the colour of
each pixel by raytracing.

I wonder if it is possible to calculate the pixels after the parsing process?

The result should be a 2D image of the 3D scene, as no light is applied.

For example, a sphere should be seen as a plain circle.
```
 From: Le Forgeron Subject: Re: 2D image of parsing Date: 14 Aug 2020 11:35:40 Message: <5f36af4c\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5f36af4c%241%40news.povray.org",
"headline": "Re: 2D image of parsing",
"dateCreated": "2020-08-14T15:35:40+00:00",
"datePublished": "2020-08-14T15:35:40+00:00",
"author": {
"@type": "Person",
"name": "Le Forgeron"
}
}
Le 14/08/2020 à 15:52, Kima a écrit :
>
> This question is not practical, and I just want to better understand POV-RAY!
>
> As I understand, POV-RAY calculates the location and texture of objects during
> the PARSING process. Then, in the RENDERING process, calculates the colour of
> each pixel by raytracing.
>

It's rather, during parsing, text is transformed in data structure for
shapes, textures, lights, etc.

> I wonder if it is possible to calculate the pixels after the parsing process?
>
> The result should be a 2D image of the 3D scene, as no light is applied.

Someone did not look enough at quality settings (+Qx)

http://wiki.povray.org/content/Reference:Tracing_Options#Quality_Settings

what you want is achieved with +Q1
You might want to specify quick_color in pigments.

http://wiki.povray.org/content/Reference:Pigment

Deeper modification would be to remove all lights, settings finish as
emission 1.0 diffuse 0.0 reflection 0.0

>
> For example, a sphere should be seen as a plain circle.
>
>

Nope, the image of a 3D sphere out of focus is *not always* a circle.
It's a common misconception.
```
 From: Alain Martel Subject: Re: 2D image of parsing Date: 14 Aug 2020 11:50:21 Message: <5f36b2bd\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5f36b2bd%241%40news.povray.org",
"headline": "Re: 2D image of parsing",
"dateCreated": "2020-08-14T15:50:21+00:00",
"datePublished": "2020-08-14T15:50:21+00:00",
"author": {
"@type": "Person",
"name": "Alain Martel"
}
}
Le 2020-08-14 à 09:52, Kima a écrit :
>
> This question is not practical, and I just want to better understand POV-RAY!
>
> As I understand, POV-RAY calculates the location and texture of objects during
> the PARSING process. Then, in the RENDERING process, calculates the colour of
> each pixel by raytracing.
>
> I wonder if it is possible to calculate the pixels after the parsing process?
>
> The result should be a 2D image of the 3D scene, as no light is applied.
>
> For example, a sphere should be seen as a plain circle.
>
>

You can get exactly that using the +q0 switch on the command line.
At that quality setting, all lights and shadowing are ignored, using
only 100% ambient.
```
 From: William F Pokorny Subject: Re: 2D image of parsing Date: 14 Aug 2020 11:50:21 Message: <5f36b2bd\$3@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5f36b2bd%243%40news.povray.org",
"headline": "Re: 2D image of parsing",
"dateCreated": "2020-08-14T15:50:21+00:00",
"datePublished": "2020-08-14T15:50:21+00:00",
"author": {
"@type": "Person",
"name": "William F Pokorny"
}
}
On 8/14/20 9:52 AM, Kima wrote:
...
> As I understand, POV-RAY calculates the location and texture of objects during
> the PARSING process.

Very roughly I suppose.

After parsing one would normally finalized bounding, then trace/render.

>
> I wonder if it is possible to calculate the pixels after the parsing process?
>
> The result should be a 2D image of the 3D scene, as no light is applied.
>
> For example, a sphere should be seen as a plain circle.

I'm confused as to what you are asking so I'll just say stuff for while.

- The whole structure for creating a 2d image of the 3d scene
essentially starts with shooting rays from camera through the pixel
positions of the final image. You can today limit trace depth to 1 but

- You'd not see a plain circle for a sphere unless the camera was
orthographic, certain cameras were ideally positioned or you were
somehow sampling a plane positioned among the 3d objects to form your image.

- Features like AA and others are built around shooting rays in
different ways.

---
To get something "perhaps" close to what you want you can render with:

povray scene.pov +q0

or

povray scene.pov -b +q0

to turn off most bounding (you need some of povr's changes to turn it
all off)

but it's still tracing rays into your scene using whatever camera you have.

Aside: The quality levels in the docs often work somewhat differently
than documented in v3.7 / v3.8, but 0 and 1 are OK I think.

Bill P.
```
 From: Bald Eagle Subject: Re: 2D image of parsing Date: 14 Aug 2020 16:05:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.5f36edc59e43a831f9dae300%40news.povray.org",
"headline": "Re: 2D image of parsing",
"dateCreated": "2020-08-14T20:05:00+00:00",
"datePublished": "2020-08-14T20:05:00+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
"Kima" <nomail@nomail> wrote:
> This question is not practical, and I just want to better understand POV-RAY!

Read the docs, and posts by clipka.

> As I understand, POV-RAY calculates the location and texture of objects during
> the PARSING process. Then, in the RENDERING process, calculates the colour of
> each pixel by raytracing.

My limited understanding of the overall process from reading and peeking through
the source code is this:
Parsing essentially collects all of the definitions of the objects and textures
and lighting for processing during the render phase.
After all of the SDL has been read and stored in memory as some sort of
mathematical representation, or data structure as Jerome pointed out, then
POV-Ray sets about performing the CPU intensive task of shooting a ray from the
camera out to the top left pixel, determining if there is a ray-object
intersection, if there is a reflection, if there is a shadow, and compositing
all of those contributing factors with the texture and finish of any surface to
determine the final rgb value of that pixel.

You can certainly find plenty of documents, articles, videos and books on
raytracing in general.

> I wonder if it is possible to calculate the pixels after the parsing process?

vide supra

> The result should be a 2D image of the 3D scene, as no light is applied.

If no light is applied, you get a black rectangle.
Ask me how I know.   :D

> For example, a sphere should be seen as a plain circle.

That depends on the camera view.  Perspective distortion will rarely give a
circle.