Commit Graph

3738 Commits

Author SHA1 Message Date
ed86852f7e New export through plugin scheme for yafray. It is working on linux and mac os x
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
2004-06-16 18:44:12 +00:00
7f3dcd7c64 Bug 1349
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...
2004-06-13 17:40:25 +00:00
d2dbc96b81 bug #1340
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.
2004-05-29 17:33:30 +00:00
59dad6aefc Recoded the methods how normals get corrected and flipped during render
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.
2004-05-29 16:14:34 +00:00
e67713c113 Removed a bzero from octree-filling, replaced with exact code what
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.
2004-05-19 19:30:43 +00:00
1a6329533f Removed double #defines from include, added some comments in code, and
added define for future use to bring back old (fast) AA.
2004-05-18 20:00:51 +00:00
1c93da1478 Removed obsolete file 2004-05-15 18:13:42 +00:00
a4861c37be Assuming the freeze is over and we can head towards 2.34: this is the
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.
2004-05-15 18:07:09 +00:00
cf2aef1df9 Secured division by extreme values with a FLT_EPSILON. This might
prevent hanging on optimized windows build. That's going to be tested
now!
2004-05-12 19:17:00 +00:00
0238900617 Bug fix for AO and Soft shadow:
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.
2004-05-09 21:52:23 +00:00
16c783d950 Added two more mapping types to World buttons for sky render.
"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)
2004-05-07 18:03:40 +00:00
4c423081b2 Fix committed a while ago, revision 1.52, still set a bluroffset in a
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! :-)
2004-04-29 22:31:48 +00:00
97f2cf05f5 Fix #1207
Flag for 'only shadow' was still working when lamp type switched to
Hemi. Also 'only shadow' didnt work yet for ray_shadow Spot lamp.
2004-04-29 16:20:34 +00:00
02ba73aaad Sneaked in new feature (request samo):
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.
2004-04-28 18:08:34 +00:00
34a2350908 - UGH! Some optimize line in sky code screwed up sky render when it had
no texture nor blend... gave weird lines in render.
2004-04-27 17:06:02 +00:00
4f815a52f1 Error found in code that allows dynamic octrees. A lookup table was not
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.
2004-04-26 22:14:31 +00:00
4ff3a1ec10 Request from [A]ndy:
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.
2004-04-26 21:38:36 +00:00
6d2970e406 Added Ambient channel in "Map To" Panel for materials. Is now means to
control AO and Radio with texture too.
2004-04-26 16:49:05 +00:00
44f8257436 Optimize for AO: when material ambient value is zero, no AO calculus
takes place now. Also nice to tweak & speedup environments.

(Thanks Theeth for hint!)
2004-04-26 15:07:08 +00:00
0facc2681e Solved AO smooth rendering, by introducing a "Bias" value for smoothed
rendered faces.
http://www.blender3d.org/cms/Ambient_Occlusion.231.0.html

ALso removed prints when allocating new 'face groups' etc, which wasn't
informative at all.
2004-04-26 14:17:48 +00:00
5bbd35ff05 Turned Sky render code in Blender to become fully float, it still returned
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).
2004-04-24 20:27:29 +00:00
4d29aee140 New: rendering in background mode (blender -b) now prints a percentage to
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.
2004-04-24 12:02:39 +00:00
dffa667674 Raytrace now has option to change the resolution of the Octree used. It
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.
2004-04-23 21:02:58 +00:00
2e4d0e9c5a Fix for #1174
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.
2004-04-21 17:23:04 +00:00
f80809825e Fix for radio render.
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.
2004-04-21 15:44:37 +00:00
9f63f5df7e Fixed error in OSA render & using AO causing stripes.
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!
2004-04-19 14:40:46 +00:00
713a0ceefe Found error in Energy for AO. This didnt work correctly for 'sub' and 'add
and sub' methods.
Also reduced limit for slider. AO energy of value 50 was useless.
2004-04-18 16:18:08 +00:00
02dfa98a89 Better sampling for arealight soft shadow. Now using a distributed sample
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
2004-04-17 20:01:00 +00:00
2cc124cf3b Improved sample pattern for AO. It used to jitter locatations within
a UV Sphere which isn't a very uniform distribution on a sphere.
Now I itterate a evenly distributed set of points on sphere, and use that
by random rotating the entire sphere for each pixel.

http://www.blender.org/bf/samp3.jpg
http://www.blender.org/bf/samp4.jpg

Both pics same rendertime, 36 AO samples. Quite a difference, eh!

Will put html page for release up.
2004-04-16 15:32:49 +00:00
93fe8b63b9 Bug fix 1161
Rendering showed stripes in scanlines, caused by not re-initializing the
horizon and zenith colors for the AO "only sky color" type.
2004-04-15 17:59:45 +00:00
c2526dc922 More AO fun to play with:
- AO energy slider to control amount
- option "Use sky color" for colored AO. The horizon color will define
  bottom diffuse color, the zenith works on top
- option "Use sky texture" will do a full sky render to define AO color

Please note that AO energy and color only is found when a ray does not
intersect. So for interior scenes make sure 'Dist' value is sufficient
low.

New also is:

- World "Map input" allows "Ang Map" (Angular mapping) which can be used
for 360 degree spherical maps, aka as Light Probes. Check samples here:
http://www.debevec.org/Probes/
Note that Blender doesn't support HDRI images yet, but option "Use sky tex"
already gives intersting results with such images

- World sky rendering with Image Textures now correctly filters and uses
antialiasing. Also noticable for raytrace mirror reflections

- World preview render for sky type "Real" now gives correct view as
defined by current used camera.

I tried to speed up AO tracing with coherence systems, none of it really
worked yet... time to tackle octree itself i guess!
2004-04-12 14:53:17 +00:00
69f2ff45cb bug fix 1064
Credits go to blendix! Well done!

Reported were errors in using procedural textures on "Map input" UV type.
It was due to un-initialized uv[2] members, which were actually still
used by texture.c for some coord flip magic.
2004-04-07 12:55:45 +00:00
d1c9c5c319 bugfix #1119
When using MotionBlur, the rendered coordinates were not correctly
adjusted, causing visual artifacts using the new AO, but it was also
visible for normal ray-shadow, which didn't become anti-aliased in
Mblur render.

Solved it with 2 globals now, to pass on blur offset to renderloop.
Leave it that way... the entire method used to jitter/AA/blur stuff
needs revision.
2004-04-06 11:21:44 +00:00
2a90de0348 Eeshlo AO patch, revised
- Ambient Occlusion is a more sophisticated ambient trick, which takes
  nearby faces into account by firing a hemisphere of shadow-rays
  around. AKA 'dirt shader'.
- Eeshlo made it a Lamp type, which doesn't fit well. I've moved the
  settings to the World menu, and let the Material->ambient value control
  the amount it contributes
- currently, the AO value is added/subtracted/mixed with the 'diffuse'
  factor while shading, before it is multiplied with Material color

Buttons are in new Panel 'Amb Occ" in F8 menu. Note:

- "Dist:" by shortening the length of rays you get subtler effects and it
  renders faster too
- "DistF:" the attennuation factor gives control over how the 'shadow'
  spreads out.

Further it's just raytracing, so tends to be slooooow.... :)
Here same tricks as for other raytraced scenes apply, especially try to
keep the environment as small as possible (exclude faces from Octree by
giving them no Material Traceable).

I still have to think over a couple of aspects, will await feedback on it:
- AO color? Now it just adds 'white'
- other sampling patterns? I tried dithering, which was so-so
- method of controlling final 'samples' in F10? Might be useful for other
  oversampling too (area light) to have it reacting to a percentage or so..
2004-04-05 21:04:13 +00:00
22a62a285c - bug fix #1086
using backbuffer, and having an odd number of lines in image, skipped the
  last one to fill in backbuffer...
  An oldie!
2004-04-03 17:11:14 +00:00
0ae03d1626 Eesho's patch for new noise textures!
Basically this provides three new things:

1. Choice of a list of noise-base functions, which can be used by the
   current Clouds, Marble, Wood textures as well.
2. Three new texture types: Musgrave, Voronoi and DistortedNoise
3. Python access to noise functions (not for render!)

All of this together makes Blender's builtin procedural textures a LOT
more powerful. Here again, a full webpage should be made to show off all
possibilities, and explain some of the more scientific names for settings.

A good read on Musgrave textures can be found here:
http://www.ypoart.com/Downloads/Musgrave.htm
About Voronoi:
http://www.ypoart.com/Downloads/Worley.htm
I can't find official DistortedNoise docs easily... maybe its something
Eeshlo created himself.

I've spent some time to change the patch Eeshlo provided. Worth noting:
- created main texture "Musgrave" with 5 sub choices (instead of 5 new
  main textures)
- added for all new textures the option to scale (zoom in out)
- added patch in do_versions to initialize variables

I hope the Python team will check on the Noise.c API. And include in docs!
2004-04-03 13:59:27 +00:00
e5749a632e - disabled 'ray shadow' option from UI and render for Hemi lights.
reason is that raytrace code doesnt like shadow on backfacing faces
  at all. the hemi light is omni-directional, and would need a shadow
  calculation to mimic this as well. the new 'Ambient Occlusion' patch
  will make that possible.
2004-04-01 13:27:24 +00:00
16e90d56d2 - replaced AUTOSPACE define with {ME_,CU_,MB_}AUTOSPACE,
different objects shouldn't share flags this way (still sharing of
  other mesh flags in renderer... ickity pickity, but I'm not fixing now)
 - removed some unnecessary uses of DNA_mesh_types.h
2004-03-14 16:59:48 +00:00
a1c7a5b043 - removed error() call from initrender, for when no backbuf found.
this function needs the UI active, doesnt work with renderwindow.
2004-01-30 18:07:26 +00:00
56926b00ac - fix after testing with regression files; the boundary on a sphere, on the
edge where shaded is unshaded, the shadow routine didn't work correctly.
  Had to put back an old dot-product check to fix.
2004-01-29 22:28:04 +00:00
162d5cdc91 fix for bug #933, specularity was clipped too soon, especially evident
when using low spec hardness value (1 or 2).
2004-01-29 17:33:38 +00:00
c225bf1240 On request of broken, monkeyboi and others the rendering engine menu is back again.
The menu button was also moved to the render panel, this required some changes to the placement of the other buttons.
I hope this is no problem...
2004-01-27 05:46:12 +00:00
7021c88b4d - Port fix for Backbuffer/Optimize hang (caused by short pointer hack)
from tuhopuu.
2004-01-25 16:25:55 +00:00
9c6662e4e0 - when not F10->"Ray" option is set, materials with "Ray Transp" will
render solid now (no alpha).
- This gives nicer previews, but also makes envmaps look better, since
  environment maps are rendered without raytracing
- I decided not to raytrace envmaps mainly because of speed... if you use
  environment maps you want something quick... otherwise just use ray_mir
  material here!
2004-01-23 22:33:33 +00:00
f844d011a2 - added clipping value for spothalo rendering. Unified render doesn't like
alpha>1.0, the 'threshold' calculation in vanillaRenderPipe.c then works
  wrong... not sure if this should be fixed there.
- for now, the spothalo render function itself clips.
- again; thanks to horrible intrr test scene! :P
2004-01-22 12:14:21 +00:00
acdcc29990 - fix for specularity calculus. Because of new area lamps and new ray-shadow
some tests where moved around, causing specularity being calculared when
  light actually shines behind a face.
  Thanks inttr for the (horrible!) test scene that showed it. :)
2004-01-22 11:15:28 +00:00
0a25a54569 - fix for bug #903
this was an error as reported more, with horizontal lines in raytraced
  renderings. It appeared to be an Osa struct being not reset to zero
  for normals... only happens when using bumpmapping.
2004-01-21 20:52:31 +00:00
ede644969b - Made dispfact for new mtex default to 0.2.
- Fine tunes scaleing of Nor channel to better match intensity chan.
	- removed last debug printf.
2004-01-18 17:17:44 +00:00
cfe180805b - ray shadow now also does the options:
- Lamp only shadow (use 'energy' to control amount that gets subtracted)
  - Material only shadow (remember, is an alpha trick)
- demo files for this have been included in testing suite, will be
  upgraded soon.
2004-01-17 16:01:51 +00:00
dab319cfe1 - updated stringlenght for animated texture images in Texture. It used
only the define FILE_MAXFILE, which should be added with FILE_MAXDIR.
- one day these defines should be made more clear, uh!
2004-01-17 13:54:21 +00:00