Saturday, January 9, 2010

Rendering last fixes

Do you remember the rendering capability of Naro? It is based on Sunflow Global Illmination System. This makes to not add as much to installer and require a portable (Java) implementation. For performance sensitive persons, you will need to install JDK (that include the "server" implementation, meaning that the run-time of Java will create multiple optimizations) and I recommend Java 7 pre-release versions that also will bring some performance improvements and at least on my machine it worked stable.
Sunflow is somehow easy to work with, but it prove that our implementation have bugs like retrieving the FOV (the camera angle), also, there was no clear result how it works.
You will have to setup in Tools/Options where is your java.exe executable. Also is recommended to use -server option (if you have installed the JDK on Windows).
After some research I found that there is a PerspectiveView class in OpenCascade that expose the angle in a proper way. Also, I found that based on user's locale installation (for example on Windows in Spanish, the floating point separator is not . (point) but , (comma) ) the script will not be a good result for the Sunflow render. Also there was a bug in lighting and depends on scene orientation and camera, was impossible to get it why the piece appear or not, because the screen was plain black. Some annoyances still remain (like you can setup a single material per scene shapes), but a lot of fixes are done. Also, a preview in the rendering dialog will give to you a measure how things works. Before generating rendering script, there is a triangulation step, but because it generates twice the points, the search algorithm is inefficient of searching duplicate points, so you may encounter a freeze between pressing render and effective rendering. Anyway, it will not take as long as the full rendering anyway.
The scene is an imported STEP file from here.
The build with fixes (also it includes some small fixes that were done from the last weeks) may be taken from here. This will be probably the last Windows.Forms build (with a non Ribbon interface) so if you will not want yet to switch to Ribbon, and you like the Office-97 like UI that Naro have right now, take this build.

No comments: