Commit Graph

3153 Commits

Author SHA1 Message Date
Brecht Van Lommel
f5e89b3f47 Bugfix: this adds some epsilons (FLT_EPSILON, so quite small) to the
raytracing intersection code, to avoid rays slipping through between
triangles, this would mostly show up with sceen aligned quads and
baking of height maps for example. Epsilon's are not pretty, but I
haven't found a reliable way around them.
2008-02-19 12:13:35 +00:00
Brecht Van Lommel
e0dfe62d8c Bug #8234: sky texture for approximate AO doesn't work, as mentioned
in the commit log. Couldn't get this to work well, probably this would
work a lot better with the IBL spherical harmonics feature, so I've just
disabled the option in the interface for now.
2008-02-19 11:07:09 +00:00
Joseph Eagar
ccac67d3ea Further work on the premul option for ton. This option
(which basically tells the renderer and compositor to expect a
key image) is now done at the image user level.

This does have some caveats, as image users don't always work
the way I thought they would/should (for example, the same image user
structure is apparently used in the uv image editor for all images,
which is kindof odd).

The UV image editor also now smartly detects if the premul option is
set and draws the image using key alpha, instead of premul

The subversion level was upped to convert the old premul flag, which was at
the image level, to the new one, which is at the image user level.
2008-02-18 23:50:12 +00:00
Brecht Van Lommel
ca79952dc0 Fix for bug #7787: QMC AO could give bad results tracing rays from an
untraceable material, cause is that the ray start position got set
only once, but it needs to be set for each ray since it can be clipped
to the octree bounding box.
2008-02-18 19:32:57 +00:00
Brecht Van Lommel
a75e34a1df Fix for bug #7936: render baking selected to active now has a Bias
value that is an offset along the normal when looking for the nearest
face, which allows baking faces further away, e.g. an ID badge onto a
shirt.

Also fixes a bug baking to float images, for things other than
displacement it didn't work sometimes, and a memory leak in the
extend filter.
2008-02-18 18:14:19 +00:00
Brecht Van Lommel
988ffbc704 Bugfix for speed vector pass not being done when rendering a single
layer from the compositor. I've solved this by changing the behavior,
now it always renders a vector pass even if Do Composite is disabled.
I think that's more consistent because other passes get rendered too
regardless of Do Composite, the vector pass was just an exception.
2008-02-18 13:38:16 +00:00
Brecht Van Lommel
fb2e03c539 Bugfix for own mistake in recent commit, halo render could crash
with no material assigned.
2008-02-18 13:05:27 +00:00
Campbell Barton
0fe6abbfa3 texture forcefields had a bug where uninitialized values could be used.
do_texture_effector assumed multitex_ext would assign r/g/b colors which isnt true for grey textures.
Fallback to PFIELD_TEX_GRAD with grey textures, node this in tooltip also.
2008-02-17 23:53:48 +00:00
Brecht Van Lommel
10529ca743 Fix for bug #8044: vertex colors weren't supported for hair. 2008-02-17 22:42:03 +00:00
Campbell Barton
1648060132 Bugfix [#8196] sequencer crash when adding scene without camera
added checks for a camera
Also added an error ob bake if there are no active objects.
2008-02-17 20:44:07 +00:00
Brecht Van Lommel
601c7cc318 Fix for bug #8267: vector blur results in horizontal lines.
Vector blur was averaging z-values between pixels, which could give
wrong z-test results. While averaging is needed for speed vectors
to avoid holes, for z-values it is not required and not doing it
seems to avoid artifacts in specific cases.
2008-02-17 20:36:13 +00:00
Brecht Van Lommel
2c11523b39 Fix for bug #8285 and #8286: halo crashes with environment maps and
render instancing.
Fix for vector blur alpha blending bug due to my recent bugfix, as
reported on bf-committers.
2008-02-16 18:49:54 +00:00
Brecht Van Lommel
febede50f4 Bugfix: alpha blending bug in vector blur, gave too dark areas using
input image with alpha.
2008-02-15 18:21:30 +00:00
Brecht Van Lommel
5e9457b5e2 Bugfix for unnecessary missing object warnings for speed vectors,
caused by optimization that doesn't compute vectors for objects that
don't need them.
2008-02-15 15:29:43 +00:00
Ton Roosendaal
1dc7f17493 Bugfix:
In compositor, not always all scenes rendered... this was why:
When disabling 'save buffers', but keeping the 'full sample' option, the
*other* scenes in a composite didn't render.
2008-02-15 13:49:10 +00:00
Ton Roosendaal
58046762f8 1) Revert previous commit, rendering negative won't work that simple...
Needs much more attention.
2) Fix for zcombine node: 
   - it skipped execution when no image rgba out was used
   - didnt work for FSA yet
2008-02-14 18:56:14 +00:00
Ton Roosendaal
3c2adb1801 Allows negative light to result in negative diffuse and 'combined'
when you have world exposure set. (it used to clip it in 0-1, now it
mirrors the values)
2008-02-14 18:00:58 +00:00
Joseph Eagar
ac5d28a13c Added another 2 checks for if an image has the premul flag set, 1 in the image
compositor node, another in render_realtime_texture.  Note that multilayer images 
in the image compositor node do not respect the premul flag (though I did write 
commented out code for it).

As far as I can tell, the premul option never worked for multilayer images in the
image node, so I'm a little nervous about making it work properly there.

ton, any comments?
2008-02-14 13:36:59 +00:00
Joseph Eagar
139b612b09 The "premul" option for images had a very bad implementation. It
basically flagged the image so that on next load/reload, the image
data would be converted to premul.  This was very confusing to the
user, as it meant premul wouldn't take effect will the image was
reloaded, and it would also change the image data, which the user
might've been painting.

To fix this, I've removed this behaviour and instead made the premul
option apply at render time.  During render while evaluating an image
texture, if the image has the premul flag set then the premul operation
is done on the texture result data, thus not touching the image data
at all.

Also, I've made premul be turned on by default.
2008-02-14 12:19:37 +00:00
Brecht Van Lommel
ffa0fd2f2e - Fix for bug #8264: SSS turned off by "default" render settings button,
I also added a button to control enabling/disabling SSS for render.
- Fix for potential halo sorting crash.
- Add a newline at the end of a file to remove gcc warning.
2008-02-13 14:29:06 +00:00
Campbell Barton
bc9848f7e6 Added a global string to be used for the tempdir. since the user preference is not loaded in background mode and the user preference is not validated and has no fallback.
'btempdir' is set with BLI_where_is_temp() - This tries to use U.tempdir but falls back to $TEMP or /tmp/
2008-02-13 13:55:22 +00:00
Brecht Van Lommel
78c3692b2e Fix for bug #7863: AO made normal map baking unnecessarily slow.
Fix for bug #8226: approximate AO doesn't bake.
2008-02-13 13:25:19 +00:00
Brecht Van Lommel
b12793fb4f Render Simplification
This adds a few settings to control global render quality, for faster
renders when tweaking lighting etc. The implementation is not so great,
and this should really be part of a proper render profile and preset
system. So for now it's a hidden Peach feature, enabled by setting rt
to 1. Before the next release, I'll either remove or improve it.

Settings are:

- Maximum subsurf level
- Child particles percentage
- Maximum shadow map samples
- AO and SSS quality factor
2008-02-13 11:18:08 +00:00
Brecht Van Lommel
5c7f41118c Bugfix: approximate AO with pixel cache & osa now should have fewer
black pixels.
2008-02-13 10:44:12 +00:00
Brecht Van Lommel
fdbfd7e3a8 Bugfix: render crash with env material setting and ISB. 2008-02-11 13:04:52 +00:00
Brecht Van Lommel
c5c53b0f2d Bugfix: FSA enabled in compositing scene but disabled in other
scenes could crash, there was code to make sure osa level is
the same in all scenes, but that was set too late, after sample
tables are created.

Fix for some unitinialized vector warnings with FSA, these were
harmless, unfortunately.
2008-02-11 11:00:09 +00:00
Nicholas Bishop
727f9ff727 == Multires ==
Fixed bug #8215, Crash with shaded view + multires mesh
2008-02-09 20:50:25 +00:00
Brecht Van Lommel
2f6ff79fd9 - Bugfix: scenes with SSS materials slowed down preview render
unnecessarily.
- Small approximate AO optimization for sky colors/textures.
2008-02-09 16:30:33 +00:00
Brecht Van Lommel
611e6e79e2 Potential bugfix for an exr tile writing crash. SSS preprocessing now
doesn't write tiles to disk anymore (there is no reason to do so).
2008-02-08 22:09:47 +00:00
Brecht Van Lommel
0e98d2c441 Render optimization: approximate AO preprocessing is now partially
multithreaded.
2008-02-08 15:39:29 +00:00
Brecht Van Lommel
cd0262b635 Small render engine optimization: don't create objects in prev/next
frames if they are not part of a renderlayer that has a vector pass.
2008-02-07 16:29:08 +00:00
Ton Roosendaal
44bd390cc6 FSA: tweaked merging samples with filter to correctly map edges of the
images. Found method that doesn't require image to be rendered larger.

Note: assembling pre-rendered parts that are result of FSA renders might 
still give minor visible artefacts on edges; however, we should include 
such render methods in the render pipeline, so multiple computers can
each render parts, save all samples, and have 1 computer assembling and
compositing all. This is for another project... :)
2008-02-07 12:14:58 +00:00
Matt Ebb
f9593a4f89 * fix: "only shadow" lamps still lit materials with "shadow" turned off. Now, they have no effect. 2008-02-07 06:00:08 +00:00
Brecht Van Lommel
03402b8419 - Removed the Save Buffers/FSA restriction that the width and height
must be divisible by the number of parts.
- OpenEXR code also has some changes to allow writing mipmapped images,
  but that is unused at the moment.
2008-02-06 13:45:07 +00:00
Brecht Van Lommel
4d58ff50cf Fix for bug in strand shading, could give errors on border of parts. 2008-02-05 19:49:42 +00:00
Campbell Barton
33a23853e1 fix for bug [#8065] Crash when baking.
http://projects.blender.org/tracker/index.php?func=detail&aid=8065&group_id=9&atid=125

Lamp ray_samp_method could be an invalid value while rendering because a check was only done in the user interface.
2008-02-03 20:57:52 +00:00
Brecht Van Lommel
1879af7d5c - Small approximate AO optimization for falloff, saves some percentages
render time.
2008-02-01 12:18:45 +00:00
Brecht Van Lommel
baf7be9e46 Memory usage debugging: now with the -d debug option enabled, at the end
of rendering it prints memory usage for images and all memory blocks.
2008-02-01 12:14:15 +00:00
Ton Roosendaal
16ae726f8c More logging prints while preparing scenes in background render.
Uses a timer, so nothing gets printed more than once a second.
2008-01-31 18:03:46 +00:00
Brecht Van Lommel
30b0e926a2 - Bugfix in non-osa pass adding, for example AO got too high values.
Now made it work more like the osa case, easier to verify it works
  correct then.
2008-01-31 16:32:15 +00:00
Ton Roosendaal
90f8fb733b Fix: render could crash when you enable 'do composite' without having
nodes in scene.

Feature: SHIFT+R in compositor reloads all full sample buffers, composites
and merges with filter. (ALso in Node menu).
2008-01-31 15:35:24 +00:00
Ton Roosendaal
e2ee9b57d3 Stupid error in commit of last weekend for zmasking:
You could not mask out anymore using the 'ctrl-click layer' without
having zmask on.
2008-01-31 14:14:03 +00:00
Ton Roosendaal
70c413d4ad Fixes in reading back rendered temp files ("Save buffers" and "FSA" options).
Press Rkey in compositor for reading back render results and invoke a compo.
This now correctly reads AO (skipped it sometimes) and it makes a correct
composite.

FSA todo:
- hotkey + button for reading all samples back + composite
- solve black border around image
2008-01-30 21:14:36 +00:00
Brecht Van Lommel
b9309909fb Bugfix for recent commit in strands, accidentally included code that
wasn't working yet, this should fix it.
2008-01-30 14:25:36 +00:00
Ton Roosendaal
2227c32b7f Two small fixes for FSA render:
- better warning for exr tiles not being equally sized (compositor scenes)
- better check for which exr temp files should be read during merging
2008-01-30 14:10:37 +00:00
Brecht Van Lommel
e67422e863 Fix for bug #8191: FSA + SSS didn't work. 2008-01-30 13:44:25 +00:00
Brecht Van Lommel
33656dfa83 - Bugfix for ztransp not being filled into the z-pass after FSA changes.
- Bugfix for speedvectors being not properly set for some strands.
2008-01-30 13:35:28 +00:00
Brecht Van Lommel
8e94028ed5 Bounding box clipping in the render engine.
Now bounding boxes are computed per object, and checked first before
zbuffering objects. For strands, bounding boxes are computed per
original face in the mesh. Overall the speed improvement from this 
is quite small (zbuffering is rarely the bottleneck), but it seems a
sensible thing to do anyway.
2008-01-29 12:20:42 +00:00
Brecht Van Lommel
c68f48d964 - Fix for adding rendering passes. It seems the result was multiplied
by alpha twice, which gave dark edges on an grass AO pass for example.
2008-01-28 22:43:16 +00:00
Brecht Van Lommel
db9f702db9 - Fix for approximate AO pixel cache crash.
- Fix in FSA pass sample adding (more fixes to come).
2008-01-28 22:34:14 +00:00