Commit Graph

313 Commits

Author SHA1 Message Date
52b7b978e3 Bug fix #2411
(Looks like big commit, but is mostly just change of API call!)

Particle emittors now can be parented to an armature Bone, and give the
correct path for each particle. Note that this doesn't work for deform!
And, for each particle the entire armature is evaluated, all actions and
NLA strips.

It used to work a little while BTW, but the code just called ALL armatures
and made ALL deforms again. Was quite slow... thats why the API call
change: do_all_actions() now accepts Object * to only do that one. With
a NULL it now does all still. Will disapppear in recode of course...
2005-04-11 17:55:20 +00:00
618ac4a4e9 Bug fix #2415
Envmap rendering was using Gauss filtering, causing dark outlines in edges
of cube pictures. Now it temporally disables gauss in envmap render, which
isn't really noticable since the pics are filtered + gaussed anyway in the
end result.
2005-04-11 13:49:05 +00:00
f08c0f388a Bug fix #2431
Underflow case in Blinn spec... resulting in large negative values to be
returned in certain cases, causing (again!) black dots.
Thanks randall for clear report with nice demo file. :)
2005-04-11 10:20:17 +00:00
4f55dd8c91 Bug fix #2424
With a sun lamp shining exact perpendicular to a face, the result was
undefined (black or full lit). Was caused by using acos() without checking
the input range. Float calculus can result in small under or overflows...
therefore: always use the arithb.c function saacos() !!!

Found more acos() usage in rendercore (in blinn and arealight too), removed
all of them. Might solve the white or black dots people were complaining
about?
2005-04-11 08:49:42 +00:00
28064baa5c Uncommitted my last commit. 2005-04-10 08:46:47 +00:00
9b81d8f84c Added console printout when rendering in parts, to keep track of progress.
Requested by Relic.
2005-04-09 09:18:32 +00:00
67eaf69f3f - added mesh_get_derived_render
- cancelled previous commit to add RE_findTFAce, instead just added
   a MemArena to render struct... free'd at end of render, can be used
   to store other data as well
 - switch rendering to using DerivedMesh API... this is slightly more
   inefficient now because it is doing some unnecessary copying. Can
   be fixed by defining a DerivedMesh function to convert the object
   into a render object (on todo list)
2005-03-28 21:49:49 +00:00
983745d102 - renderer currently uses links into tface structures that actually
are owned by mesh (or displistmesh)... this causes problems for
   adapting to systems that build tfaces on the fly. Added RE_findTFace
   function to allow allocating tfaces inside renderer itself.
2005-03-28 19:43:45 +00:00
9e90f1407e Bug fix 2303
The gamma functions in gammaCorrectionTables.c cannot be used to correct
and correct back with identical results... causing banding in rendering
pictures with halos.
2005-03-24 21:01:12 +00:00
8e92ee8684 - remove all obsolete inclusions of BLI_winstuff.h (due to recent changes)
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
2005-03-19 21:08:13 +00:00
b3bb3f06ba Some cleaning up of BLI_winstuff.h usage
- removed reference in render.h (really bad, shouldn't include a platform
   specific header so widely unless really necessary)
 - added M_PI, M_PI_2, M_SQRT, M_SQRT_2 defines to BLI_arithb.h... this is
   a better place as it is more the "standard" blender math header. left
   in winstuff.h as well for the moment for simplicity
 - other changes are patches to code so everything works ok with this
   shuffling.
2005-03-19 20:04:25 +00:00
17bd00a851 So! Finally a show-off of the *power* of Martin P's work! :)
- Made framework for 3d Transform Manipulators (widgets)
- The Manipulators act like '2d buttons', by default with LeftMouse and with
  while-hold-move-release
- Implemented now: Translation Widget, which allows:
  - four hotspots for axis grab or view-aligned grab
  - center defined by 'around' setting
  - SHIFT+LMB gives planar constraint on other 2 axes
  - works in Object mode and Edit mode (not posemode yet)

Enable it with (temporal) icon in 3D header. All other 'normal' transforms
then keeps working btw.

On the todo for this widget:
- choice for Global, Local or Normal orientation

The way the widgets are going to work is in review still. Commit is also for
Matt for his proposal/paper on topic.
Some notes regarding this project;

- no life updates (on mouse over) like 3DS, I think that's neurotic
- on click, dominant axis changes to theme defined "Transform" color, other axes disappear, like maya
- manipulater size is fixed preset, independent zoom.
- manipulator follows selection, and is located based on 'around' mode

Unresolved;

- in maya, when you select 2 or more objects, the manipulator draws on the 'active' object, also interesting
- what to do with G,R,S hotkeys? It could switch the manipulator "mode"...
- header button/menu for manipulator mode?
2005-03-17 21:31:49 +00:00
c6d5124560 Bug fix 2301
Halo render had too narrow clipping for left/right or top/bottom part of
image. Was caused by fix for 2.36, incorrect clipping for distance...
distance was OK, but the old hack should be still there for X or Y clip!
2005-03-11 18:55:09 +00:00
c78e44cdc5 big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
2005-03-09 19:45:59 +00:00
d6f6d13f3a Bug fix #2292
Bumpmaps for skin on Env's dinosaurs appeared to be less nice in 2.36. This
was caused by the bugfix to make bumpmapping correct for rotations, which
should only work for flat/cube mapping. It also rotated it for sphere/tube
though, which gives less interesting bumps.

So; now the correction is skipped for tube/sphere mapping bumping.
2005-03-07 12:41:23 +00:00
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
b8aa04ed62 Modified the sdl stuff so it is similar to the way the soundsystem does it.
Was causing problems for people.

Kent
2005-02-22 17:15:43 +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
66a516dc93 Some weird CVS $id tag line got added on wrong place...? 2004-12-27 20:02:27 +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