POV-Ray : Newsgroups : povray.newusers : checking which objects are visible/occluded Server Time
25 Nov 2024 05:59:13 EST (-0500)
  checking which objects are visible/occluded (Message 1 to 4 of 4)  
From: Mutley2003
Subject: checking which objects are visible/occluded
Date: 1 Jul 2006 04:25:01
Message: <web.44a630864d98fc0167cacd3d0@news.povray.org>
Hi
L'd like to write a little macro that gives me a diagnostic of which objects
are visible in my scene (ie the observer can see, that are not occluded by
other objects)

It seems maybe I could use the direction vector (of the camera) and the
trace() function coupled with min_extent() and max_extent(), with debug to
print stuff out, but my feel for the SDL is not too good just yet

a) how do I retrieve the direction vector? .. there does not seem to be any
notation like camera.direction or camera$direction

b) is there an accessible  collection of objects that I can iterate across?

Could someone help me out with some code to get me started?

thanks


Post a reply to this message

From: curtmack
Subject: Re: checking which objects are visible/occluded
Date: 17 Jul 2006 10:25:01
Message: <web.44bb9c932286254193400c860@news.povray.org>
"Mutley2003" <nomail@nomail> wrote:
> Hi
> L'd like to write a little macro that gives me a diagnostic of which objects
> are visible in my scene (ie the observer can see, that are not occluded by
> other objects)
>
> It seems maybe I could use the direction vector (of the camera) and the
> trace() function coupled with min_extent() and max_extent(), with debug to
> print stuff out, but my feel for the SDL is not too good just yet
>
> a) how do I retrieve the direction vector? .. there does not seem to be any
> notation like camera.direction or camera$direction

I would do something like this:

#declare camloc = <whatever vector you want>;
#declare camlook = <blah blah blah>;
#declare camdir = camloc-camlook;

camera {
  location camloc
  look_at  camlook
}

and that way you have your direction vector neatly #declared.



> b) is there an accessible  collection of objects that I can iterate across?

That I'm not too sure about, sorry.


Post a reply to this message

From: Norbert Kern
Subject: Re: checking which objects are visible/occluded
Date: 17 Jul 2006 11:50:00
Message: <web.44bbb0ca228625413376ff040@news.povray.org>
"Mutley2003" <nomail@nomail> wrote:
> Hi
> L'd like to write a little macro that gives me a diagnostic of which objects
> are visible in my scene (ie the observer can see, that are not occluded by
> other objects)

I wrote two little files, in which vectors are defined, which point at
visible objects only. Little additional work is needed to get what you
want.

Thread 1
http://news.povray.org/povray.binaries.images/thread/%3C43236855@news.povray.org%3E/?ttop=218917&toff=50

File 1
http://news.povray.org/povray.binaries.scene-files/message/%3C432414bf%40news.povray.org%3E/#%3C432414bf%40news.povray.
org%3E

Thread 2
http://news.povray.org/povray.binaries.images/thread/%3Cweb.44784f2141a06b1c9bff7e8b0%40news.povray.org%3E/?ttop=229746
&toff=50

File 2
http://news.povray.org/povray.binaries.scene-files/thread/%3Cweb.4478509041a06b1c9bff7e8b0@news.povray.org%3E/


Norbert Kern


Post a reply to this message

From: Mutley2003
Subject: Re: checking which objects are visible/occluded
Date: 28 Jul 2006 02:40:01
Message: <web.44c9b0e22286254155f15a1e0@news.povray.org>
thank you Norbert and Curtis .. I have enough to figure it out now, I think


Post a reply to this message

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