View Full Version : Bug in the math nodes

Captain Obvious

09-12-2008, 07:48 AM

Scalar Constant (value -1) plugged into a Pow node (value 0.5; square root) plugged into Abs node should give the output 1.0. However, Lightwave outputs 1.R# instead (whatever that means). Clearly, this is because it can't handle imaginary numbers, but it could be useful if the Abs node still worked on them. I had a shader that gave rather odd output, because I was taking the square root of it at one point, and for certain scenarios for certain pixels the input would be negative, causing the square root to output imaginary numbers, making the whole thing kind of... not work.

TripD

12-21-2008, 09:44 PM

Are you hoping to use unreal numbers or just for a work around? If you used the Abs before the Pow function you wouldn't have the -1 trouble.

Captain Obvious

12-23-2008, 04:34 PM

To be honest, I was never really that bothered in practical terms. I just figured it's a bug, you know? It's not correct, even if it's not really a major issue as such.

dandeentremont

07-17-2009, 10:55 AM

I know what you mean. The node editor insists that I can't divide by zero. :-(

Captain Obvious

07-17-2009, 04:34 PM

I know what you mean. The node editor insists that I can't divide by zero. :-(

Well, there's not much to do about *that*...

Powered by vBulletin® Version 4.2.3 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.