Discussion for users of the Indigo Renderer SDK.
-
fused

- Posts: 3648
- Joined: Fri Sep 22, 2006 7:19 am
- Location: Berlin, Germany
- 3D Software: Cinema 4D
Post
by fused » Sun Dec 14, 2008 12:20 am
it seems that
copyHDRBuffer(float *buffer) will only work if
copyBuffer(indUChar8 *buffer) was called before. otherwise it will result in an access violation.
can someone confirm, or is it even intended?
edit: also, this function is not documented

-
fused

- Posts: 3648
- Joined: Fri Sep 22, 2006 7:19 am
- Location: Berlin, Germany
- 3D Software: Cinema 4D
Post
by fused » Sun Dec 14, 2008 6:53 am
is there a special reason why the values are clamped to 1.0?
-
OnoSendai

- Posts: 6243
- Joined: Sat May 20, 2006 6:16 pm
- Location: Wellington, NZ
-
Contact:
Post
by OnoSendai » Sun Dec 14, 2008 8:46 pm
Crashing is never intended

-
fused

- Posts: 3648
- Joined: Fri Sep 22, 2006 7:19 am
- Location: Berlin, Germany
- 3D Software: Cinema 4D
Post
by fused » Sun Dec 14, 2008 11:17 pm
what i actually meant is if its not intended to be used without copyBuffer().
feel free to answer my other question, too, ono

-
OnoSendai

- Posts: 6243
- Joined: Sat May 20, 2006 6:16 pm
- Location: Wellington, NZ
-
Contact:
Post
by OnoSendai » Mon Dec 15, 2008 10:52 am
It should be able to be used independently of copyBuffer.
It shouldn't be clamped to 1.0.
-
suvakas

- Posts: 2613
- Joined: Mon Sep 04, 2006 11:08 pm
- Location: Estonia
-
Contact:
Post
by suvakas » Sat Dec 20, 2008 2:49 am
I have a question about the image buffer too. Don't want to make a new thread about it so i ask it here (i hope you don't mind).
What are the max and min values of the pixel color channel when I use:
copyBuffer(buffer);
r = (float)((const char*)buffer)[(y*w + x)*3];
I mean what's the possible lowest and what's the highest value of r?
I'm experimenting with some image filters here and I'm offten geting very funky colors. So i'm thinking i have to clamp my color values, but i'm not sure what are the legal max and min for r,g,b inside the buffer. Cause it seems, that they are not 0-255. Or are they?
-
OnoSendai

- Posts: 6243
- Joined: Sat May 20, 2006 6:16 pm
- Location: Wellington, NZ
-
Contact:
Post
by OnoSendai » Sat Dec 20, 2008 11:10 am
Yes, they're 0-255.
char can be signed, use unsigned char instead.
-
suvakas

- Posts: 2613
- Joined: Mon Sep 04, 2006 11:08 pm
- Location: Estonia
-
Contact:
Post
by suvakas » Sat Dec 20, 2008 12:09 pm
Thanks a million !
Unsigned char did the trick.
Who is online
Users browsing this forum: No registered users and 8 guests