Commit Graph

3738 Commits

Author SHA1 Message Date
fb94fcd4e7 Patch provided by Chris Burt;
Wood/marble now have three waveforms to choose from: Sine, Saw and Triangle.
The Saw wave allows for much more realistic wood, especially in combination
with a ColorBand. A blender3d.org release page is being constructed about it.

Added: commit in editmesh_add.c to remove circle warning in face-select mode.
2005-03-07 11:01:43 +00:00
c8a84be5f4 Bug fix, provided by Martin Dickopp;
The dynamical allocated arrays (rwenzlaff, april 03) for render vertices/
faces/halos were freed in a way that requires the last element of array to
be NULL.
This wasn't coded however, causing memory errors in exceptional cases;
like when amount of faces/vertices is exact between 261888 and 262144. :)
2005-03-04 22:17:52 +00:00
611c38d0f9 Bug fix #2289
Environment maps type "Load" don't need to have an "Ob" object set to
render. Without object it renders applied envmaps like reflection maps.
Please note that envmaps then still "mirror" realistic, provided the
original object the envmap was rendered with  was not rotated.
2005-03-04 19:44:29 +00:00
da00e25dff Preview render of stucci was wrong. Fix found+provided by Chris Burt. thnx! 2005-02-25 12:19:42 +00:00
d028bcf452 Fix for Key alpha. Thanks to unifying code in render (unified and normal)
we cannot insert colored pixels in sky for Key alpha anymore. Well, this
was useless anyway! (BTW: error not in 2.36 release)
2005-02-19 13:04:23 +00:00
3d0780d3ec Modified version of Chris Burt's fix for border render with invalid
border selected.

I changed the test to this:
 if(R.r.border.xmax <= R.r.border.xmin ||
                       R.r.border.ymax <= R.r.border.ymin) {

Original patch tested xmin=0 which isn't quite right.

Kent
2005-02-17 18:08:39 +00:00
5714ab5d65 Parkinson bug! A & accidentally became &&...
Error caused exceptions for ortho render to be active always... making
some frontfaces and backfaces mixupped.
2005-02-05 16:35:19 +00:00
8d305e9af6 Fixed error in having Ztransp rendered in back of normal solid faces. Was
caused by changing definition of OSA pixel structs 3 weeks ago.
(result: AA looked bad).

Thanks phase for pointing at this.
2005-02-02 17:26:24 +00:00
fa2a1c84c7 Bug fixes;
#2187: Append to active layer now uses the real active layer
#2191: Stars didnt show up correctly in envmap render
#2194: Startfame > Endframe in anim render crashed (now it gives error)
2005-01-30 15:40:42 +00:00
996374bb5a Fixed old annoyance; enabling true Ortho render in Blender.
It used to be a simple hack, scaling lens with 100, and moving the camera
to the back with an equivalent amount.
Because of the hack, making it 100% compatible with older files I could not
achieve (yet?). To help reminding users, I've added a print when reading
old files with Ortho cameras.

Full description of how it works can be found here;
http://www.blender3d.com/cms/Render_changes.515.0.html
2005-01-30 11:25:27 +00:00
e44b07d828 Added color filtering for raytrace transparency.
http://www.blender3d.org/cms/Transparent_filtering.514.0.html

Choice was for using a single (new) filter value and have it working OK
with existing alpha.
2005-01-24 14:08:06 +00:00
1f394a8e0c Bug fix 2116
Area lights with "Noise" dithering only worked for first area light, the
other ones then used wrong table... bug since area lights are in blender.
2005-01-21 12:46:59 +00:00
92586e1ee2 Using halo (particle) render with OSA and gauss had error.
Removed it in OSA from special thread loop now, making it unthreaded but
render OK. Main reason; subpixel-based adding with gauss doent work
for halos yet.

Unified render does that though, but result is just filter, no real
subpixel.
2005-01-18 18:31:18 +00:00
672d28534c Render lens flare works again. Didn't work due to wrong value for zbuffer
passed on (zbuffer values changed with previous commit)

Also fixed previewrender for lens flare.
2005-01-18 15:22:42 +00:00
912ef80bdc big softbody commit
some vertex group , weight painting stuff too
/me crosses fingers it does not break anything
2005-01-12 22:28:13 +00:00
8229ea59de Different integer overflow test for zbuffering, this due to mist+wire bug
that seems not to be solved on intel platforms.

Previously, a positive signed integer overflow addition was checked by
assuming it to become negative. Now it checks 'safe' with this version:

if(vergz > 0x7FFFFFF0 - dz) vergz= 0x7FFFFFF0;
else vergz+= dz;

Reason why using signed ints is cumbersome... overflows for unsigned are
much easer to find.
2005-01-09 13:36:14 +00:00
9adbe1ec0e Star halos still used old fashioned byte colors, instead of nice floats :)
Reason for them to show wrong.
2005-01-08 14:45:58 +00:00
9393e490af Fix for commit of yesterday, where wire render + mist was solved.
Had moved normalizing the view vector just a couple of lines to much...
causing OSA vectors to be calculated wrong, and image texture to show
much to filtered (nearly invisible)
2005-01-08 14:22:27 +00:00
8ff0209ca5 Bugfix #2048
Object "time" ipo was evaluated before it applied offset for field and
motion blur. Should be after! (ancient one)

in buttons_editing.c: removed sound include file
2005-01-07 18:29:54 +00:00
d5118c08fe Bug fix 2107: RGB and brightness/contrast for preview render image texture
didnt work (commented out line, current WIP)
2005-01-07 14:37:25 +00:00
326c0a08a4 Another round of cleanups for render code;
- removed ugly pointerhack from OSA render (negative indices denoted
  pointers). this should solve memory errors when using >1.5 gig mem
- cleaned up usage of zbuffer values. These are signed in Blender, and
  treated as unsigned all over, giving confusing code
- fixed incorrect gamma-adding for halos (caused in after xmas commit)

And bugfix #2101; wire render didn't give correct rendering for mist.
This caused by fact wires are 2D pixel lines, and not correctly filled
in faces. Retrieving the 3d coordinate while render cannot use a face-
equation then. Solved by retrieving 3D coordinate based on zbuffer value.

Still todo here: calculating correct texture coordinates for wire-edges
that are no faces.
2005-01-07 14:11:00 +00:00
776b2451e1 Bugfix #2095
When loading a file with linked external scene, and that external scene
didnt exist anymore, and that scene was active in the file -> crash!

Render code; changed to use local 'puno' flag for threaded render.
2005-01-05 10:31:27 +00:00
c851319b57 Thread render fix; using ray-transp + mirror didnt work...
the face-normal had to be local too...
2005-01-03 20:02:55 +00:00
40813b301a Bug #2083
Rendering in parts, and ESC from render, didn't check for not-rendered
parts yet. (due to recode of parts stuff)
2005-01-03 18:30:58 +00:00
efd7a0acc4 Bug fix 2054
Alpha for halos was always added, even when "Add" slider was zero. Fixed.

(also; made BROW define BROW16, to distinguish from int version in
BKE_utildefines.h)
2005-01-03 15:22:44 +00:00
8702d18df9 Bug #2053
For normal maps only:
Slider for "nor" mapping in "Map to" panel allowed values for over 1.0 in
preview render (not for render itself, causing confusement).
2005-01-03 14:45:54 +00:00
2b1923d224 Small fixes;
- zbuf; error caused by using unsigned int as counter (while >= 0) in radio
- backbuffer didnt load in initrender (was removed from sky render)
- unitialized variable in envmap.c
2005-01-03 13:13:40 +00:00
f7d6ad8a8f Bug #2073: Red value used instead of Green for World sky (render and preview).
Ton will probably have a good laugh when he'll see what the error was. ;)
2004-12-30 05:48:36 +00:00
a970419d0e If YFexport directory is not set, it will now attempt to use the temp directory.
(/tmp or $TEMP for win.)

Probably too early still, but now in plugin mode the floatbuffer will be used too,
including postprocessing.
2004-12-30 01:34:42 +00:00
0db670ce47 And a first threading fix; mist render still used a R global for storage.
caused very bad stripes in render.
2004-12-27 22:57:19 +00:00
610cec55c7 Biiig commit! Thanks to 2-3 weeks of cvs freeze...
Render:
- New; support for dual CPU render (SDL thread)
  Currently only works with alternating scanlines, but gives excellent
  performance. For both normal render as unified implemented.
  Note the "mutex" locks on z-transp buffer render and imbuf loads.
- This has been made possible by major cleanups in render code, especially
  getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct
  OSA or using Materials or Texture data to write to.
- Made normal render fully 4x32 floats too, and removed all old optimizes
  with chars or shorts.
- Made normal render and unified render use same code for sky and halo
  render, giving equal (and better) results for halo render. Old render
  now also uses PostProcess options (brightness, mul, gamma)
- Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer
  after render. Using PostProcess menu you will note an immediate re-
  display of image too (32 bits RGBA)
- Added "Hue" and "Saturation" sliders to PostProcess options

- Render module is still not having a "nice" API, but amount of dependencies
  went down a lot. Next todo: remove abusive "previewrender" code.
  The last main global in Render (struct Render) now can be re-used for fully
  controlling a render, to allow multiple "instances" of render to open.

- Renderwindow now displays a smal bar on top with the stats, and keeps the
  stats after render too. Including "spare" page support.
  Not only easier visible that way, but also to remove the awkward code that
  was drawing stats in the Info header (extreme slow on some ATIs too)

- Cleaned up blendef.h and BKE_utildefines.h, these two had overlapping
  defines.

- I might have forgotten stuff... and will write a nice doc on the architecture!
2004-12-27 19:28:52 +00:00
302dc94b7a Fix for #2034
It appeared that the method as used in unified render for "render all sub-
pixels" isn't very well resistant to having large amounts of faces in a
single pixel. The bug file had about 16x70x2 faces per pixel... causing
tremendous slowdown and even wrong render.

I've disabled the option (was coded by Nzc in NaN days) and made it
sampling in the main render loop. Goes much faster, error free. Only loss
is in that it doesnt use superiour subsamples for gauss anymore. Here the
normal render performs slightly better. Not a real issue though. Hard to
notice.
2004-12-19 18:18:54 +00:00
f48b4f5b4a Bugfix #2008
Combination of:
- render movie
- with border set
- and "crop" set
Crashed.

Was due to feeding movie initialize code wrong frame sizes. Another oldie!

Also found that crop+border+parts doesnt work. This now is prevented with
warning and return.
2004-12-12 18:16:35 +00:00
10d2330343 The ugly global R.flag was reset to zero, before it was calling functions
that could popup error() boxes. These dont work then, and need to be
disabled by keeping R.flag on R_RENDERING

This is a half fix for a report Rob H works on. Will wait for his test.
2004-12-11 15:48:33 +00:00
974f11379a As addition to the use of Colorband for normals;
- Stucci now accepts it too (for normals and color)
  Note; stucci doesn't return a single value, like marble or wood, that's
  still so, to disable it coloring the "Col" Map input by default.
- Magic texture now accepts Colorband
2004-12-10 18:29:16 +00:00
eae5d39899 Bug fix #1988, ray-transparency render.
Five fixes in this commit...

- the normals for nurbs surfaces still were calculated pointing wrong in some occasions
- recoded ray-transp rendering to accept normals pointing any direction; it just counts how many times it passes a "glass" layer, and flips normals appropriate then. This means rendering will go fine on models without manually setting the normals. You can also move a camera inside a 'glass' object.
- rendering of the inside part of glass now uses correct normal too... specularity happen on a solid glass inside now.
- And an inside reflected mirror ray will keep bouncing inside glass

Related to rendering localview: old convention to render localview, but with the lamps in the normal layers, has been restored.
Please note; render happens based on active window. You *only* get a localview or 'unlocked layer' render when that 3d window is active = mouse in window.
2004-12-09 12:06:37 +00:00
b6f5420e8b Bug fix #1987
Halos with texture, but only mapping to "Alpha" and not color, were
rendered black, instead of in material color.
2004-12-08 15:29:47 +00:00
0e7ac575c0 Sneak in little feature for texture editing pleasure;
- New channel for "Map to" added, "Warp"
- Use the slider next to the option to set amount of influence the texture
  will have on the coordinates of the next texture.
- Warp uses for this the same values as for Normal or Displacement mapping
- Warp remains active for all channels, until replaced (or zeroed).
2004-12-07 17:46:14 +00:00
d0cdf2bd4b More tweaks related to bump mapping quality;
While going over the code, I found out the "nabla", the size of offset
vectors for calculating derivatives of a texture, is a built in constant.
Even worse, the value was different for new noise types (musgrave etc).
So I've added a new slider for it in the procedural texture panels, which
by default is set to 0.025, the value of the old constant. Also made sure
it works with equal effect in all procedurals.

NOTE: a small Nabla will give sharper, detailed bump, but the effect also
becomes smaller, correct that in the Mapping Panel of materials.

For better & compliant control over the bumpmapping, I've also included
the Colorband output in derivatives calculus, so the bump output then
matches the color created. It's also a nice tool to finetune output of
textures for bumpmapping in general.

Bug fix; clicking on the rightmose 'item' in ColorBand didn't activate it.
Found out the ColorBand was slightly drawn off (2 pixels).
2004-12-07 14:46:48 +00:00
23b14eccec Bug fix #1978
Stencil in World didn't work with RGB textures (like what returns from
colorbands).
2004-12-06 19:14:53 +00:00
e4d428b539 Tweaked support for normalmaps to be OK.
http://www.blender3d.org/cms/Normal_Mapping.491.0.html

main changes:
- The "Map Input" in Blender for normals was negated
- Range for Z in normal map is Z (0-1) to Blue (0-255)
2004-12-06 18:05:42 +00:00
1e811c7886 Bugfix: normal mapping for textures wasn't rotated back to view space,
causing weird results on camera moves or object rotations.

Added: support for "normal maps". See for example:
http://members.shaw.ca/jimht03/normal.html

The Image panel in Texture buttons has new option "Normal Map" for it.
When this is used, normals are read straight from RGB values, and blended
with the current normal.
2004-12-05 21:49:13 +00:00
aad31875d7 Special bf-committers request; Lamp/World/Material now each have 10
channels to link texture to.

The amount of code changes seems large, but is mostly getting rind of
hardcoded values (6 and 8) for channels, replacing it with MAX_MTEX.

Further did some fixes;
- Ipo for Lamp showed too many mapping channels
- Texture MapTo buttons for lamp missed the slider to blend texture color
- Lamp texture mapping "View" only worked for Spot, now it uses lamp-
  view vector for all types. (Nice for projections!)
2004-12-04 21:49:02 +00:00
fb57058f9f Bug fix #1954
Edge render for wire in unified was total mess! Code there apparently never
even tested. Gave wrong rendering and potential crashes.
2004-12-04 12:02:19 +00:00
0d9f06cce4 Bug fix #1947
Unified render added sky with alpha=1. Found the way how to fix it, didnt
dare that yesterday. :)
Now sky is rendered with alpha=0, like normal render.

Thanks to the recent reports, a lot of old issues with unified render have
been solved. This is going to be pretty OK!
2004-12-03 17:03:35 +00:00
7a686d2d7e Bug fix #1948
When using a backbuffer with alpha, but alpha is not premulled, you can
get weird rendering results with halos or lens flare. This was caused by
optimize rule in alpha routine that assumed alpha==0 means color is zero.
Removed for the the halo case.
2004-12-03 16:44:48 +00:00
aa92e3e37f Bufix #1942
Halos with Flare option didn't render correct in Unified render, they were
added twice!
Also noticed errors in applying alpha for 'Premul' alpha in Unified. Fixed.
2004-12-02 21:18:58 +00:00
47230dbf75 Bug fix #1939
Combining panorama scene and Sequencer effect on scene (like glow) crashed.

Found two other issues;

- on click in sequencer, the image output window didn't redraw correct, but
  only when a render window was opened. Caused by missing 'activate' call
- added a pause in dragging-frame loop to make it idle friendly
2004-12-02 18:12:18 +00:00
a7e250e85c Bug fix #1937
In unified render, halos can give black/colored overflows. Found it this
happens with halos that are behind the camera clipping range. Halo clip
just had some weird code for panorama corrections...

In the provided .blend of report found 3 more glitches;

- after render particle system with Material Ipo, values for material were
  not restored correctly
- Meshes with particles didn't draw axis (draw extra) on correct location
- Same as above, axis didn't draw in selected color.
2004-12-02 14:52:40 +00:00
63d38ede15 Bug fix #1922
Gauss filtered render now supports using Part render too.
Solved by increasing part sizes with 1 pixel around, but only with gauss
set.
2004-12-01 19:46:58 +00:00