Wednesday, September 30, 2009

The wonder hospital.


Let me introduce a close friend of mine's short animation. I'm always waiting for a next pixar's project and a next Ghiburi's animation, as well as my friend's short animation.

http://www.shimbe.com/The_Wonder_Hospital.htm

Thursday, September 24, 2009

Why we have to use integer pixel values as final output? no floating-point values?

Most output devices are controlled by integer pixel values. The process of converting the floating-point real values into integers is called quantization

자연스럽게 나오는 질문중에 하나가 "왜 우리는 최종 output image로 integer를 쓸까?" 라는 질문일 것이다. 대답은 간단하다 gamma가 그랬듯이 거의 모든 device들이 실질적인 color를 생성할때 인티저 값을 요구하기 때문이다. 그럴것이 채널당 8bit 즉 256 칼라 수만큼 표현하는데 있어 명확한 칼라값을 요구 하기에는 인티저가 제격일 것이다. 32bit상에서도 integer가 유용할때가 있다. 예를 들면 칼라의 경계를 명확히 해야하는 ID를 추출할때를 들수 있다. 하지만 거의 모든 3D 더나가 2D and compositing application에서 계산하는 전 과정은 floating-point이다. 하지만 최종 아웃풋으로 내 보낼때 아래와(256 color수의 예) 같은 integer로 전환과정을 가게 된다.

outPixel = (pow(((inPixel * 255.0) - inBlack) / (inWhite - inBlack), inGamma) * (outWhite - outBlack) + outBlack) / 255.0;

Wednesday, September 23, 2009

Monitoring for 32 bit floating-point color depth.

3D 작업 상에서 효과적인 color depth는 As much as possible이다. 단 하드웨어와 소프트웨어가 지원을 하는 한도 내에서. 하지만 현 하드웨어, 특히 computer display의 지원이 다른 것들에 비해 느리게 발전되어 왔던것 같다. 8bit 이상을 써 왔을 경우 확인 할 수 있는 방법은 극히 제한적이다. 그래서 전에도 언급 했듯이 계산 되어진 절차와 공정으로 우린 머리속으로 모니터링을 하게 되고 최종 목적지로 안심하고 보내게 되는 것이다. Output color depth를 32bit floating-point로 했다고 해서 rendering time에 별로 영향을 미치지는 않을 것이다. 3D renderer 내의 모든 공정이 가장 근사하게 32bit floating-point in linear space로 이루어 지기 때문이다. 단지 저장 공간인 하드에 많은 부하를 줄 것은 분명하다.

Gamma correction issue in 3D CGI rendering

gamma correction이 issue가 된 원인을 살펴 보면 renderer내에서는 아무런 gamma correction에 대한 issue꺼리가 없다. 하지만 renderer밖에 있는 이미지 데이타(as texture or image based light)가 3D renderer로 input으로 들어 올 때와 그 데이타를 가지고 rendering 되어 final render output으로 나와서가 문제가 된다. 책임을 따지자면 먼 옛날 브라운관이 발명 될 때로 돌아가 보면 부족한 8bit color depth를 매꾸어야만 하는 상황에서 나온 나름 똑똑한 방식으로 나왔기에 책임을 물을 수는 없는 것 같다. 그냥 기술이 발전되는 과도기에서 나온 happening이라고 말 할수 있을 것 같다. 그렇다고 그냥 happening이라고 말하기에는 그간 10년 넘게 우롱 당해온 3D CG 일반유저가 가엽다고나 할까?

재밌는건 밖의 2.2gamma correct된 이미지(Textures)가 renderer안에 들어와 마지막 render pixel화 단계에서 gamma correct 안되면서 그 보이는 것보다 밝에 들어온 texture가(gamma correction 때문) 파이널 렌더링에서 모티너의 gamma때문에 감추어 진다는 것이다. 그래서 일반유저가 볼때는 아무런 문제가 없는 듯 보인다. 하지만 render내부에서 계산되어지는 rendering, shading, lighting 모든 것들이 linear로 계산되기에 잘못 된 최종 아웃풋을 렌더링 하게 되어 지는 것이다. 다시 말하면 잘못된 쉐이딩 라이팅의 값과 비슷하게 맞아 떨어진 texture값의 아웃풋이 우리가 흔히 보는 3D rendered images인 것이다. 그럼 2.2 gamma corrected texture 대신 원형 그대로인 linear space의 texture 쓰게 되면 그 문제점이 확연히 들어난다. 가까운 예를 들면 HDRI를 texture나 env map으로 사용하면 알 수 있을 것이다.


The standard image processing calculations that might be applied to an image, such as blurring, resizing, or composting, all work best if the data is "linear," that is, has no built-in gamma correction. For this reason, it is usually best for high-quality images to be stored with no gamma correction and to apply correction as the image is being loaded into a display.

Tuesday, September 15, 2009

The RenderMan community of Japan, RenderSan( San means sir in japanese)

처음에 무슨 소리인가 하다 한참을 웃었던게 기억난다. 간혹 농담식으로 랜더우먼, 랜더걸이라 하며 만든 이름들은 봤지만 이게 가장 웃긴 것 같다. 참고로 ~상은 우리 나라말로 ~씨로 해석하면 된다. 랜더씨라....그럼 한국은 RenderSSi? ^^

http://www.rendersan.org/