old files still use the old fast OSA, and when you want a specific
material to have specular/shader/texture AA you can set this individual.
When rendering ray_mir or ray_transp or ray_shadow the new OSA will be
effective by default however.
Still todo; make this switch work for transparant faces and unified...
Problem was in calculation of oversampling vectors for correct AA. With
the new AA method, this is less necessary, so the code now doesnt use
mipmapped or filtered images when it is refracted. For reflected rays it
does still use the filter though, there the error is hardly noticable.
For all tests and report .blend files it looks much better.
However, a real mathematical solution is preferable still.
This is another extreme old one; from before NaN days even!
Issue is that shadowbuffers have a bias to prevent faces shadowing itself.
To make bias smarter, code was added to adjust bias based on light angle.
This correction allowed a factor of 10 times smaller bias, being in many
cases much too strong, causing frontally lighted faces becoming too dark.
New correction only halves the bias on frontal light, which looks quite
more convincing and pretty.
This problem appeared to be a famous one, with some fun read to be found
on the web. The solution as I commit here is described on the site:
http://www.blender3d.org/cms/Misc_improvements.355.0.html
As extra (I needed it quite some!) added requested feature to have the
renderwindow display in titlebar whether the spare page is shown (JKEY)
although it rendered the submitted bug file fine...
Note to self again; always also check if code even works in general! :)
Note to self 2: don't fix things ad hoc when you're not coding
When using xml export, yafray will now render the alpha channel as well when 'RGBA' button in blender is enabled (Plugin does this automatically).
In plugin code, fixed smooth shading bug for non-mesh objects.
Relative paths for textures are now recognized (plugin & xml).
Fixed problem with duplicate objects (plugin & xml).
Really old bug, sun position is now correct (plugin & xml).
World background now can also be a regular image texture (jpeg & tga), but for now always assumes spheremapping, which is not the same as Blender either. In yafray the texture is assumed to be a full 360 (panorama type) map.
convertBlenderScene.c cleanup, the identity transform 'hack' is removed.
THIS AFFECTS ALL EXTERNAL RENDERERS (Aqsis and others) WHICH RELY ON THE RENDERDATA OUTPUT, VERTICES AND LAMPCOORDINATES/VECTORS NOW NEED TO BE TRANSFORMED BACK TO WORLD COORDINATES. See yafray plugin/export code.
Edges in Mesh
- adds automatic when you use creases. For other situations; call the
void make_edges(Mesh *me) in mesh.c. Of course, once in editmode the
edges are automatically recreated.
- in F9 buttons you can add/remove edges too
- both for Mesh and DisplistMesh, so it speeds up drawing quite some in
wireframe
- render for edges can't work... edges have no material nor tface nor col..
so here still the faces are rendered in wire
Creases in Subsurf
- based on the code by Chris McFarlen
- main changes is that now edges are used, saving quite some data in file
- use SHIFT+E in editmode to set edges-sharpness. values go from 0-1
- in F9 buttons you can set draw-crease mode. It draws now blended from
wire color to edge-select color (as provided in Theme)
Known issue: setting sharpness on 1 cube (subdiv 2) gives weird results
with some values... Chris, can you check?
Further; code cleanups, changing 0 in NULL when needed, no warnings, etc etc
- textures: added support for new mixers (div, diff etc) to work on the
other map-to channels too, like ref or spec
Also it works on lamp and world textures
- brought back uncommented line of code that was removed by leon, to have
particle motion based on textures
- recoded the glPylonOffset hack to be nice function, this for future
testing.
Kent Mein. So next to the mix, mult, add, sub we have now:
- Div: divides by texture color
- Screen: is like Mult, but works opposite (makes lighter)
- Diff: the difference between texture color and material
- Light: if texture is lighter it shows (per component)
- Dark: if texture is darker it shows (per component)
Next step: add this for specular and mirror, and the other channels...
I commit it now because it also fixes error in previous commit.
Please note the following:
- pictures need to be saved as 'premul' sky render if you want to use it
in Blender as texture
- but for alpha-over in sequencer it has to be 'key alpha'...
This inconsistancy needs to be solved.. for example as option for both
texture as sequencer.
Division by zero in calculating render coords... only happens for
Wire material AND having face-less edges. Then the normal is zero, and
some calculations can't happen correctly.
(error in rendercore.c, other files committed was because of removed and
cleaned up enters)
http://www.blender3d.org/cms/Ramp_Shaders.348.0.html
Material color and specular now can be defined by a Colorband. The actual
color then is defined during shading based on:
- shade value (like dotproduct)
- energy value (dot product plus light)
- normal
- result of all shading (useful for adding stuff in the end)
Special request from [A]ndy! :)
New is that objects can have a force field, and Meshes can even deflect
(collide) particles. This is in a new sub-menu in Object buttons F7
The full instructions where on the web, Leon mailed it me and I will put
it in CMS tomorrow. For those who like to play with it now, here are demo
files:
http://download.blender.org/demo/test/
Quite some changes where in the integration though... so previous created
particle deflectors will not work. Changes to mention now are:
- gravity is renamed to 'force field'
- force field and deflector options are in Object now, not in Mesh
- the options also have its own struct, doesnt add to Object by default
- force fields are possible for all object types, but only work on center.
So empty objects are typical for it.
Work to do:
- add draw method in 3d win to denote forcefield objects
- check on the UI (panel with different size?)
- add 'recalc' button in deflector panel
The work i did end of may on render normals (displacemap especially)
caused refraction code to work wrong... took a while to find out, but
just removed a couple of lines too much.
Added clear comment there what it is, and what danger of removing is!
Needs latest yafray, you can get it from cvs, but I have also binaries
for os x here:
http://www.coala.uniovi.es/~jandro/noname/downloads/yafray-0.0.6-3.pkg.zip
To use it, go to yafray panels (global settings) and uncheck the "xml" button.
That would tell the export code to avoid xml export and use the yafray plugin
instead. You'll see the render being draw while running and you can even stop it
with ESC key.
Since I'm sure problems will appear, expect updates soon.
Remember: does not work on win32
Envmap render error; when no (f10) envmap option was used, it could give
a 'stripe' effect based on a non-initialized global value. Only happens
for transparant layers...
Key alpha (render) set alph component at '1' for sky... this is an old
convention from NeoGeo days, and I have absolutely no clue whatfor...
maybe for some antique amiga iff format or so. Made it zero now.
conversion. Old method tried to solve it per object, detecting a flipped
matrix. Since we have displacemapping and raytracing this is too inaccurate.
Also, flipping normals should alsways result i correct flipped vertex-
normals too.
Solution is to completely recalcuate the 'puno' (vertex normal) flags in
renderHelp.c now (set_normal_flags). The face normals themselves are not
flipped until that stage.
Second major improvement involves the calculation of correct splitted
triangles, when a quad is not flat. It now creates triangles based on the
vertex normals, which have actual information on surrounding geometry, thus
resulting in much smoother results.
Without this you get errors in ray-shadow, with light shining almost
parallel to a face. But again, displacement mapping improves with it too.
Third fix is that by removing normal flipping from displace code the result
is much better now.
needs cleared. Timings go down nice:
octree new 2.33a
128 0:04.2 0:07.5
256 0:06.5 0:20.0
512 0:18.0 2.06.9
Time is including initialize renderfaces etc. 100k quads.
first commit for review and improvements on OSA (anti aliasing) in
Blender.
http://www.blender3d.org/cms/Rendering_engine.320.0.html
Most relevant changes:
- full check on subpixel sample locations
- all subpixels are fully rendered (gives spec AA, procedural texture AA)
- also unified render uses it
- removed double-used code for unified render
Whether or not this will be optional (better pics, but in some cases slow)
is to further evaluate. For raytracing - for example - this cannot be simply
done, since the new sampling system made raytrace code much simpler.
When Traceable was off, and the rendered pixel outside Octree, the
intersection was going wrong. Due to the many samples taken not easy
to see, but certainly causing extra noise.
"Sphere": spherical mapping for a 360 degree panorama
"Tube": cylindrical mapping for a 360 degree panorama
Both mappings by default do only the sky (upper) hemisphere. The color
below is same as regular Horiz and Zenith colors, useful for setting
an AO effect.
Sample pics:
http://www.1000skies.com/fullpanos/index.htm (commercial)
very unexpected location, causing small offset in rendered sub-pixel,
which showed only up raytracing a very detailed object with small
faces... ugh!
(Thanks [A]ndy, sorry Desoto! :-)
The Image texture repeat options, now allow a "Checker" repeat. With
odd and even tiles set separately, and a size button to set a
'Mortar' inbetween tiles.
http://www.blender3d.org/cms/Render_engine_features.215.0.html
Also fixed bug: using 'CalcAlpha' option for image textures didn't give
antialised edges for image.
cleared correctly for each face, causing too many octree nodes to be
filled in.
Especially for more complex scenes this fix is quite a time saver.
Still looking at ways to speedup octree filling though.
When tracing a mirror with AO, the rendering was extremely slow due to
each mirror sample (like 8 per pixel) taking a full range of AO samples.
Now it uses for mirror samples a corrected amount, which makes sure for
a single pixel still a full AO range is used.
Makes mirror+AO render 5-6 times faster, at least.
bytes for RGB.
This to allow very bright contrasted images to be used for AO as well. As
a first start also the Texture->Colors panel now allows contrast setting
up to 5.0 (was 2.0).
indicate scanlines being in progress. For motion blur frames it works too.
Bug fix: in background render it accidentally tried to free a sound pointer
that wasn't set. (caused by own commit of three days ago).
Fix: rendering motion blur in forground prints correct sample # in info-
header again.
appeared that the standard size (64x64x64) just works fine for small
scenes, like a single character in a small environment. Larger scenes and
larger environments became exponentional slower.
Disadvantage of larger octrees is longer build time, and overhead traver-
sing it though, so something to tweak based on some experimenting.
A table with test results + blender file will be in CMS soon.
New button is in F10 Render panel, in bottom. Last free spot there! O_o
Sizes supported now 64, 128, 256 or 512.
When toonshading is used, also backfacing polygons are rendered. This
causes a conflict with raytraced shadow, since backfacing polygons
always have shadow.
There was an error in the code that didnt set shadow for backfacing
polys, assuming shading would be 'zero' then as well. That's fixed.
Somewhere after 2.28c I fixed some thing in radio rendering that prevented
textures to be applied to radio energy.
Now it is a normal 'diffuse' energy again, and multiplied with actual
(textured) material color.
Small fix: the radiosity steps show up as numbers printed in time-cursor.
The OSA ofset vector for current rendercoord (O.dxco) wasn't
initialised in all cases. Actually, just removed it for AO, effect is
invisible.
Bug provided by jK, not in tracker. thnx!
pattern as previous commit for AO.
Previous setting, dither+jitter, has been cancelled. Now you can choose
for either nothing, dither, or for noise. With the latter giving same
nice noise as for AO.
Pics:
http://www.blender3d.org/cms/Render_engine_features.215.0.html