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.
This was enforced in a commit 5 months ago, for proper redraws while
working in sequencer itself (with scene strips)
Found by Ztonzy, explained by Jesterking. Thanks! :)
Aye... OpenGL cannot draw concave (C shaped) polygons... that screws up the
Lasso tool, when it uses backbuffer selection.
Examined for little while the GLU Tesselation library, but apart from its
nightmarish structure, it's even stupid (no builtin clock/counterclock).
So, instead coded a DispList based function using Blender's edgefill.
Works like a charm! :)
Darn #$%#$# code cleanup in NaN days screwed up recursive feature of
linking dynamically data among Blender files. It now only supported 1
'deep'.
Now you can link data from file1 via file2 into a file3, etc. Nasty code,
but supposed to work :)
Typo in bspline interpolation code... a '1' should be '2', causing the
fourth key of interpolation always be equal to third.
Only shows error with larger key steps, like 5 frames or more. Nice it
was found before release!
openEXR testing only. It broke sequence plugins...
Note: adding variables in end of Imbuf struct at least doesn't crash old
sequence plugins immediately. :)
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)
Code provided by Matthew Plough. Verified to run OK in OSX, Windows.
Solves bug #2598, which crashed blender on using non-manifold meshes with
decimator.
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.
objects with circular dependancies where not handled correctly
when sorting bases.
the fix is actually a workaround only and may evolve later
also add changes to xcode project for recent commits
Totally updated blender shader in yafray, hopefully better matches blender
results. Though ramps are now partially supported, they cannot work in all
cases properly in yafray, and in fact are a bit useless probably as far as
yafray is concerned. In fact the 'Result' ramp input mode is not supported
at all, because it works on the total lighting result, and in a yafray
shader this is not possible since it works per light.
Also, since Blender and Yafray have totally different lighting models,
the 'Energy' ramp input mode also won't generally give the same results
as in Blender, since it works with light energy and in yafray this is
different from Blender. Even worse, the only ramp shader that will work
properly when used with GI is the 'Normal' ramp input mode.
As contradictory as this might seem, at various stages of the GI process,
lighting is not known, so properly getting light (ramp 'energy' mode)
or shader information (ramp 'shader' mode, which depends on lighting)
is not possible. Which all means that when the ramp is in 'energy' or
'shader' mode and using it with GI enabled, yafray can only 'see' the
underlying material color, not the ramps, which results in a mix of the
ramp colors (from direct light) with the material color (from indirect light).
There is currently nothing that can be done about that.
The supported texture mapping modes now includes raymir as well, transparency
as far as texturing is concerned now works similar to Blender, with the
exception that you still have to set alpha to a low value to get any
transparency effect at all in yafray. So the Blender 'filter' parameter
now also will affect yafray.
All texture blending modes are now supported (same for ramps).
'Translu' and 'Amb' texture modulation are not supported.
Texture interpolation can be switched off ('InterPol' switch in blender
image texture button section).
All Blender brdf models (aka 'shaders' for the Blender users) are now supported,
and again, you won't necessarily get the same results as in Blender.
The reason for that is partially of course the lighting differences, but also,
not all Blender 'shader' implementations are actually correct, and copying
those errors just for the sake of matching Blender results doesn't really
seem like a good idea...
Though this really is only the case for WardIso, less so for Minnaert and
Blinn, which in yafray are more or less (but not totally) a copy of
the Blender code.
In any case, in practice those differences might not be
too noticable at all (I hope).
Continue to the next part...
----------------------------------
Here's my changelog:
-fixed Rand() so that it doesn't seed everytime and should generate better random numbers
- changed a few error return types to something more appropriate
- clean up of uninitialized variables & removal of unneccessary objects
- NMesh returns wrapped vectors now
- World returns wrapped matrices now
- Object.getEuler() and Object.getBoundingBox() return Wrapped data when data is present
- Object.getMatrix() returns wrapped data if it's worldspace, 'localspace' returns a new matrix
- Vector, Euler, Mat, Quat, call all now internally wrap object without destroying internal datablocks
- Removed memory allocation (unneeded) from all methods
- Vector's resize methods are only applicable to new vectors not wrapped data.
- Matrix(), Quat(), Euler(), Vector() now accepts ANY sequence list, including tuples, list, or a self object to copy - matrices accept multiple sequences
- Fixed Slerp() so that it now works correctly values are clamped between 0 and 1
- Euler.rotate does internal rotation now
- Slice assignment now works better for all types
- Vector * Vector and Quat * Quat are defined and return the DOT product
- Mat * Vec and Vec * Mat are defined now
- Moved #includes to .c file from headers. Also fixed prototypes in mathutils
- Added new helper functions for incref'ing to genutils
- Major cleanup of header files includes - include Mathutils.h for access to math types
- matrix.toQuat() and .toEuler() now fixed take appropriate matrix sizes
- Matrix() with no parameters now returns an identity matrix by default not a zero matrix
- printf() now prints with 6 digits instead of 4
- printf() now prints output with object descriptor
- Matrices now support [x][y] assignment (e.g. matrix[x][y] = 5.4)
- Matrix[index] = value now expectes a sequence not an integer. This will now set a ROW of the matrix through a sequence. index cannot go above the row size of the matrix.
- slice operations on matrices work with sequences now (rows of the matrix) example: mymatrix[0:2] returns a list of 2 wrapped vectors with access to the matrix data.
- slice assignment will no longer modify the data if the assignment operation fails
- fixed error in matrix * scalar multiplication
- euler.toMatrix(), toQuat() no longer causes "creep" from repeated use
- Wrapped data will generate wrapped objects when toEuler(), toQuat(), toMatrix() is used
- Quats can be created with angle/axis, axis/angle
- 4x4 matrices can be multiplied by 3D vectors (by popular demand :))
- vec *quat / quat * vec is now defined
- vec.magnitude alias for vec.length
- all self, internal methods return a pointer to self now so you can do print vector.internalmethod() or vector.internalmethod().nextmethod() (no more print matrix.inverse() returning 'none')
- these methods have been deprecated (still functioning but suggested to use the corrected functionality):
* CopyVec() - replaced by Vector() functionality
* CopyMat() - replaced by Matrix() functionality
* CopyQuat() - replace by Quaternion() functionality
* CopyEuler() - replaced by Euler() functionality
* RotateEuler() - replaced by Euler.rotate() funtionality
* MatMultVec() - replaced by matrix * vector
* VecMultMat() - replaced by vector * matrix
- New struct containers references to python object data or internally allocated blender data for wrapping
* Explaination here: math structs now function as a 'simple wrapper' or a 'py_object' - data that is created on the fly will now be a 'py_object' with its memory managed by python
* otherwise if the data is returned by blender's G.main then the math object is a 'simple wrapper' and data can be accessed directly from the struct just like other python objects.
nicer, but be aware that these locations are 'virtual', derived from
the actual Mesh Cage vertices you don't see.
Normal transform (and actual transform with Manipulators) remains on
the original vertices, which also shows with dashed line towards pivot
on scale/rotate.
1:
* when a blendfile gets loaded, paths are corrected with OS specific slashes (see blender.c)
* made available BLI_char_switch(char *string, char from, char to)
* made available BLI_clean(char *string);. This function should be called whenever you're doing path stuff, so paths are correctly saved, and thus avoiding other path functions stopping to work
2:
* relative paths work now in sequencer too (due to slash mess that didn't work all too well).
- fixed error in option "Enable Goal" which didn't work with Vertex groups
assigned
- renamed some buttons & fixed tooltips. A doc online will be there soon
Added check for audiostream_pos() - which should return current frame
corrected for audio playback - to be at least 1 frame larger than current
frame. It caused in some situations even a backwards playback!