Commit Graph

42 Commits

Author SHA1 Message Date
8be210bd7e Quick fix for bug #2393 (same as #2218), deformed meshes were not transformed
correctly anymore because of changes in other blender code.
2005-04-11 23:23:25 +00:00
0542e1ebe3 - part of BLI_winstuff.h cleanup 2005-03-19 20:19:10 +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
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
198ce177a3 Added support for normalmaps. 2004-12-07 05:31:17 +00:00
263479dfba Added support for the extra texture channels. 2004-12-05 03:51:01 +00:00
e80206e65f Added nearly full support for Blender's procedural textures, with the exception
of 'envmap', 'magic', and 'plugin' modes.
The stucci texture also is not exact match, since it cannot be fully
emulated in yafray because of implementation issues. It will work best
for low turbulence values (which is actually not taken into account
in the export code).
Also, since Blender's static noise is basically just direct random number
output, don't expect the exact same result when rendered in yafray, but in this
case that probably shouldn't be that much of a problem...
(needs yafray from cvs)

(btw, on a side note, I put this in the comments once when working on the noise
stuff for Blender, but noise is affected by the 'depth' parameter, and there
is no way to control this directly from the GUI, can only be done by temporarily
switching to 'clouds' for instance.)
2004-11-28 02:13:57 +00:00
88b556fd57 Possibly related to bug #1851:
orco coordinates were assumed to be valid when pointers were non-null,
this seems to have been a wrong assumption, pointers were probably unitialized
(but only for some objects like surfaces?), so when the export code tried to
access them, it crashed.
Now the rendermaterial texco flag is tested instead, which probably is how
it should have been done in the first place...
2004-11-23 06:10:03 +00:00
53d58505c5 Material TexFace mode support was still not quite correct, didn't work for
objects that used faces having same image but not the same material.
2004-11-18 01:50:09 +00:00
a61677f37f Minor modification of image texture export of 'TexFace' mode materials
which could have become a possible problem in the future.
Refinement button alignement in GI panel.
2004-11-14 04:30:28 +00:00
459deaf11f Fixed:
Texture matrix bug in plugin code reported by Mel_Q.
Vertex colors, this was basically the same as the previous uv coord
splitting bug, for xml export, uv coord splitting was actually not quite
complete either (reported by richie).

Added:
Camera Ipo curves for DoF aperture and focal distance.

Aspect ratio set with AspX & AspY are now taken into account as well.
(needs yafray from cvs)

Bokeh parameters for DoF (also needs yafray from cvs).
'Bokeh' controls the shape of out of focus points when rendering
with depth of field enabled.
This is mostly visible on very out of focus highlights in the image.
There are currently seven types to choose from.:
'Disk1' is the default, the same as was used before.
'Disk2' is similar, but allows you to modify the shape further with the 'bias'
parameter, see below.
Triangle/Square/Pentagon/Hexagon, in addition to the bias control, you can
offset the rotation with the 'Rotation' parameter (in degrees).
'Ring', a weird ring shaped lens, no additional controls.
The 'bias' menu controls accentuation of the shape.
Three types available, uniform, center or edge, with uniform the default.

Although based on an actual phenomenon of real camera's, the current
code is bit of a hack and not physically based, and doesn't work all that
well yet (in yafray anyway). Since this is also mostly visible in the very
out of focus parts of the image, it usually also means that you need lots
of samples to get a reasonably smooth result.
2004-11-08 03:55:44 +00:00
c245379175 Bugfixes:
Blender hemilight shadow flag now ignored (reported by varuag).
Texture axes were not exported for procedural textures.
Duplicate armatures were not handled correctly (reported by richie).
Triangle uv-coord splitting (reported by anael, richie & Alvaro).

Additions:
Material 'TexFace' mode now works too, as in Blender it functions as an extra
first texture channel, replacing the base color.

The new noise functions for procedural textures are now supported in yafray,
but is  not quite completed yet, still undergoing changes.
(needs yafray from cvs).

The 'power' button has been renamed to 'EmitPwr', since it controls background,
arealight (including lamp with radius) & material emit power.
This button can now be used with the 'SkyDome' method as well to control
background lighting.
To control indirect lighting power, a button called 'GI pwr' has been added,
only use this when really necessary, first try modifying 'EmitPwr' instead.

Removed:
The 'gradient' button. This includes the python code to set
this parameter as well.
2004-10-26 00:52:12 +00:00
7d65af235e test commit
Bugfix for anim crash with xml export and no export dir set.
Alternate relative path using blender function, but wouldn't be surprised
if it still is a problem in some cases for some (windows) users.
2004-09-20 23:59:09 +00:00
012854ae93 Fixed bug discovered by dotblend, parented empty's were mistakenly
included in the duplicate objects list.
Added support for spherelight 'dummy' mode when used with global photonmap.
It now behaves the same as arealight when used with gpm.
2004-08-11 23:32:13 +00:00
c11bb5b7ad Values for spherelight sampling were using incorrect blender lamp parameter. 2004-08-01 22:21:22 +00:00
425cfa10eb Reflection caustics did not work, fixed.
Note to users: even when you only want reflection caustics (metals/mirrors)
you have to set a IOR value higher than 1, similar to glass materials.
The higher, the brighter the caustics.

That should be it...
2004-07-29 18:51:17 +00:00
e9b0238d0c Major update, all implemented a bit in a hurry, and probably will need bugfixes at some point.
Extended the range of the depth and cdepth parameters as reqested by leope.
Bumpmapping should now be a bit more similar to the Blender render.

Added support for all remaining lightsources in yafray, tried to make use of
as much of the existing Blender parameters as possible.

Blender Lamp: added switch to enable rendering with shadowbuffer ('softlight' in yafray).
All other parameters are similar to the Blender settings, for yafray both the
bias parameter and the shadowbuffer size can be lower than equivalent Blender
settings, since the yafray buffer is floating point. Remember that 6 shadowmaps
are created in this case, so can use quite a bit of memory with large
buffer settings.
When 'ray shadow' is enabled for this lamp type, it is possible to set a light
radius to create a spherical arealight source ('spherelight' in yafray),
when this is 0, it is exported as a pointlight instead.

Blender Spot: as in Blender now supports 'halo' rendering.
Halo spots always use shadowbuffers, so when enabled the buttons for shadowmap
settings will appear. The 'ray shadow' button can still be used to disable
shadows cast onto other objects, independent of halo shadows.
One thing to remember, halo's don't work with empty backgrounds, something must
be behind the spotlight for it to be visible.

And finally, the photonlight:
probably the most confusing (as more things related to yafray), the photonlight
is not a real lightsource, it is only used as a source to shoot photons from.
Since indirect lighting is already supported (and looks better as well)
only caustics mode is supported.
So to be able to use this properly other lightsources must be used with it.
For the photonlighting to be 'correct' similar lightsettings as for the 'source'
light are needed.
Probably the best way to do this, when you are happy with the lighting setup
you have, and want to add caustics, copy the light you want to enable for
caustics (shift-D) and leave everything as is, then change the mode to
'Photon'.
To not waiste any photons, the photonlight behaves similar to the spotlight,
you can set the width of the beam with the 'angle' parameter. Make sure
that any object that needs to cast caustics is within that beam, make
the beam width as small as possible to tightly fit the object.
The following other parameters can be set:
-photons: the number of photons to shoot.
-search: the number of photons to search when rendering, the higher,
the blurrier the caustics.
-depth: the amount of photon bounces allowed, since the primary use is for
caustics, you probably best set this to the same level as the 'ray depth'
parameter.
-Blur: this controls the amount of caustics blur (in addition to the search
parameter), very low values will cause very sharp caustics, which when used
with a low photonnumber, probably lead to only some noisy specks being rendered.
-Use QMC: Use quasi monte carlo sampling, can lead to cleaner results, but also
can sometimes cause patterns.

Since the photonlight has no meaning to Blender, when using photonlights and
switching back to the internal render, the light doesn't do anything, and no
type button will be selected. The lightsource can still be selected, but unless
switching to yafray, no parameters can set.

Apologies to Anexus, I had no time to really do something with your code,
I'll still look at it later, to see if I can improve anything in my implementation.
2004-07-28 22:37:12 +00:00
4c78cc7557 Fixed camera flip bug.
Shadow lamp flags in plugin were not handled correctly.
Vertexcolors in plugin code were not exported.
Fixed a few bugs related to GIpower parameter.
2004-07-26 00:48:28 +00:00
9510c97833 cache_size yafray parameter calculation changed to sync with current
yafray cvs code. Now given in screen coords (-1,+1)x(-1,+1)
2004-07-14 10:20:56 +00:00
b64afb526a Removed some testcode from yafray_Render.cpp
Added the missing anti-aliasing pixel filter size and threshold parameters for manual AA control (disable 'Auto AA' button).
Added support for yafray raytraced depth-of-field.
Added extra panel for Camera in edit window to edit dof paramaters.
The actual focus point will be drawn as a cross when camera 'ShowLimits' is enabled, similar to the aqsis code in tuhopuu.

Note to users: raytraced DoF is very slow, for best results, the default AA parameters are not good enough, especially with higher aperture values (more blur).
So for best results, disable 'Auto AA' and set the AA parameters yourself.
It works best with multi-pass AA ('AA passes' > 1) and a reasonable 'AA samples' value, something in the range 8 - 25 or even higher.
Currently the post-process DoF is not available in yafray, alternatives are being worked on.
2004-07-13 19:22:41 +00:00
f32b8e6b7f added support for ortho camera (needs yafray from cvs)
When using xml export, yafray will now render the alpha channel as well when 'RGBA' button in blender is enabled (Plugin does this automatically).
In plugin code, fixed smooth shading bug for non-mesh objects.
Relative paths for textures are now recognized (plugin & xml).
Fixed problem with duplicate objects (plugin & xml).
Really old bug, sun position is now correct (plugin & xml).
World background now can also be a regular image texture (jpeg & tga), but for now always assumes spheremapping, which is not the same as Blender either. In yafray the texture is assumed to be a full 360 (panorama type) map.
convertBlenderScene.c cleanup, the identity transform 'hack' is removed.
THIS AFFECTS ALL EXTERNAL RENDERERS (Aqsis and others) WHICH RELY ON THE RENDERDATA OUTPUT, VERTICES AND LAMPCOORDINATES/VECTORS NOW NEED TO BE TRANSFORMED BACK TO WORLD COORDINATES. See yafray plugin/export code.
2004-07-12 03:20:31 +00:00
328f6c7c9e Added "Auto AA" toggle in Yafray Render panel defaulted to On (current functionality AA is determined by OSA and GI quality settings)
When disbaled, 2 number buttons appear to allow setting  manual AA passes and AA samples.

Johnny Matthews (guitarGeek)
2004-04-15 15:52:28 +00:00
f5d3649d17 Added Simple Image Background Exporting for Yafray
Add an image texture to the world (in any channel, the first one with an image will be used) and it will be exported as an image background
   The texture 'bright' slider is connected to the 'power' variable

If the image selected ends in hdr, it will be exported into an HDRI block.
   The texture 'bright' slider effects exposure adjust (it is slider value - 1) so a value of 1 == no expousre adjust. (this needs a better solution in a later    implementation)
2004-03-09 17:06:21 +00:00
516a0370ad Fixed problem of missing win32 drive when file selector was used to choose export path.
Fixed missing background when not rendering with GI enabled.
2004-01-30 21:47:34 +00:00
c28a1b5817 Fixed problem reported by Panagiotis Papadakos about yafray path in unix 2004-01-29 08:46:08 +00:00
8e6b1f54b1 Gi power behaviour changed so it's exported as a multiplier for the emit
component of the materials, background color, and dummy arealights. Hemi/Path
power is kept 1.0 now. Also changed the range for power to [0-100]
2004-01-27 12:41:37 +00:00
898001a2b6 As reported by Hiroshi Saito, M_1_PI apparently not recognized in VC6, removed it. 2004-01-27 06:23:33 +00:00
8273ebce0f fixed problem with ray button and shadow rendering
Blender 'sphere' mode lights in yafray should now have more similar light levels
render shadow button in Blender must now be enabled to render shadows in yafray too
some other minor shadow related corrections
2004-01-27 00:15:12 +00:00
e11754cf12 possible fix for os x problem, caused by SIGVTALRM 2004-01-26 12:15:33 +00:00
8b53b30563 arealight now can be used without global photonmap
fixed problem with spotlights not rendering
2004-01-25 20:28:46 +00:00
79884ff70b Added another control for new pathlight refinement parameter and solved
a problem with name collision betwen textures and shaders reported by kino.
2004-01-24 12:23:41 +00:00
32fa24339e Added missing headers for unix systems 2004-01-19 18:44:06 +00:00
033a16e258 Error checking in system call. 2004-01-19 18:36:53 +00:00
81d9e52e20 Search for yafray path under unix like systems (using expected paths).
Should fix OS X problems with executing yafray.
2004-01-19 15:32:16 +00:00
41144750da corrected particle object dupliverts and aramature duplivert export problems
corrected power slider increment update
2004-01-18 20:00:17 +00:00
3b1b0f3ef5 Gradient button is back and now there are controls to export bias and
raydepth to yafray. Plus some minor fixes
2004-01-15 17:01:02 +00:00
d217f86ed5 Just a bit of export values tunning. Should now work ok, with current
yafray CVS version using photons.
Last image got:
http://www.coala.uniovi.es/~jandro/noname/images/fromblender3.jpg
which you can compare with old:
http://www.coala.uniovi.es/~jandro/noname/images/causfromblender.jpg
2004-01-14 16:03:06 +00:00
4712655080 Global photons export for yafray. Square arealights, spot and point can work
as emitters. Needs latest yafray code, still not in cvs.
2004-01-13 16:51:35 +00:00
501adfba42 Yafray panel splitted in two so we can add more settings.
Also preliminar square arealight export, not usable yet, will be usefull
as soon as photon export is added.
2004-01-12 16:46:47 +00:00
d21cf447ab Fixed unresolved symbol bprogname under win32 2004-01-10 14:14:14 +00:00
b430cd167f Eeshlo's fix for the unit problem with texture paths exporting to yafray 2004-01-09 21:15:08 +00:00
5c51bd7e56 Code reorganization to allow a clean export to plugin alternative for
yafray
2004-01-08 23:12:56 +00:00