Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(102)

Issue 5437112: Camera Data Node for Cycles (Blender) (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by dfelinto
Modified:
12 years, 5 months ago
Reviewers:
brechtvl, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

My second cycles node, working partially: View Distance: ------------ it's working fine. The formula [ distance = sqrt(dot(vector,vector)); ] is the conversion to pure c/opencl of Blender's normalize_v3 function. View Z Depth: ----------- It works but it's 'banded' (expected I guess). Also the Z doesn't seem to change if I change the camera clip start and clip end. I thought Z was calculated between this range. That would boost the resolution a bit. View Vector: ---------- the result is always different than Blender Render. However the vector seems to be fine given that I use it to calculate the Z and the distance. So it may need a little tweak. Also I thought that sd->I would be the view vector, but it doesn't seem so. OSL: ---- I didn't build the OSL shader because there is no way I can test it, and no way I will get it right without testing it ;) SVM ERROR in OSX: ---------------- If I try GPU rendering in my ATI OSX complains of tons of warnings (not related to this patch), and that abs doesn't not match any of the available overloads (although abs is part of OpenCL1.1)

Patch Set 1 #

Total comments: 5

Patch Set 2 : final patch: addressed all the points from Brecht + removed fabs and implemented OSL. good to go? #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -3 lines) Patch
intern/cycles/app/cycles_xml.cpp View 1 1 chunk +3 lines, -0 lines 0 comments Download
intern/cycles/blender/blender_shader.cpp View 1 2 chunks +4 lines, -1 line 0 comments Download
intern/cycles/kernel/CMakeLists.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
intern/cycles/kernel/osl/nodes/CMakeLists.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
intern/cycles/kernel/osl/nodes/node_camera.osl View 1 1 chunk +33 lines, -0 lines 0 comments Download
intern/cycles/kernel/svm/svm.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
intern/cycles/kernel/svm/svm_camera.h View 1 1 chunk +43 lines, -0 lines 0 comments Download
intern/cycles/kernel/svm/svm_types.h View 1 1 chunk +2 lines, -1 line 0 comments Download
intern/cycles/render/nodes.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
intern/cycles/render/nodes.cpp View 1 1 chunk +27 lines, -0 lines 0 comments Download
source/blender/nodes/shader/nodes/node_shader_camera.c View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5
dfelinto
12 years, 5 months ago (2011-12-02 03:03:24 UTC) #1
brechtvl
http://codereview.appspot.com/5437112/diff/1/intern/cycles/kernel/svm/svm_camera.h File intern/cycles/kernel/svm/svm_camera.h (right): http://codereview.appspot.com/5437112/diff/1/intern/cycles/kernel/svm/svm_camera.h#newcode29 intern/cycles/kernel/svm/svm_camera.h:29: zdepth = abs(vector[2]); this should be changed to fabsf(vector.z) ...
12 years, 5 months ago (2011-12-02 14:25:33 UTC) #2
dfelinto
final patch: addressed all the points from Brecht + removed fabs and implemented OSL. good ...
12 years, 5 months ago (2011-12-02 19:42:51 UTC) #3
dfelinto
final set of comments, waiting for your 'go' http://codereview.appspot.com/5437112/diff/1/intern/cycles/kernel/svm/svm_camera.h File intern/cycles/kernel/svm/svm_camera.h (right): http://codereview.appspot.com/5437112/diff/1/intern/cycles/kernel/svm/svm_camera.h#newcode29 intern/cycles/kernel/svm/svm_camera.h:29: zdepth ...
12 years, 5 months ago (2011-12-02 19:46:15 UTC) #4
brechtvl
12 years, 5 months ago (2011-12-02 19:56:21 UTC) #5
LGTM :)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b