PDA

View Full Version : Raycast/Raytrace Node Issues?



RedBull
08-02-2006, 08:42 PM
Notice I have a screengrab of a raycast set to three different surface attributes.

In the first luminosity grab, you can see Viper and the SE show a black surface, Nodal Preview shows a white preview. In this case Nodal would seem to be incorrect.

The specular grab, shows Viper and the Surface Editor are correct, and the black spot should be visible in Nodal Preview.

The third grab shows diffuse sharpness is selected, and this time Nodal preview is showing the correct result, and Viper and the surface editor are not showing the rendered result correctly.

The same incorrect mixed result can be seen from the Raytrace Node as well as Raycast on those three attributes. Anyone know what could be happening?

Karmacop
08-02-2006, 10:56 PM
Viper and the surface previews don't do any raytracing/raycasting. I'm not sure why they end up with different results though.

RedBull
08-03-2006, 12:46 AM
Yeah i figured that was it, but i believe there must be a slight bug somewhere that causes the difference in the third diffuse sharpness error.

Karmacop
08-03-2006, 01:49 AM
The nodes are returning -1, which I guess shows it's an error (it can't find the distance).

RedBull
08-03-2006, 03:46 AM
Thanks for the confirmation.
While we are here Karmacop, can you confirm this bug i just found.

Open Layout.
Open Texture Environment.
Clear Scene.
CRASH.

As long as the texture editor for texture environment is still open, performing a clear scene will crash Layout in surfed.dll.

Jarno
08-03-2006, 05:41 AM
The nodes are returning -1, which I guess shows it's an error (it can't find the distance).

-1 means "there ain't nothin' there". The ray misses all geometry and goes off into empty space. So it's not really an error. If you are setting up a nodal network with a raytrace node, you may have to detect it and treat it as a special case. For example, if you would use the distance as an input to a gradient, make sure -1 is treated as "very very far away", or else you could get weird result as -1 is at the wrong end of the gradient.

---JvdL---

Karmacop
08-03-2006, 06:56 AM
Open Layout.
Open Texture Environment.
Clear Scene.
CRASH.

Yes ... nice catch :)


-1 means "there ain't nothin' there". The ray misses all geometry and goes off into empty space. So it's not really an error.
I'm just wondering why it returns -1 instead of a really large number?

Weepul
08-03-2006, 10:57 AM
I'm just wondering why it returns -1 instead of a really large number?
So it can be clearly distinguished and handled by a plugin or node setup, if you want to do something specific in the case of a ray not hitting anything (eg. simple ambient occlusion). The "really large number" would have to be infinite to be larger than the largest number than can be returned via geometry hit, and of course that won't work. ;)

RedBull
08-03-2006, 05:26 PM
Thanks for the confirmation. I only found that as i was posting.

Regardless of the -1 status, i would still imagine that having the nodal preview
match the surface editor preview and or viper is what should be happening?

It seems silly to have OGL, Viper, Nodal and SE, all giving me different results
from themselves as well as the final render. It kind of defeates the purpose of having visual thum previews, if they are all different.

Edit: Here is another example showing how Viper doesn't seem to be aware of Area lighting, however OGL shows a much more correct version, closer to the render.

Karmacop
08-03-2006, 08:14 PM
I'm not sure why sometimes nodal shows different things to the surface editor, I think it's a bit silly too. If it was up to me they'd share the same settings too.

With Viper .. well .. yeah, it's a bit funny. Opengl actually handles light fall offs and area lights better than Viper in my experience. Not sure why :\

RedBull
08-03-2006, 08:40 PM
Yeah there was no actual falloff on that area light as such, but yes what you say it true. Considering i'm being forced to work with viper rather than FPrime, i tend to notice this things a bit more than the past. Viper could use a little TLC.