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.
121 lines
2.8 KiB
C++
121 lines
2.8 KiB
C++
#ifndef __YAFRAY_RENDER_H
|
|
#define __YAFRAY_RENDER_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "MEM_guardedalloc.h"
|
|
#include "IMB_imbuf_types.h"
|
|
|
|
#include "DNA_action_types.h"
|
|
#include "DNA_armature_types.h"
|
|
#include "DNA_camera_types.h"
|
|
#include "DNA_constraint_types.h"
|
|
#include "DNA_curve_types.h"
|
|
#include "DNA_effect_types.h"
|
|
#include "DNA_group_types.h"
|
|
#include "DNA_ika_types.h"
|
|
#include "DNA_image_types.h"
|
|
#include "DNA_key_types.h"
|
|
#include "DNA_lamp_types.h"
|
|
#include "DNA_lattice_types.h"
|
|
#include "DNA_material_types.h"
|
|
#include "DNA_meta_types.h"
|
|
#include "DNA_mesh_types.h"
|
|
#include "DNA_meshdata_types.h"
|
|
#include "DNA_object_types.h"
|
|
#include "DNA_packedFile_types.h"
|
|
#include "DNA_radio_types.h"
|
|
#include "DNA_scene_types.h"
|
|
#include "DNA_screen_types.h"
|
|
#include "DNA_sound_types.h"
|
|
#include "DNA_space_types.h"
|
|
#include "DNA_texture_types.h"
|
|
#include "DNA_userdef_types.h"
|
|
#include "DNA_vfont_types.h"
|
|
#include "DNA_view3d_types.h"
|
|
#include "DNA_world_types.h"
|
|
|
|
#include "BKE_global.h"
|
|
#include "BKE_image.h"
|
|
#include "render.h"
|
|
|
|
/* useful matrix & vector operations */
|
|
#include "MTC_matrixops.h"
|
|
#include "MTC_vectorops.h"
|
|
|
|
#include "BLI_blenlib.h"
|
|
|
|
/* need error(), so extern declare here */
|
|
extern void error (char *fmt, ...);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifdef __cplusplus
|
|
#include <iostream>
|
|
#include <iomanip>
|
|
#include <sstream>
|
|
#include <fstream>
|
|
#include <map>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class yafrayRender_t
|
|
{
|
|
public:
|
|
// ctor
|
|
yafrayRender_t() {}
|
|
// dtor
|
|
virtual ~yafrayRender_t() {}
|
|
|
|
// mtds
|
|
bool exportScene();
|
|
void addDupliMtx(Object* obj);
|
|
bool objectKnownData(Object* obj);
|
|
|
|
protected:
|
|
Object* maincam_obj;
|
|
float mainCamLens;
|
|
|
|
int maxraydepth;
|
|
bool hasworld;
|
|
|
|
std::map<Object*, std::vector<VlakRen*> > all_objects;
|
|
std::map<std::string, Material*> used_materials;
|
|
std::map<std::string, MTex*> used_textures;
|
|
std::map<std::string, std::vector<float> > dupliMtx_list;
|
|
std::map<std::string, Object*> dup_srcob;
|
|
std::map<void*, Object*> objectData;
|
|
std::map<Image*, Material*> imagetex;
|
|
std::map<Image*, std::string> imgtex_shader;
|
|
|
|
bool getAllMatTexObs();
|
|
|
|
virtual void writeTextures()=0;
|
|
virtual void writeShader(const std::string &shader_name, Material* matr, const std::string &facetexname)=0;
|
|
virtual void writeMaterialsAndModulators()=0;
|
|
virtual void writeObject(Object* obj, const std::vector<VlakRen*> &VLR_list, const float obmat[4][4])=0;
|
|
virtual void writeAllObjects()=0;
|
|
virtual void writeLamps()=0;
|
|
virtual void writeCamera()=0;
|
|
virtual void writeAreaLamp(LampRen* lamp, int num, float iview[4][4])=0;
|
|
virtual void writeHemilight()=0;
|
|
virtual void writePathlight()=0;
|
|
virtual bool writeWorld()=0;
|
|
virtual bool writeRender()=0;
|
|
virtual bool initExport()=0;
|
|
virtual bool finishExport()=0;
|
|
|
|
void clearAll();
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
#endif /*__YAFRAY_RENDER_H */
|