{"action":"created","issue":{"url":"https://api.github.com/repos/behollis/DBSViewer/issues/92","repository_url":"https://api.github.com/repos/behollis/DBSViewer","labels_url":"https://api.github.com/repos/behollis/DBSViewer/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/behollis/DBSViewer/issues/92/comments","events_url":"https://api.github.com/repos/behollis/DBSViewer/issues/92/events","html_url":"https://github.com/behollis/DBSViewer/issues/92","id":143032732,"number":92,"title":"electrodes not transparent: electrode frag shader fix","user":{"login":"behollis","id":1733527,"avatar_url":"https://avatars.githubusercontent.com/u/1733527?v=3","gravatar_id":"","url":"https://api.github.com/users/behollis","html_url":"https://github.com/behollis","followers_url":"https://api.github.com/users/behollis/followers","following_url":"https://api.github.com/users/behollis/following{/other_user}","gists_url":"https://api.github.com/users/behollis/gists{/gist_id}","starred_url":"https://api.github.com/users/behollis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behollis/subscriptions","organizations_url":"https://api.github.com/users/behollis/orgs","repos_url":"https://api.github.com/users/behollis/repos","events_url":"https://api.github.com/users/behollis/events{/privacy}","received_events_url":"https://api.github.com/users/behollis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/behollis/DBSViewer/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/behollis/DBSViewer/labels/PRIORITY%20ONE","name":"PRIORITY ONE","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"behollis","id":1733527,"avatar_url":"https://avatars.githubusercontent.com/u/1733527?v=3","gravatar_id":"","url":"https://api.github.com/users/behollis","html_url":"https://github.com/behollis","followers_url":"https://api.github.com/users/behollis/followers","following_url":"https://api.github.com/users/behollis/following{/other_user}","gists_url":"https://api.github.com/users/behollis/gists{/gist_id}","starred_url":"https://api.github.com/users/behollis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behollis/subscriptions","organizations_url":"https://api.github.com/users/behollis/orgs","repos_url":"https://api.github.com/users/behollis/repos","events_url":"https://api.github.com/users/behollis/events{/privacy}","received_events_url":"https://api.github.com/users/behollis/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/behollis/DBSViewer/milestones/2","html_url":"https://github.com/behollis/DBSViewer/milestones/secondary%20issues","labels_url":"https://api.github.com/repos/behollis/DBSViewer/milestones/2/labels","id":1465380,"number":2,"title":"secondary issues","description":"features that represent less important functionality or ones that must follow those from the primary issues milestone","creator":{"login":"behollis","id":1733527,"avatar_url":"https://avatars.githubusercontent.com/u/1733527?v=3","gravatar_id":"","url":"https://api.github.com/users/behollis","html_url":"https://github.com/behollis","followers_url":"https://api.github.com/users/behollis/followers","following_url":"https://api.github.com/users/behollis/following{/other_user}","gists_url":"https://api.github.com/users/behollis/gists{/gist_id}","starred_url":"https://api.github.com/users/behollis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behollis/subscriptions","organizations_url":"https://api.github.com/users/behollis/orgs","repos_url":"https://api.github.com/users/behollis/repos","events_url":"https://api.github.com/users/behollis/events{/privacy}","received_events_url":"https://api.github.com/users/behollis/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":14,"state":"open","created_at":"2015-12-17T17:59:17Z","updated_at":"2016-03-23T18:13:50Z","due_on":"2016-03-31T06:00:00Z","closed_at":null},"comments":8,"created_at":"2016-03-23T17:49:13Z","updated_at":"2016-03-23T21:33:01Z","closed_at":null,"body":"polys representing electrode lines are opaque to objects with higher z buffer value. this is likely a problem with the fragment shader or blending mode in opengl.\r\n\r\nrelevant pages:\r\nhttp://www.vtk.org/Wiki/VTK/Depth_Peeling\r\nhttps://www.khronos.org/opengles/sdk/docs/man/xhtml/glBlendEquation.xml\r\nhttp://www.vtk.org/doc/release/7.0/html/classvtkOpenGLActor.html#details\r\n\r\nFrom \r\n\r\nKuhn, Alexander, et al. \"Trajectory density projection for vector field visualization.\" EuroVis-Short Papers (2013): 31-35.\r\n\r\nWe implemented our technique for an additive and subtractive\r\nblending mode. The additive mode uses the blending\r\nequation GL_FUNC_ADD, which adds up colors and creates\r\nthe impression of glowing lines. The subtractive blending\r\nmode is realized by GL_FUNC_REVERSE_SUBTRACT,\r\nwhich subtracts new colors from the background and creates\r\nthe impression of ink painting. The correct blending\r\nfactors are given by glBlendFunc(GL_SRC_ALPHA,\r\nGL_ONE). Since both modes are independent of the depth\r\norder, we can render pure lines in a single pass without depth\r\nsorting and depth test. In combination with opaque geometry,\r\nwe enable the depth test, render the opaque objects\r\nfirst and disable the writing of depth values for the lines\r\nby glDepthMask(false).\r\n\r\n...\r\n\r\nThis function maps color values component-wise from\r\n[0,∞) to [0,1] by 1−e\r\net·v\r\n, where v is a channel of the color\r\nand et is a negative parameter steering the strength of the\r\nmapping. For the subtractive blending, we have to apply a\r\npre-mapping, because the color channels lie in the range of\r\n(−∞,1]. Finally, a gamma correction is necessary to avoid\r\ncolor changes by the tone mapping. In summary, our rendering\r\ncontains four interactive parameters: A global line width\r\nscale rs, an alpha blending fall-off parameter e f\r\n, a tone mappign\r\nparameter et , and eg for the gamma correction. Depending\r\non rs and e f both parameters adjust the resulting brightness\r\nand contrast."},"comment":{"url":"https://api.github.com/repos/behollis/DBSViewer/issues/comments/200552363","html_url":"https://github.com/behollis/DBSViewer/issues/92#issuecomment-200552363","issue_url":"https://api.github.com/repos/behollis/DBSViewer/issues/92","id":200552363,"user":{"login":"behollis","id":1733527,"avatar_url":"https://avatars.githubusercontent.com/u/1733527?v=3","gravatar_id":"","url":"https://api.github.com/users/behollis","html_url":"https://github.com/behollis","followers_url":"https://api.github.com/users/behollis/followers","following_url":"https://api.github.com/users/behollis/following{/other_user}","gists_url":"https://api.github.com/users/behollis/gists{/gist_id}","starred_url":"https://api.github.com/users/behollis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behollis/subscriptions","organizations_url":"https://api.github.com/users/behollis/orgs","repos_url":"https://api.github.com/users/behollis/repos","events_url":"https://api.github.com/users/behollis/events{/privacy}","received_events_url":"https://api.github.com/users/behollis/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T21:33:01Z","updated_at":"2016-03-23T21:33:01Z","body":"Correctly rendering translucent geometry with OpenGL-functionality in the background (as in the case of VTK) requires non-intersecting polygons and depth-sorted traversal. In general these requirements are not satisfied as the inherent order of scene traversal is object-based. Using a method, namely depth peeling, presented by NVIDIA in 2001 [1], shadow mapping (multi-pass rendering) in conjunction with alpha test can be consulted to achieve correct blending of the rendered objects in the frame buffer.\r\nVTK implements this feature since November 2006 as described in the VTK WIKI (Francois Bertel). Unfortunately depth peeling has several OpenGL extension, context and driver requirements (but also runs on Mesa) which restrict the approach's usage to modern GPUs. Usually this feature slows down the rendering process depending on the configuration (occlusion ratio and maximum number of iterative peels).\r\nHowever if depth peeling is not available on a certain machine, depth sorting can be accomplished on the CPU using vktDepthSortPolyData. This is usually much slower than the GPU-implementation and furthermore brings additional restrictions with it (e.g. poly data must be merged within one set).\r\nThis example program generates a set of intersecting (overlapping) spheres that have transparency properties. The program automatically checks whether depth peeling is supported or not. If depth peeling is not supported, CPU-based depth sorting is used. In addition the program tries to determine an average frame rate for the scene.\r\nThe following image shows the spheres arrangement (and view position) and compares the different render modes: no special translucency treatment, CPU depth sorting and GPU depth peeling.\r\n"}}