Hi All,
I'd like to implement a function that returns all the faces visible from a given point.
FindUsingVectos has a cone functionality that seems to be the perfect solution for my problem (I migth need to call it several times with diferent direction vectors but) I can get all the faces for a given point, direction and cone angle.
The problem I'm having is that it also returns faces that are behind material and with a single intersection point per occurence, i won't have information enough to discriminate if farther faces are visible or not.
Does anybody know how can I implement this function.
Thanks a lot
Pablo
First question is why would like to do that? Which kind of feature are you trying to create?
Second thing is when you mention "I migth need to call it several times with diferent direction vectors" I'm curious how you would do that? Would you call it an infinite number of time with every possible direction?
I doubt it is possible to achieve that, but in the meantime I sent a query to the development team, I will let you know their feedback.
Regards,
Philippe.
Hello Philippe,
Thanks for your answer.
The application I'm working on, calculates radiation propagation trogh mazes (radiation propagates in a straigth line until it hits a surface).
With "findusingray" I have implemented this funtionality by selecting a resolution, and checking a non-inifinite (but very big) number of directions, this works, but very slow.
With the "cone" functionality in "findusingvector", I was hoping to execute it only 6 times (Positive and negative direction of every axis X,Y,Z) with a 60 deg angle. This will return some duplicate results due to the overlap of these 60 deg cones, but would cover the whole 4*pi solid angle.
Ovbiously, the grapich cards can perform this kind of calculations to produce the screen view....
Any advice will be much appreciated.
Thanks
Pablo
Hi Pablo,
I'm checking the FindUsingVector API more closely: how come the VisibleObjectsOnly argument of that method doesn't meet your requirement?
Seems to be what you are looking for:
Optional input Boolean that indicates whether or not invisible objects should be included in the search. Defaults to True indicating that invisible objects will be ignored.
Regards,
Philippe.
Here is the reply from a colleague:
I don’t see a simple way to solve this problem. The graphics system does it quite differently by using a Z buffer to determine what’s visible. Back face culling is also used. It might be possible to reproduce some of these algorithms but it wouldn’t be simple.
As far as the VisibleObjectsOnly argument in FindUsingVector, that’s for things whose visibility is turned completely off. For example, if a body or occurrence has been turned off, this allows you to still include it in the results. It doesn’t have anything to do with what’s occluded in the current view orientation.
Sorry for the bad news,
Philippe.
Hello Philippe,
Thanks very much for looking into this.
It's unfortunate this functionality is not available.
I'll update this post If I find a good solution for this problem
Pablo