Commit Graph

516 Commits

Author SHA1 Message Date
bdec277cc6 This is the famous proverbal example of someone trying to get a 4 legged
table stable... you keep correcting leg sizes until no table is left
anymore! :)

This commit restores the displacement direction from 2.37a code, which was
negated 5 months ago to fix a change in renderconverter.c, but somehow is
not needed anymore. The regression displacement file now renders OK again.
2005-11-11 10:14:27 +00:00
2439c1df7c Bug #3298
Unified render does not return a zbuffer, but when gauss render was used
in combination with motion-blur, a buffer was accidentally created, one
pixel to small even!
2005-11-03 20:35:49 +00:00
d21d255389 fix for bug #3193, winmat was not calculated properly because of
some previously uninitialized parameters.
2005-10-25 09:30:54 +00:00
4bb748d972 Bugfix #3163
Materials; using "Stencil" option, didn't work properly for multiply, and
other related filters. This is a very old issue, but now I found the good
way to fix it! :)
2005-10-11 20:47:45 +00:00
45edb9cecb IpoWindow, Action curve update.
When no Ipo existed yet for an Action Channel (Bone), you could not add
curves with CTRL+click or Drivers. This was due to antique action code
state... it's still messy, no time for big cleanup here yet. At least
this works now. :)

(Also: removed test prints of previous commit)
2005-10-03 13:03:25 +00:00
1c72a19fd8 Bugfix #3133
- Rendering an image with Border didn't check for sizes smaller than 1
  pixel yet.

Related to this code I found 2 other fixes:

- Themecolor set for drawing in Render Window was not restored correctly,
  sometimes causing into wrong Panel (transparency) drawing.

- When rendering an image with Gauss, it now renders by default 1 pixel
  extra, which gets stripped. This eliminates the "ugly" darker border
  in images.
  (Yes, let's make Mr. PixelCounter Goralczyk happy! :)
2005-10-03 10:10:19 +00:00
015fe7ea81 Version 1.0 of IpoDrivers.
First note that this is new functionality, unfinished, and only for
testing and feedback purposes. I'll list below what works, and what will
need work still.

This text is also in cms: http://www.blender.org/cms/Ipo_Drivers.680.0.html

An IpoDriver is like an IpoCurve, but instead of a Bezier curve, it allows
to connect a property of other Objects as input for the "channel". For
example, IpoDrivers can be used to have a Shape Key being "driven" by
the rotation of a Bone. Or the RGB colors of a Material get driven by the
XYZ location of an Object.

Editing of Drivers happens in the IpoWindow. Here you can notice that the
channels (right hand window) now have an "active" channel indicator.
To add a Driver, you have to use the "Transform Properties" Panel (Nkey).
Here you can add or remove a Driver to the active channel, and use the
buttons to fill in what kind of relationship you want to establish.

Driver Objects

Note that any Ipo Channel can become driven now, but that only Object
transformation or Pose Bone transformation can be used to become a
Driver now.
At this moment, only the local transformation is taken into account.
For Objects that means the location/rotation/scale value without Parent
transform (as shown in "Transform Properties" Panel for Objects).
For Pose Bones it means that only the Pose transform (changes of rest
position) is Driver information (also as shown in Transform Property
Panel in Pose Mode).

Mapping of Drivers

When an Ipo Channel is "driven", the mapping is by default one-to-one.
It is only restricted by already built-in limits for Channels, like
for Material the "R" value can only range from 0.0 to 1.0.

Also note that when mapping rotations, the actual rotation values
in Ipos are scaled down with a factor 10.0. (180 degrees actually has
in the Ipo system a value of 18.0). This is an ancient year zero
convention in Blender... it is a bit hidden, because the ruler
(vertical as well as horizontal) displays the virtual values correctly.
Only the Properties panel shows the actual value.

When you draw an IpoCurve in a Driven channel, this curve will define
the mapping between the Driver output (horizontal) and Driven input
(vertical, as usual).
A nice new option to use is "Insert one-to-one curve" (press I-key,
or in pulldown menu). This will also zoom the display in exactly to
fill the window, allowing easy edit. If you use this option with
degrees, it will map 180 degree rotation to a range of 1.0 unit.

Live updates

Since the Drivers are integrated in the Ipo system, they will always
be updated whenever an Ipo is evaluated. This happens at least on
frame changes.
For interactive feedback, updates while transforming objects were
added in these cases:

- Driven Object Ipos, by other Objects or Pose Bones
- Driven Shape Key Ipos, by other Objects or Pose Bones

You can also insert Drivers on Action Ipos, but these are only evaluated
on frame change now.

Todo

- Drivers can also get a text button, allowing a 1 line Python script
  to be executed.
- Make UI for it a bit less hidden... maybe with visualization in 3D?
- Allowing global transform coordinates as Driver too.

Issues

- renaming Bones won't rename drivers
- (file) appending the Ipo won't append the linked driver Objects
2005-10-02 20:51:35 +00:00
7beb234b92 - Added shadow buffer support for wire material and particle strands
(Since strands are screen-aligned, it didn't fill in OK yet)

No shadow;
http://www.blender.org/bf/rt14.jpg
Shadow;
http://www.blender.org/bf/rt15.jpg
2005-09-29 19:33:50 +00:00
03e1ec988b - Added "anisotropic" rendering for static particle hair strands.
This means the diffuse and specular shaders don't use the normal
  for hair (which is actually undefined, a hair is micro cylinder) but
  it uses the tangent vector (vector in direction of hair).

For Diffuse, it computes a fake normal now, representing the optimal
hair normal pointing towards the light. All current builtin shaders
work with this, including ramps.

For Specular, it uses another formula to remap dot products for all
lines that now use the tangent vector instead of the normal:

dot = vector * tangent
dot = sqrt(1.0 - dot*dot)

Gives better results than using the 'fake' normal for diffuse. Officially
(according the papers) this could be used for diffuse too, but then hair
becomes very flat. Now you can control the flatness easily with ramps or
using Oren-Nayer for example.

Example image (disappears in some weeks)
http://www.blender.org/bf/rt9.jpg

- Added new texture channel "Strand" to apply textures on hairs over the
  length of hair (1 dimensional). Orco now gives 1 fixed coordinate for
  the entire hair, based on where it starts.
  Note; UV doesn't work yet. Nor vertexcolor.

http://www.blender.org/bf/rt10.jpg
2005-09-29 13:19:07 +00:00
ed674ba6f9 Added 'Radial' blend texture type for created colored radial gradients
like that you might find on a CD. Special thanks to use Phlip in
#blenderchat for help on the math. Thanks Philp!
2005-09-19 13:00:44 +00:00
bf0ef10179 Bugfix #2971
Alpha error in unified render, causing mist and non-ztransp alpha and 'env'
materials not to render correct.
2005-09-19 07:53:08 +00:00
8d940dfafe Random() issues with rendering...
- AO and soft shadow AreaLight tables were generated without fixed seed,
  causing animations to give unwanted amounts of noise.
- Made sure these tables now are calculated before render, with fixed seed
- Then found out the BLI_rand() has very bad seeding... it showed up as
  patterns. After some experimenting, found a nice method using noise.c
  hash tables. For compatibility with old code, named it BLI_srandom() to
  use this next to the BLI_srand(). This follows libc rand() and random()
  naming convention.
- Then of course threading should work... so made a BLI_thread_rand version
  of the calls. Now supports up to 16 threads, comments added in .h and .c

Result is stable animation render with AO and soft shadow. But, please
test and feedback!
2005-08-25 13:11:04 +00:00
bb377c72cd Lamp-halo & Ortho didn't render correct. Thanks Desoto! :) 2005-08-14 20:50:02 +00:00
6784198d23 Bugfix #2943
Render bug.
Alpha low or zero, Ztransp, didnt render with lamp halos over...
Note it still doesnt work for ray-transp!
2005-08-14 19:26:58 +00:00
0d35e38938 Very small size of arealights (0.001) could cause weird overflows/bands.
There was still one float component hanging around... saacos(). Made a
double version of it.

Reported by Shul. thnx!
2005-08-12 20:27:18 +00:00
cd6cbda7db Bug fix #2870
Wire material doesn't work with raytrace, but the wire faces were still
trace-able, giving weird results.
Now the wire faces are excluded from the octree.
2005-07-27 18:53:59 +00:00
Alexander Ewering
851d4016f8 Reverted to good line endings 2005-07-16 22:02:59 +00:00
2d73b31aff preparation for bullet physics 2005-07-16 21:47:54 +00:00
ed8d745e0f Armatures now draw bone names over solid.
(commit of initrender.c is just an added comment)
2005-07-14 17:23:26 +00:00
8301d7ad00 Bug fix #2762
Quite harmless, but was lazy code...
When you choosed "Vertex Color Paint" material, the init_render_material()
also set the "Vertex color Light" option, because that flag was checked on
during render to detect vertex colors.
Now it has proper checks in render code.
2005-07-11 11:01:06 +00:00
11a8714e54 Cleaned up the old call to do_all_actions(). It only is supposed to do
a single object, but was still called outside of that scope. Caused crashes
for example when editing Ipo curves of action keys.

editaction.c and editnla.c still need to be tackled...
2005-07-11 08:04:34 +00:00
9fa952f9a5 Bugfix #2803
Transparent shadow could accidentally intersect first with a face being
farther away, due to the fact larger faces can fill up multiple octree
nodes. Had to use the same exception handling as for raytracing mirror or
glass.
2005-07-10 08:55:14 +00:00
ef4bc76dc7 - add missing includes for lazy programmers who don't read error msgs 2005-07-09 18:04:53 +00:00
22a18ecdb8 3D view orbit option: Around Active
This fixes the active object in place when orbiting the view.
	Choppy 15fps demo can be seen there: http://www.elysiun.com/~theeth/bf/around_active.html


Image Memory Grabage Collection
	This adds memory handling to the image code. An image is tagged each time it is used.
	During a collection cycle (frequency of cycles is user defined), if an image is older
	than a user defined limit, its buffer gets deallocated. This also applies to gl memory buffers.
	Images that are loading in GL memory needs to go through two time outs before being fully deallocated: the first time out deallocated the gl memorry, the second the buffer in ram.

	Notes:
		Image buffer loaded from python gets tagged as permanent upon load. That tag is removed when python stops using the image.
		I might have missed some tagging spots, especially in the rendering pipeline. Someone with more knowledge about this code should check to be careful.
		Tagging is done on every access, for rendering, this will probably be a performance hit. A scheme should be developped to only tag when the rendering is completed.
		Collecting is called in draw_object, most likely not the best place to do it.
		Safe from undo, since using undo deallocates memory anyway (like when loading a blend file with one currently opened)


Userpref DNA changes:
	I've changed a couple of flagging variables from short to int. Some because they needed more space, others to keep SDNA happy.


Info window changes:
	I've grouped a couple of buttons in aligned blocks and changed the color of mutually exclusive options to make them clearer.
	Matt didn't do any changes on that in tuhopuu, so hopefully I'm not stepping on anyone's feet with this.


Also changed double constants into floats with f in a couple of places (mostly space.c) to make compiler happier.
2005-07-06 00:33:41 +00:00
28a1e8277b Result of 2 weeks of quiet coding work in Greece :)
Aim was to get a total refresh of the animation system. This
is needed because;
- we need to upgrade it with 21st century features
- current code is spaghetti/hack combo, and hides good design
- it should become lag-free with using dependency graphs

A full log, with complete code API/structure/design explanation
will follow, that's a load of work... so here below the list with
hot changes;

- The entire object update system (matrices, geometry) is now
  centralized. Calls to where_is_object and makeDispList are
  forbidden, instead we tag objects 'changed' and let the
  depgraph code sort it out
- Removed all old "Ika" code
- Depgraph is aware of all relationships, including meta balls,
  constraints, bevelcurve, and so on.
- Made depgraph aware of relation types and layers, to do smart
  flushing of 'changed' events. Nothing gets calculated too often!
- Transform uses depgraph to detect changes
- On frame-advance, depgraph flushes animated changes

Armatures;

Almost all armature related code has been fully built from scratch.
It now reveils the original design much better, with a very clean
implementation, lag free without even calculating each Bone more than
once. Result is quite a speedup yes!

Important to note is;

1) Armature is data containing the 'rest position'
2) Pose is the changes of rest position, and always on object level.
   That way more Objects can use same Pose. Also constraints are in Pose
3) Actions only contain the Ipos to change values in Poses.

- Bones draw unrotated now
- Drawing bones speedup enormously (10-20 times)
- Bone selecting in EditMode, selection state is saved for PoseMode,
  and vice-versa
- Undo in editmode
- Bone renaming does vertexgroups, constraints, posechannels, actions,
  for all users of Armature in entire file
- Added Bone renaming in NKey panel
- Nkey PoseMode shows eulers now
- EditMode and PoseMode now have 'active' bone too (last clicked)
- Parenting in EditMode' CTRL+P, ALT+P, with nice options!
- Pose is added in Outliner now, with showing that constraints are in
  the Pose, not Armature
- Disconnected IK solving from constraints. It's a separate phase now,
  on top of the full Pose calculations
- Pose itself has a dependency graph too, so evaluation order is lag free.

TODO NOW;

- Rotating in Posemode has incorrect inverse transform (Martin will fix)
- Python Bone/Armature/Pose API disabled... needs full recode too
  (wait for my doc!)
- Game engine will need upgrade too
- Depgraph code needs revision, cleanup, can be much faster!
  (But, compliments for Jean-Luc, it works like a charm!)
- IK changed, it now doesnt use previous position to advance to next
  position anymore. That system looks nice (no flips) but is not well
  suited for NLA and background render.

TODO LATER;

We now can do loadsa new nifty features as well; like:

- Kill PoseMode (can be option for armatures itself)
- Make B-Bones (Bezier, Bspline, like for spines)
- Move all silly button level edit to 3d window (like CTRL+I = add
  IK)
- Much better & informative drawing
- Fix action/nla editors
- Put all ipos in Actions (object, mesh key, lamp color)
- Add hooks
- Null bones
- Much more advanced constraints...


Bugfixes;

- OGL render (view3d header) had wrong first frame on anim render
- Ipo 'recording' mode had wrong playback speed
- Vertex-key mode now sticks to show 'active key', until frame change

-Ton-
2005-07-03 17:35:38 +00:00
5fac7965c2 Bug #2751
Recurring issue, but also bug in 2.37/37a: OSA sample amount versus AO
sample amount conflict... if AO and OSA amounts were exact equal it gives
black spots. Solution not optimal yet... but at least looks good.
Still think it's useless to sample fewer than AO level 8 (64), but
nevertheless. :)
2005-06-16 21:56:49 +00:00
cc69a09969 Bug fix #2723
When a scene had "do sequence" set, the OpenGL preview render option
crashed... it shouldn't do the sequencer anyway then. Old bug.
2005-06-09 11:02:06 +00:00
5e0aa9b1ec Bug fix #2719
Ortho render didn't correct texture/shadow coordinates for subpixel
position. Caused small errors where faces intersect each other.

Also found texture subpixel error in unified (using jitter table not
correctly). This also caused errors with z value comparing.
2005-06-08 12:51:03 +00:00
ae77736c30 Small tweak in Ward-Iso specular. It didn't work correctly on backfacing
light. Thanks Alfredo! :)

Report #2711
2005-06-08 08:13:33 +00:00
f38e0686d9 new round of warning fixes. we are now down to 24 with Xcode on blender
alone with the following flags :
-Wall -Wno-char-subscripts -Wno-missing-braces.

the only one still worrying me is in rand.c line 57 :

rand.c:57: integer constant is too large for "long" type

but i have no clue about how correct cross-compiler and 32/64 bits friendly

see also my mail to commiter list for signed/unsigned issues
2005-06-04 16:22:50 +00:00
0f82931e5f Added threadsafe patch from Martin.
Now envmaps of type "Load" should not give errors. I assume Martin tested!
2005-06-03 18:44:01 +00:00
3d6a159b0b Bug fix #2651
Area light soft shadow now renders transparant shadow as well.
ALso: found error in correct threadsafe use of soft shadow tables. Caused
dither/noise not to look as well as it could.
2005-06-03 17:04:26 +00:00
0493e77fa4 Using render option "Crop" with OpenGL render (button in 3d header)
caused a struct Part to be allocated and not freed.
2005-06-03 08:37:04 +00:00
e0bc635743 Bugfix #2648
Thread render with  using Area lights was not fully thread safe yet. I
thought I had a smart method to trick threads, but apparently it can best
(and only) be done with Mutexes...
2005-06-02 09:53:53 +00:00
c7b19d5066 Bug fix #2640
Somehow displacement got negated in my commit of april 12. Regression file
showed it, thanks efbie for finding it! :)
2005-05-29 10:44:52 +00:00
cf8d9fbb10 Added some backward compatibility with old yafray blendershader. Because of missing
parameters the material preset menu won't be as useful. Both glass presets will look the same
because there is no 'filter' parameter in the old yafray for instance.
So using the new Blender version with an old yafray version should work a bit better,
though the other way around, using the new yafray with an old blender version, will generally
not work as well.

I added a few extra things. In 'yafray' panel re-arranged some buttons, and added a new
button 'Clamp RGB'. This button will be enabled by default and helps to improve AA on
high contrast edges in the image. When using bokeh however, it is best to switch this off,
otherwise lens shaped highlights will be quite a bit less visible.

Changed the 'extinction' parameter name to the probably more correct term 'absorption',
though mathematically it works out the same. Also changed the behaviour of this color,
it no longer specifies a color that will be removed as I wrote in the previous commit,
but instead the actual color at one (blender) unit of distance. The 'Ds' (distance scale)
button below the color sliders controls the scaling of this unit distance.
What this means is that if you take the standard blender cube, which covers two units of
distance by default, setting the distance scale button to 2.0 will make sure that the color
you specified is exactly that color at that distance (provided the base color itself is white
of course, or 'filter' is 0, otherwise it will be filtered by the base color too).
Beyond this distance the color will get darker.

The glow option for point/soft/sphere lights has a new parameter 'GloOfs', or glow offset.
Setting this to a higher value then 0 will soften the central peak of the glow.

Another unreported bug fix: For xml export, when yafray failed to render the xml file
for some unknown reason, or because of other problems, the export code would still load
the previously rendered image, this causes problems however if the image resolution is
not the same as the current Blender buffer, and so could cause memory corruption or crashes.
This is now taken into account.

World image backgrounds now use the blender mapping settings as well, but only the
'AngMap', 'Sphere' and 'Tube' settings. But in yafray those last two, unlike Blender, cover
the whole view, not just the upper half, so is not really fully compatible with yafray.
So now you have to set one of these buttons too when loading a hdr lightprobe image.
btw, something I forgot to mention in previous commits is that the exposure control using
the texture brightness slider is no longer restricted to integer values. It is now a
floating point value, so you're not restricted to the 0 1 and 2 slider positions anymore,
anything in between will work too.

And finally, display updating is now more like Blender, using the mouse cursor as frame
counter for animation, etc.
2005-05-27 17:52:53 +00:00
f5435d924b When backbuf doesn't exist, it crashed during render... Fixed! 2005-05-27 13:28:26 +00:00
e975b78a4f Found float-related numerical instability with vertices lying EXACT on
the edge of an image. It should not be clipped, but comparisions with
floats then can go wrong... here the FLT_EPSILON is to the rescue.

/* smallest such that 1.0+FLT_EPSILON != 1.0 */
#define FLT_EPSILON 1.19209290e-07F

(Bug fix #2610)
2005-05-24 17:36:20 +00:00
ec45bfc5b1 Second and final commit for this version of the yafray export code (probably, you never know
of course...)

Not quite complete, but due to lack of time as good as it will get for now.

From the previous commit, forgot to report that basic fog is supported as well. Though because I had not much time to complete the code, it is sort of unfinished, and you will have
to tweak parameters specifically for yafray again. It uses only the world horizon color, and
only uses the Blender mist distance setting.

Textures now support checker clip mode.

Fixed possibly all 'duplilist non-empty' errors, though it could hide the real cause of the
error.

AA is no longer enabled automatically for certain GI quality settings, I thought it best to
leave it to the user to decide.

SkyDome GI mode now supports cache as well. There is a new option in the GI quality menu 'Use
Blender AO settings', which will as it says use the most important AO settings for the
skydome parameters. The only AO parameters used are 'Samples', 'Dist' and the random sampling
switch, which unlike in Blender you might want to use more often, since the QMC sampling used
in yafray can result in visible patterns or a dithering type look. 'Random' is not completely
random in yafray however, it is actually jittered (stratified) sampling.
Using an occlusion cache, doesn't necessarily mean that you will always get much shorter
render times. As with 'full' GI and cache, one problem is bumpmaps, when using bump (or
normal) maps, the sampling will be much more dense, using lots more rendertime.
As a temporary fix there is a button 'NoBump', but this also has the side effect that in
areas of total indirect light (or when used with SkyDome cache) no bumpmapping will be
visible. It is therefor best used with some direct light as well.
For SkyDome with cache, and strong bumpmapping it might actually not make much difference,
since for low distance values you can usually get away with low sample values as well.

The entire material panel is now replaced by another panel to show only the parameters
important to yafray and add some new ones as well.

Since lots of users (especially yafray beginners) have had problems getting certain material
aspects right, there is now a material preset menu available to hopefully solve some of the
most common "How do I do this? It doesn't work!" questions seen in various forums.
Choosing an option from this menu will set the required parameters to default
values for yafray, and you can work your way from there to tweak it something you want.

Most buttons are copies of the same Blender parameters, with some variations. Just like
Blender 'Ray Mirror' enables reflection, 'Ray Transp' enables refraction. You can use
'ZTransp' for materials that have texture maps with alpha channels.
Again, same as Blender 'rayMir' sets the amount of reflection. Next button 'frsOfs' however
controls fresnel offset, meaning that when this is set to 1, you will get no fresnel effect
and when set to 5, reflection is totally determined by fresnel, which is important for
realistic glass/metals/etc.
IOR is self-explanatory (...), same as Blender.
When you have 'Ray Transp' enabled, the blender 'filter' button will appear next to the IOR
button. This has the same effect as in Blender.

Below that there are some new parameters, 'Ext.Color' sets the extinction color for
transparent materials. Usually, in real transparent materials, light loses some of it's
energy the further it has to travel through the object. This effect can be simulated with
this parameter. Thing to look out for is that it specifies the color which will be
REMOVED after traveling through the object. What this means is that say you have a clear
white glass sphere, and set the extinction color to a strong blue, the result will be a
very yellow object when rendered.

Next to the color sliders, there is another set of three parameters, with which you can
enable color dispersion for transparent objects. 'Pwr' sets the amount of dispersion,
the higher, the more dispersion (the more colorful the result).
(For real world materials, this number can be found or derived from data in various glass catalogues)
The 'Samples' button below that sets the number of samples used, minimum values are around
7-10, and for very strong dispersion you might need a lot more.
As usual, this also means an increase in render time of course, but to simulate
realistic materials, you shouldn't really need more than 25 samples.
In addition to that, when using low sample numbers, but to still get a good spread of colors,
you can enable the jitter button, but this will also add noise.

Point/soft(point with shadowbuffer) or sphere lights (light with radius), have a new option
to add a simple glow effect, so that lights can be made visible.
NOTE: just like spotlight halo's, glow is not visible against the background, there must be
another object behind it. Simplest solution is to use a large black shadeless plane behind
your scene.
The glow intensity can be set with the 'GlowInt' parameter (use very low values around 0.01
even lower), and you can choose from two different types with the 'GlowType' button (which
don't look much different, but type 1 is probably better, type 0 faster).

And that's it, with apologies for the still missing features and
full support in general, but this will have to do for now.
2005-05-22 22:46:17 +00:00
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