mini lua primer
Friday, September 9, 2011
Saturday, January 1, 2011
estrela as shader editor
Recently doing more work with Lua and Cg/GLSL again, hence added a couple features to estrela editor.
Lua wise I had added some experimental type-guessing mostly meant to aid auto-completion for luxinia classes. Also the lua-apis that get loaded can now be specified by interpreter, so that no luxinia functions get suggested when you are using a "normal" lua interpreter. Getting useful auto-completion and api help is still a big task so. Especially getting user created functions/classes in somehow would be great. Maybe a static tool that generates files from a lua project or so.
Most problems with "dynamic" text analysis was that when the user edits old stuff, you have to also somehow check whether keywords were changed, added, removed... hence I kinda avoid that complexity yet. I'd rather prefer a static solution that the user triggers, that way it's hopefully simpler and more robust.
Another focus lately was the Cg tool. I've added support for nvShaderPerf and an ARB/NV program beautifier (indenting branches/flow, and inserting comments as to which constants map to what variable). That makes it a bit easier to see what stuff triggers branching and so on.
I've also added automatic setting of GLSL input flag for cgc and some automatic defines such as "_VERTEX_"... so that one can use #ifdef _VERTEX_ and still have all GLSL shader code in one file. A GLSL spec and api description is now also part of estrela. I took the nice opengl 4.1 quick reference card as base. So much for now.
Still haven't found time to push the open-sourcing of luxinia further and add GLSL shader management (but will require ARB_separate_shader) to it for PhD work. But anyway new year now ;)
Lua wise I had added some experimental type-guessing mostly meant to aid auto-completion for luxinia classes. Also the lua-apis that get loaded can now be specified by interpreter, so that no luxinia functions get suggested when you are using a "normal" lua interpreter. Getting useful auto-completion and api help is still a big task so. Especially getting user created functions/classes in somehow would be great. Maybe a static tool that generates files from a lua project or so.
Most problems with "dynamic" text analysis was that when the user edits old stuff, you have to also somehow check whether keywords were changed, added, removed... hence I kinda avoid that complexity yet. I'd rather prefer a static solution that the user triggers, that way it's hopefully simpler and more robust.
Another focus lately was the Cg tool. I've added support for nvShaderPerf and an ARB/NV program beautifier (indenting branches/flow, and inserting comments as to which constants map to what variable). That makes it a bit easier to see what stuff triggers branching and so on.
I've also added automatic setting of GLSL input flag for cgc and some automatic defines such as "_VERTEX_"... so that one can use #ifdef _VERTEX_ and still have all GLSL shader code in one file. A GLSL spec and api description is now also part of estrela. I took the nice opengl 4.1 quick reference card as base. So much for now.
Still haven't found time to push the open-sourcing of luxinia further and add GLSL shader management (but will require ARB_separate_shader) to it for PhD work. But anyway new year now ;)
Monday, July 5, 2010
3point shader
So long no updates, well mostly I am still working on PhD stuff. Finally the publication on smartvisibility rendering techniques for medical datasets is out
And I am mostly working on a CUDA port of vessel histogramm analysis and a bigger system on coronary heart vessel exploration.
Furthermore, the 3point shader http://www.3pointstudios.com/3pointshader_about.shtml is also released (both commercial and non-commercial free edition). The free edition uses the same plugin and shader, but doesn't have the convenient and time-saving ui, as well as no sample files... that said if you want to play with it, you can do so for free.
A major contribution in this work is the fix of 3dsmax's broken tangentspace normalmap display in the realtime viewport. They don't send the same tangent space as they do when the scanline baker generates the normalmap. Autodesk was made aware of this problem. The cool thing is that as it simply is a viewport fix, one can get great quality improvement out of all standard bakes. And people no longer have to waste additional geometry to fix the "smoothing" issues the broken viewport had.
Thing is that many game companies have "taken" the broken viewport for the "correct" tangentspace, which it simply isn't, as Autodesk has several inconsistencies within max SDK for exposing the tangentspace. If you are interested in the fix or how to use it in game engines, you can contact 3pointstudios about it.
Another addition to the plugin/shader is mirroring support for object-space normalmaps. I have experimented with that for quite a bit, as well as transforming object-space to tangentspace in offline tools to allow exchanging the baker. Anyway the plugin generates per-vertex reflection vectors for the os-normalmaps, as long as you offset mirrored uv parts by a multiple of 1 (which you would anyway to prevent baking overlaps).
Saturday, November 14, 2009
function call highlighting

I am quite a visual assist addict, and miss some of its features in other IDEs. For luxinia's Lua and Cg use, I tweak the estrela editor to my own needs. wxWidgets's scintilla version, doesn't allow you to use the style-bits as flexible as I'd love to do. As a result the lexer overwrites the manual changes one does. But with the indicators at least, you can make sure they aren't modified. So the latest addition is function-call highlighting, something I really like in VA.
As you might see on the text I am also working on a Lua binding for OpenCL. Whilst I've used manual bindings before, this time I used swig. It needed a few "dirty" hacks and a swigutility library, but now it more or less works fine. Binding, sources and samples will come with a future luxinia release.
Wednesday, October 14, 2009
the realtime GI course
Thorsten just told me about the realtime GI course (Siggraph 2009) being available online
http://www.cs.ucl.ac.uk/staff/j.kautz/RTGICourse/
He also hinted me towards the GI compendium
http://www.cs.kuleuven.be/~phil/GI/
http://www.cs.ucl.ac.uk/staff/j.kautz/RTGICourse/
He also hinted me towards the GI compendium
http://www.cs.kuleuven.be/~
Friday, September 18, 2009
the virtual endoscopy


Here you can see the lung. For a upcoming presentation, I've been messing with some settings with the endoscopy system I've developed a year ago with focus on nasal sinuses, however it works for other hollow organs just fine. My supervisor on this project (diploma thesis) had made contacts with the university clinic in Leipzig and together with a leading ENT-surgeon, the usability of the system was tweaked. At the end it was used in larger clinical study at two locations with some 100+ patients (who prefered virtual pictures over video hehe). Texturing is tri-planar and several post steps are needed to smooth normals and so on (inter-leaved sampling, hitpoint refinement....).
More details about implementation can be found in one of the publications around this project:
SinusEndoscopy-IEEE Vis 2008 Paper, Slides
Main focus was a surface depiction that is similar to what the surgeons are used too (but not too real, to prevent false impression of too much data security, CT cannot show tissue diseases). The effect is similar to the Cascades-Nvidia demo.And some videos:
IEEE Vis 2008 Video
Colonoscopy
Neck endoscopy
Friday, August 28, 2009
the simple cuda test

The refactoring and rewriting of luxinia's internals goes on, prior open sourcing the full project (cleaning up code and trying to apply some of what was learned). On the side to have some fun, further dx10 features (ogl equivalents) are added. So more of GL's bufferobjects features are made accessible on the Lua side.
A result was a small sample of coding up a lua extension dll, which runs a cuda kernel on a vertexbuffer. I never played with Cuda before, and kinda missed the built-in vector types of Cg, ie that float3*flaot must be done via operator overloading in cuda... means the compiler has to do vectorizing himself (but he can, compared to Cg). I've modified the simpleGL nvidia sample to make use of custom vertex color attribute. It's really nice that cuda supports the datatypes, transform feedback wouldnt allow you to store back to smaller datatypes.
Next comes up adding transform feedback, so that you can specify output streams in a shaderpass and streamobject will be a resource like a texture, assignable to material instances. First will only do for nvidia profiles. I still use Cg runtime quite a bit, so doing it for their GLSL profiles is a bit ugly at the moment. Not sure yet if I stick to Cg runtime, or just use it for compilation and do parameter and program creation all myself, would be a bit "what you want is what you get", but also more work now.
Subscribe to:
Posts (Atom)