negative values for material/light colors?

Return to Scripting Issues

negative values for material/light colors?

Postby redpanda » Fri May 11, 2012 5:40 am

I want to know if its normal to use negative numbers for material/light colors, or if its like dividing by zero for the visuals.
redpanda
 
Posts: 425
Joined: Wed Aug 03, 2011 6:34 am

Postby drwr » Thu May 17, 2012 11:14 am

YMMV.
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby Niriel » Fri May 18, 2012 3:39 am

Just tried. Panda seems to be quite happy with negative lights. That's good because I was planning to use them myself to make some fancy magical effects, absorbing the light around.
User avatar
Niriel
 
Posts: 62
Joined: Sun Apr 29, 2012 6:10 am
Location: Groningen, Netherlands

Postby rdb » Fri May 18, 2012 8:39 am

The question is whether every GPU out there is designed to handle it. I'm sure there's some GPU out there that will explode violently when you pass it negative values for the material or light colours.
rdb
 
Posts: 9746
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby drwr » Fri May 18, 2012 4:27 pm

In fact, we ran into such cases when we were developing Pirates of the Caribbean. The vast majority of GPU's do handle it correctly, but a few older models display nonsense.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby redpanda » Sat May 19, 2012 1:07 pm

Okay, better avoid then.

What about values higher than 1.0? I want to apply a color scale on a node to give it an effect like it's "frozen".
redpanda
 
Posts: 425
Joined: Wed Aug 03, 2011 6:34 am

Postby rdb » Sun May 20, 2012 3:15 am

The OpenGL specification specifies that the values are not clamped, so it's probably supposed to work; but it's not specifically stating that it should work. So again, your mileage may vary.
rdb
 
Posts: 9746
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands


Return to Scripting Issues

Who is online

Users browsing this forum: Bing [Bot] and 0 guests