POV-Ray : Newsgroups : povray.general : 2D image of parsing Server Time
29 Mar 2024 07:47:46 EDT (-0400)
  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: <web.5f36973246dcb2cdecc0fada0@news.povray.org>
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.


Post a reply to this message

From: Le Forgeron
Subject: Re: 2D image of parsing
Date: 14 Aug 2020 11:35:40
Message: <5f36af4c$1@news.povray.org>
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.


Post a reply to this message

From: Alain Martel
Subject: Re: 2D image of parsing
Date: 14 Aug 2020 11:50:21
Message: <5f36b2bd$1@news.povray.org>
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.


Post a reply to this message

From: William F Pokorny
Subject: Re: 2D image of parsing
Date: 14 Aug 2020 11:50:21
Message: <5f36b2bd$3@news.povray.org>
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.


Post a reply to this message

From: Bald Eagle
Subject: Re: 2D image of parsing
Date: 14 Aug 2020 16:05:00
Message: <web.5f36edc59e43a831f9dae300@news.povray.org>
"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.

https://www.shadertoy.com/view/XdBGzd

Highlights and shadows will provide visual cues to make the scene look 3D.  The
absence of any of that will make the scene look flat.

If you are _trying_ to produce a very flat scene or a silhouette or outline,
then there are various ways of going about that.


Post a reply to this message

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