[Ruby 'Bug'] Ray stops on a hidden object
-
As the title says. I have discovered this when testing 'Front Face 1.1' Plugin.
It can be valid from a programmer point of view, but isn't right from pure logic point of view.
There could be an option for model.raytest ray option.
The option would be by default true - ray would behave like a ray of light. False - would mean that ray will stop on a hidden geometry.I have attached a test scene. It can be tested with the FrontFace plugin 1.1 as it uses rays.
Tomasz
-
Hi,
I second that !@unknownuser said:
There could be an option for model.raytest ray option.
I've encountered numerous problems when developing the compo spray tool which extensively uses the raytest method.
Let's hope the GSU staff hears us... -
A new method could be written... e.g. "model.raytest.visible"
You'd start with a standard model.raytest...
If it finds something to intersect it returns a point and the thing that it's found to intersect with as an array [if the thing is part of nested entities it's an array of the 'containers' of each in turn]
Now we check what's returned is 'hidden' - we might have to go through the whole array to check if something is visible...
If it's not hidden we return the point and the array.
If it is hidden then we use the point we just got returned and our original vector to do another raytest to find the next intersecting thing etc... until an object is found that's NOT hidden... this point and it's array is returned as usual....
-
You are right TIG. It is a workaround, but Imagine a high poly tree standing in a front of a house, although it is hidden the rays will have to dig through all leaves. It in not really 'a bug', but I was really surprised when I had a ground plane turned off and I couldn't reverse back faces of a building looking from below. I was sure that my script cannot be that 'smart' to recognise that I am looking at the interior of the building therefore it doesn't reverse back faces. I was shocked
-
If the tree is put on it's own layer that's then switched off is that a fix ?
-
No it doesn't work. In a model above the face is not hidden. It is on a layer that is turned off.
Advertisement