ISub clips negative colors at zero

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  07 July 2005
ISub clips negative colors at zero

Must ISub clip negative colors at zero internally?

I understand clipping to 0 at output, but in the middle of my tree?

I'm trying to do something with image differences controlling displacements and I can't use ISubA -- I need the negative numbers to be offsets in the other direction.

(I'm trying to do this in shake)
  07 July 2005
Hm... How negative to they go? Could you just add a constant to all of them to make them all positive, use the node, then subtract the constant right afterwards? Or do you need to split it into positive and negative values and negate one of them so they both are positive when they are operated on?

Jeremy Birn
Author, Digital Lighting & Rendering, 3rd Edition
  07 July 2005
What bit-depth are you working at?

In 8-but and 16-bit, there is no such thing as less than 0 or greater than 1 - if you convert to float before doing your ISub, you should find that you get negative values.
Hugh Macdonald
  07 July 2005

I didn't realize I had to explicitly cast to float with a byte node; I assumed everything was promoted to float internally as a matter of course.

Finished product:
  07 July 2005
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 01:20 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.