- Xmas special: shiny mirroring bells & whistles!
This is a revision of the old NeoGeo raytracer, dusted off, improved quite a lot, and nicely integrated in the rest of rendering pipeline. Enable it with F10-"Ray", and set either a 'ray-shadow' lamp or give the Material a "RayMirror" value. It has been added for 2 reasons: - get feedback on validity... I need artists to play around with it if it's actually useful. It still *is* raytracing, meaning complex scenes will easily become slow. - for educational purposes. All raytracing happens in ray.c, which can be quite easily adjusted for other effects. When too many disasters pop up with this, I'll make it a compile #ifdef. But so far, it seems to do a decent job. Demo files: http://www.blender.org/docs/ray_test.tgz An article (tech) about how it works, and about the new octree invention will be posted soon. :) Note: it doesn't work with unified render yet.
This commit is contained in:
@@ -56,6 +56,9 @@ typedef struct Lamp {
|
||||
float clipsta, clipend, shadspotsize;
|
||||
float bias, soft;
|
||||
|
||||
short ray_samp, pad;
|
||||
float ray_soft;
|
||||
|
||||
/* texact is for buttons */
|
||||
short texact, shadhalostep;
|
||||
|
||||
@@ -88,6 +91,7 @@ typedef struct Lamp {
|
||||
#define LA_DEEP_SHADOW 1024
|
||||
#define LA_NO_DIFF 2048
|
||||
#define LA_NO_SPEC 4096
|
||||
#define LA_SHAD_RAY 8192
|
||||
|
||||
/* mapto */
|
||||
#define LAMAP_COL 1
|
||||
|
||||
@@ -54,9 +54,10 @@ typedef struct Material {
|
||||
float mirr, mirg, mirb;
|
||||
float ambr, ambb, ambg;
|
||||
|
||||
float amb, emit, ang, spectra;
|
||||
float amb, emit, ang, spectra, ray_mirror;
|
||||
float alpha, ref, spec, zoffs, add;
|
||||
float kfac; /* for transparent solids */
|
||||
short ray_depth, pad1;
|
||||
short har;
|
||||
char seed1, seed2;
|
||||
|
||||
@@ -82,7 +83,7 @@ typedef struct Material {
|
||||
/* dynamic properties */
|
||||
float friction, fh, reflect;
|
||||
float fhdist, xyfrict;
|
||||
short dynamode, pad;
|
||||
short dynamode, pad2;
|
||||
|
||||
ScriptLink scriptlink;
|
||||
} Material;
|
||||
|
||||
@@ -174,12 +174,13 @@ typedef struct RenderData {
|
||||
* 9: borders
|
||||
* 10: panorama
|
||||
* 11: crop
|
||||
* 12: save SGI movies with Cosmo hardware (????)
|
||||
* 13: odd field first rendering
|
||||
* 14: motion blur
|
||||
* 15: use unified renderer for this pic!
|
||||
* 12: save SGI movies with Cosmo hardware
|
||||
* 13: odd field first rendering
|
||||
* 14: motion blur
|
||||
* 15: use unified renderer for this pic
|
||||
* 16. enable raytracing
|
||||
*/
|
||||
short mode;
|
||||
int mode;
|
||||
|
||||
/**
|
||||
* What to do with the sky/background. Picks sky/premul/key
|
||||
@@ -199,7 +200,7 @@ typedef struct RenderData {
|
||||
|
||||
/** For unified renderer: reduce intensity on boundaries with
|
||||
* identical materials with this number.*/
|
||||
short same_mat_redux, pad_3[3];
|
||||
short same_mat_redux, pad_3[2];
|
||||
|
||||
/**
|
||||
* The gamma for the normal rendering. Used when doing
|
||||
@@ -263,7 +264,7 @@ typedef struct Scene {
|
||||
#define R_FRONTBUF 4
|
||||
#define R_FRONTBUFANIM 8
|
||||
|
||||
/* mode */
|
||||
/* mode (int now) */
|
||||
#define R_OSA 0x0001
|
||||
#define R_SHADOW 0x0002
|
||||
#define R_GAMMA 0x0004
|
||||
@@ -277,10 +278,10 @@ typedef struct Scene {
|
||||
#define R_PANORAMA 0x0400
|
||||
#define R_MOVIECROP 0x0800
|
||||
#define R_COSMO 0x1000
|
||||
/* these difines were different between IrisGL and OpenGL!!! */
|
||||
#define R_ODDFIELD 0x2000
|
||||
#define R_MBLUR 0x4000
|
||||
#define R_UNIFIED 0x8000
|
||||
#define R_RAYTRACE 0x10000
|
||||
|
||||
/* scemode */
|
||||
#define R_DOSEQ 0x0001
|
||||
|
||||
Reference in New Issue
Block a user