Commit Graph

266 Commits

Author SHA1 Message Date
780412f1ae Bug fix #2577
With rendering a border, the amount of scanlines can be 'odd', which
wasn't checked for correctly on OSA thread render.
2005-05-18 10:43:08 +00:00
a1f70b516e Bugfix #2506
Sky type "Paper" didn't give proper dx/dy texture frequencey in OSA render.
Remainder of render recoding of last january.
2005-05-03 11:45:05 +00:00
8c1d95abc7 Error in combo of Spothalo + normal halo over sky, with OSA + gammacorrected
adding. :)

Missing gamma correction...
2005-05-01 17:11:48 +00:00
c812d2ac20 Two fixes in one commit.
- The ortho render recode had a weak method to calculate the Z value of the
  render coordinate (shi.co[2]). Worked OK for normal render, but not in
  unified, giving big errors in Ortho Unfied render.
  Solved with proper math, using face equation a*x+b*y+c*y=d. Dunno why I
  didn't do it in first place. :)

- Bug fix #2493. Edge render gave much different result for Ortho. This
  was due to overflows in the integer math filtering zbuffer values.
  Cleaned it op properly, preventing any integer overflow now.
2005-04-29 08:18:41 +00:00
d7d58accda Fix for reported (thanks Jens Ole!) error in rendering UV map textures.
Caused by making threadsafe envmap render...

Commit in convertblenderscene.c is just replacing constant with define.
2005-04-28 09:57:21 +00:00
7811d7209a Bunch of gcc 4.0 warning fixes.
source/creator/creator.c
	changed ifdef's around fpe_handler to match when its actually used.

intern/SoundSystem/intern/SND_AudioDevice.cpp
	Changed: SND_SoundObject* oldobject = oldobject = pIdObject->GetSoundObject();
	to: SND_SoundObject* oldobject = pIdObject->GetSoundObject();

intern/SoundSystem/openal/SND_OpenALDevice.cpp
	removed unused var.

source/blender/blenkernel/intern/mball.c
	initalized a couple of vars that might have been used uninitalized.

The rest were changing types to match, most of them were something like
was short * should have been unsigned short *.

Kent
2005-04-27 11:52:50 +00:00
b16d6e005d Fix #2472 for rotate edges. Somewhere along the line edge h flags were being wiped out. This addition now saves those flags and restores them 2005-04-25 20:42:50 +00:00
28ebc6fede Small fix for envmap rendering + threads... not sure if it fixes linux and
windows for it... will be tested!

Fix was that the envmap cube side images (6) were stored in tex->ima, which
is shared data by other thread.
2005-04-25 20:36:17 +00:00
7a4ae00da2 Replaced powf to (float)pow in zblur.c. Was giving problems with MSVC (the rest of the code base uses pow too).
MSVC 6.0 Projectfile changes for zblur and new files in ketsji.

Also adding BL_src projectfile to the commit, apparently it's not up to date with transform_conversions.c but I have it ok here and don't get any diffs.
2005-04-23 22:45:34 +00:00
7fa7826da7 The zblur plugin (aka as DoF) integrated in render. Compared to patch
submitted by Alexander, changes/improvements are:

- Moved to new Panel in Scene buttons "Post Effects". Together with other
  postprocessing options, such as Edge render. It is also not called DoF,
  this because that's a bit pretending too much then. It's a zblur still!
- Made it render Alpha as well
- Made it use and deliver float buffers
- Huge cleanup of zblur.c code, was very messy. It was alling things in render
  code without need even (win matrices, transform faces, etc)
- Fixed errors in using Z values (zbuffer is signed int)
- Removed very weird gamma corrections for front/back half
- Tweaked gaussian table, allow variable 'Sigma' to be set for gauss curve
- Didn't copy 'auto focus' yet. Use of this is very limited, and gives
  false expectations, nor works for rendering anims with deamons well.

Main issue remains: it's not a very advanced feature... I still doubt
very much if this deserves to be released. Spent 2 days on trying to get
the key issues solved, with not much results.

- gauss filter code has weird side effects on large blur size
- having unsharp (blurred) in front also blurs what's around in back.
  only blurred in back with sharp in front works a little bit
- severe aliasing errors... also due the code splitting in 2 halves
- doesnt work with unified yet
- won't work for halos, spot halos or transparant faces

Anyhoo... It was promised to be committed, so now artists can play with it.
Who knows it's useful after all, or some fixes can be implemented. :)
2005-04-23 20:49:23 +00:00
99ee891596 Fixed several annoyances with halo render + unified render (bug 1989+2382)
- Maximum faces/halos per pixel was 500, which wasn't correctly applied in
  all cases, causing errors in AA
- Moved maximum up to 1000 now
- made halos become clipped away from filling in buffers when behind a
  solid face. That saves a lot of rendertime!

Unified remains weak with halos...
2005-04-18 19:36:34 +00:00
35f4c77d96 Little cleanup of eerie unified code for halos. Still got no clue what
was original idea of this implementation...
At least it's protected from crashing a bit more.
2005-04-18 15:30:49 +00:00
425f295604 Patch submitted by Jorge Bernal (lordloki) and Jonathan Merritt.
This will add Minneart diffuse and WardIso specular to our shader menu.
Minneart gives nice control over darkness/brightness areas, the wardIso
over 'plastic' style sharp or fuzzy specular.

Webpage is being made with nice samples. Will be in release log.

Jorge: one change is in the do_versions, you inserted it on wrong location.
2005-04-17 17:43:07 +00:00
5f237e67cc Bug fix #2323
The addition in 2.36 to correct bumpmapping for View and Object rotation,
made many nice bumpmap setups in older files less nice. Especially apparent
when you apply "flipped" mappings in "Map Input" Panel, like map the X to Z
and the Z to X. A correction then gives wrong results.

Since the "correct bumpmapping" is actually a new option, causing extra
rendertime too, I've made it an option now. With the "Map To" Panel being
fully used, I've put the new button option (temporally I hope) in the first
"Texture" Panel in material context.

Will be updated in release log page!
2005-04-12 11:45:06 +00:00
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
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
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