Johann Woelper 9 년 전
부모
커밋
2a3645252c

BIN
buggen/bug.hdalc


BIN
flocking/ref/1016420-lookfxburrowingowlfeathercontactsheetexample-1200.jpg


BIN
flocking/test.hip


BIN
flocking/test_n.blend


+ 215 - 0
grass/single_strand.obj

@@ -0,0 +1,215 @@
+# Blender v2.75 (sub 0) OBJ File: 'slime_tower_d.blend'
+# www.blender.org
+mtllib single_strand.mtl
+o Plane
+v 0.015988 1.510459 -0.075949
+v 0.020085 1.254090 -0.098685
+v 0.024071 1.494982 -0.074076
+v 0.011932 1.764932 -0.044820
+v 0.007976 1.519349 -0.077623
+v 0.010042 1.259887 -0.100987
+v 0.030127 1.245973 -0.095463
+v 0.018253 1.730721 -0.046058
+v 0.005895 1.780712 -0.045276
+v -0.015988 1.510459 -0.075949
+v -0.020085 1.254090 -0.098685
+v -0.007976 1.519349 -0.077623
+v -0.011932 1.764932 -0.044820
+v -0.024071 1.494982 -0.074076
+v -0.030127 1.245973 -0.095463
+v -0.010042 1.259888 -0.100987
+v -0.005895 1.780712 -0.045276
+v -0.018253 1.730721 -0.046058
+v -0.031960 0.500122 -0.078295
+v -0.035257 0.258898 -0.048436
+v -0.016089 0.500515 -0.081243
+v -0.028198 0.747027 -0.099838
+v -0.047396 0.502603 -0.074699
+v -0.050705 0.280037 -0.047386
+v -0.018064 0.252461 -0.050706
+v -0.014099 0.750471 -0.102797
+v -0.042296 0.742206 -0.095696
+v 0.031960 0.500122 -0.078295
+v 0.035257 0.258898 -0.048436
+v 0.047396 0.502603 -0.074699
+v 0.028198 0.747027 -0.099838
+v 0.016089 0.500515 -0.081243
+v 0.018064 0.252461 -0.050706
+v 0.050705 0.280037 -0.047386
+v 0.042296 0.742206 -0.095696
+v 0.014099 0.750471 -0.102797
+v -0.056395 0.736697 -0.090962
+v -0.062613 0.506521 -0.070781
+v -0.065282 0.308527 -0.046947
+v 0.020032 0.005358 -0.015677
+v 0.038320 0.020516 -0.014419
+v 0.053121 0.065992 -0.016914
+v 0.040169 1.236697 -0.091780
+v 0.032189 1.476212 -0.072102
+v 0.024717 1.687294 -0.048144
+v -0.003806 2.043025 -0.008438
+v -0.007897 2.018458 -0.009493
+v -0.012556 1.959825 -0.014725
+v -0.053121 0.065992 -0.016914
+v -0.038320 0.020516 -0.014419
+v -0.020032 0.005358 -0.015677
+v 0.012556 1.959825 -0.014725
+v 0.007897 2.018458 -0.009493
+v 0.003806 2.043025 -0.008438
+v 0.000000 1.262207 -0.101907
+v 0.000000 1.522148 -0.078410
+v 0.000000 1.783993 -0.045928
+v -0.024717 1.687294 -0.048144
+v -0.032189 1.476212 -0.072102
+v -0.040169 1.236697 -0.091780
+v 0.065282 0.308527 -0.046947
+v 0.062613 0.506521 -0.070781
+v 0.056395 0.736697 -0.090962
+v 0.000000 0.252918 -0.052146
+v 0.000000 0.501431 -0.082555
+v 0.000000 0.751848 -0.103980
+v -0.012086 1.003278 -0.110875
+v -0.024171 0.998666 -0.108243
+v -0.036257 0.992210 -0.104557
+v 0.036257 0.992210 -0.104557
+v 0.024171 0.998666 -0.108243
+v 0.012086 1.003278 -0.110875
+v -0.062689 0.156942 -0.026609
+v 0.062689 0.156942 -0.026609
+v -0.018068 1.853859 -0.026740
+v 0.018068 1.853859 -0.026740
+v 0.000000 0.005358 -0.017245
+v 0.000000 2.046792 -0.008954
+v -0.048343 0.984831 -0.100345
+v 0.048343 0.984831 -0.100345
+v 0.000000 1.005123 -0.111928
+vn -0.282500 -0.088700 0.955100
+vn -0.235200 -0.039700 0.971100
+vn -0.119200 -0.089700 0.988800
+vn -0.096000 -0.038900 0.994600
+vn -0.374300 -0.088100 0.923100
+vn -0.417600 -0.088000 0.904300
+vn -0.322300 -0.041100 0.945700
+vn -0.364100 -0.042800 0.930400
+vn -0.440400 -0.116300 0.890200
+vn -0.567700 -0.123900 0.813900
+vn -0.485000 -0.115300 0.866900
+vn -0.617300 -0.122800 0.777000
+vn -0.349100 -0.118500 0.929500
+vn -0.155200 -0.122100 0.980300
+vn -0.459600 -0.128400 0.878800
+vn -0.215900 -0.136800 0.966800
+vn 0.374300 -0.088100 0.923100
+vn 0.322300 -0.041100 0.945700
+vn 0.417600 -0.088000 0.904300
+vn 0.364100 -0.042800 0.930400
+vn 0.282500 -0.088700 0.955100
+vn 0.119200 -0.089700 0.988800
+vn 0.235200 -0.039700 0.971100
+vn 0.096000 -0.038900 0.994600
+vn 0.349100 -0.118500 0.929500
+vn 0.459600 -0.128400 0.878800
+vn 0.155200 -0.122100 0.980300
+vn 0.215900 -0.136800 0.966800
+vn 0.440400 -0.116300 0.890200
+vn 0.485000 -0.115300 0.866900
+vn 0.567700 -0.123900 0.813900
+vn 0.617400 -0.122800 0.777000
+vn 0.233700 0.115700 0.965400
+vn 0.248600 0.133700 0.959300
+vn 0.262900 0.112800 0.958200
+vn 0.289100 0.131900 0.948200
+vn 0.175900 0.118700 0.977200
+vn 0.074900 0.121200 0.989800
+vn 0.180100 0.136700 0.974100
+vn 0.076300 0.139300 0.987300
+vn 0.182500 0.082900 0.979700
+vn 0.200000 0.029600 0.979300
+vn 0.075700 0.085000 0.993500
+vn 0.081200 0.031200 0.996200
+vn 0.246700 0.080000 0.965800
+vn 0.278400 0.077200 0.957400
+vn 0.275400 0.027500 0.960900
+vn 0.311700 0.026000 0.949800
+vn -0.175900 0.118700 0.977200
+vn -0.180100 0.136700 0.974100
+vn -0.074900 0.121200 0.989800
+vn -0.076300 0.139300 0.987300
+vn -0.233700 0.115700 0.965400
+vn -0.262900 0.112800 0.958200
+vn -0.248600 0.133700 0.959300
+vn -0.289100 0.131900 0.948200
+vn -0.246700 0.080000 0.965800
+vn -0.275400 0.027500 0.960900
+vn -0.278400 0.077200 0.957400
+vn -0.311700 0.026000 0.949800
+vn -0.182500 0.082900 0.979700
+vn -0.075700 0.085000 0.993500
+vn -0.200000 0.029600 0.979300
+vn -0.081200 0.031200 0.996200
+usemtl None
+s off
+f 1//1 5//1 6//1 2//1
+f 2//2 6//2 72//2 71//2
+f 5//3 56//3 55//3 6//3
+f 6//4 55//4 81//4 72//4
+f 1//5 2//5 7//5 3//5
+f 3//6 7//6 43//6 44//6
+f 2//7 71//7 70//7 7//7
+f 7//8 70//8 80//8 43//8
+f 1//9 3//9 8//9 4//9
+f 4//10 8//10 52//10 53//10
+f 3//11 44//11 45//11 8//11
+f 8//12 45//12 76//12 52//12
+f 1//13 4//13 9//13 5//13
+f 5//14 9//14 57//14 56//14
+f 4//15 53//15 54//15 9//15
+f 9//16 54//16 78//16 57//16
+f 10//17 14//17 15//17 11//17
+f 11//18 15//18 69//18 68//18
+f 14//19 59//19 60//19 15//19
+f 15//20 60//20 79//20 69//20
+f 10//21 11//21 16//21 12//21
+f 12//22 16//22 55//22 56//22
+f 11//23 68//23 67//23 16//23
+f 16//24 67//24 81//24 55//24
+f 10//25 12//25 17//25 13//25
+f 13//26 17//26 46//26 47//26
+f 12//27 56//27 57//27 17//27
+f 17//28 57//28 78//28 46//28
+f 10//29 13//29 18//29 14//29
+f 14//30 18//30 58//30 59//30
+f 13//31 47//31 48//31 18//31
+f 18//32 48//32 75//32 58//32
+f 19//33 23//33 24//33 20//33
+f 20//34 24//34 49//34 50//34
+f 23//35 38//35 39//35 24//35
+f 24//36 39//36 73//36 49//36
+f 19//37 20//37 25//37 21//37
+f 21//38 25//38 64//38 65//38
+f 20//39 50//39 51//39 25//39
+f 25//40 51//40 77//40 64//40
+f 19//41 21//41 26//41 22//41
+f 22//42 26//42 67//42 68//42
+f 21//43 65//43 66//43 26//43
+f 26//44 66//44 81//44 67//44
+f 19//45 22//45 27//45 23//45
+f 23//46 27//46 37//46 38//46
+f 22//47 68//47 69//47 27//47
+f 27//48 69//48 79//48 37//48
+f 28//49 32//49 33//49 29//49
+f 29//50 33//50 40//50 41//50
+f 32//51 65//51 64//51 33//51
+f 33//52 64//52 77//52 40//52
+f 28//53 29//53 34//53 30//53
+f 30//54 34//54 61//54 62//54
+f 29//55 41//55 42//55 34//55
+f 34//56 42//56 74//56 61//56
+f 28//57 30//57 35//57 31//57
+f 31//58 35//58 70//58 71//58
+f 30//59 62//59 63//59 35//59
+f 35//60 63//60 80//60 70//60
+f 28//61 31//61 36//61 32//61
+f 32//62 36//62 66//62 65//62
+f 31//63 71//63 72//63 36//63
+f 36//64 72//64 81//64 66//64

BIN
lmapper/helper.hip


+ 193 - 0
lmapper/shaders/global_illumination.h

@@ -0,0 +1,193 @@
+/*
+	Copyright (c) 2006 soho vfx inc.
+	Copyright (c) 2006 The 3Delight Team.
+*/
+
+#ifndef _global_illumination_h
+#define _global_illumination_h
+
+#define NO_EFFECT 0
+#define OCCLUSION 1
+#define FAST_IBL 2
+#define FULL_GI 3
+
+float
+getGiEffect()
+{
+	uniform float effect = 0;
+	option( "user:_3dfm_gi_effect", effect );
+	
+	return effect;
+}
+
+float getGiAddToFinalMix()
+{
+	uniform float add_to_final_mix = 0;
+	option( "user:_3dfm_gi_add_to_final_mix", add_to_final_mix );
+	
+	return add_to_final_mix;
+}
+
+// Retrieves all global illumination effect variables
+
+color
+getGlobalIlluminationComponents(
+	varying normal i_N;
+	varying float i_roughness;
+	varying color i_gi_weight;
+	output varying color o_visibility;
+	output varying color o_env_diffuse;
+	output varying color o_color_bleeding;)
+{
+	extern point P;
+	extern vector I;
+	vector V = -(normalize(I));
+	
+	shader gi_shader = getshader( "maya_gi_shader" );
+	if( gi_shader != null )
+	{
+		uniform float effect = 0;
+		getvar( gi_shader, "effect", effect );
+		if( effect != 0 )
+		{
+			varying color gi = gi_shader->ComputeGI( P, i_N, V, i_roughness, i_gi_weight );
+			getvar( gi_shader, "out_visibility", o_visibility );
+			getvar( gi_shader, "out_environment_diffuse", o_env_diffuse );
+			getvar( gi_shader, "out_color_bleeding", o_color_bleeding );
+			return gi;
+		}
+	}
+
+	o_visibility = 1;
+	o_env_diffuse = 0;
+	o_color_bleeding = 0;
+	return color(0);
+}
+
+color
+computeIndirectDiffuseAndGIAOVs(
+	color i_diffuse_factor;
+	color i_surface_color;
+	color i_surface_transparency;
+	normal i_N )
+{
+	color gi_weight = i_surface_color * i_diffuse_factor;
+
+	color visibility;
+	color env_diffuse;
+	color color_bleeding;
+
+	color gi = getGlobalIlluminationComponents(
+		i_N, 0, gi_weight,
+		visibility, env_diffuse, color_bleeding );
+
+#ifdef USE_AOV_aov_gi
+	extern varying color aov_gi;
+	extern color __transparency;
+	aov_gi += __transparency * i_surface_color * i_diffuse_factor * gi;
+#endif
+#ifdef USE_AOV_aov_occlusion
+	extern varying color aov_occlusion;
+	extern color __transparency;
+	aov_occlusion += __transparency *
+		visibility * (1.0 - i_surface_transparency);
+#endif
+#ifdef USE_AOV_aov_env_diffuse
+	extern varying color aov_env_diffuse;
+	extern color __transparency;
+	aov_env_diffuse += __transparency *
+		i_surface_color * i_diffuse_factor * env_diffuse;
+#endif
+#ifdef USE_AOV_aov_indirect
+	extern varying color aov_indirect;
+	extern color __transparency;
+	aov_indirect +=	__transparency *
+		i_surface_color * i_diffuse_factor * color_bleeding;
+#endif
+
+	return i_diffuse_factor * gi;
+}
+
+float
+getGiEnvironmentMapParameters(
+	output uniform string envmap;
+	output uniform string envspace;)
+{
+	envmap = "";
+	envspace = "";
+	
+	uniform float envmap_found = 
+		option( "user:_3dfm_gi_environment_map", envmap );
+	option( "user:_3dfm_gi_environment_space", envspace );
+	
+	return envmap_found;
+}
+
+float
+getGiEnvironmentParameters(
+	output uniform string envmap;
+	output uniform string envspace;
+	output uniform float env_intensity;
+	output uniform color env_color_gain;
+	output uniform color env_color_offset;
+	output uniform float env_specularity; )
+{
+	envmap = "";
+	envspace = "";
+	env_intensity = 1.0;
+	env_color_gain = 1.0;
+	env_color_offset = 0.0;
+	env_specularity = 0;
+
+	uniform float envmap_found = getGiEnvironmentMapParameters( envmap, envspace );
+
+	if( envmap_found )
+	{
+		option( "user:_3dfm_gi_environment_intensity", env_intensity );
+		option( "user:_3dfm_gi_environment_color_gain", env_color_gain );
+		option( "user:_3dfm_gi_environment_color_offset", env_color_offset );
+		option( "user:_3dfm_gi_environment_specularity", env_specularity );
+	}
+	
+	return envmap_found;
+}
+
+// Computes the reflections caused by the IBL options of the
+// Global Illumination options of the render pass.
+//
+color getGiEnvironmentSpecular(
+	vector i_dir;
+	float i_samples;
+	float i_blur)
+{
+	color env_color = 0;
+	
+	uniform string envmap = "";
+	uniform string envspace = "";
+	uniform float env_intensity = 1.0;
+	uniform color env_color_gain = 1.0;
+	uniform color env_color_offset = 0.0;
+	uniform float env_specularity = 0;
+	uniform float envmap_found = getGiEnvironmentParameters( envmap, envspace, 
+		env_intensity, env_color_gain, env_color_offset, env_specularity );
+
+	if( envmap_found != 0 && env_specularity > 0 )
+	{
+		vector dir = i_dir;
+		
+		if( envspace != "" )
+			dir = transform( envspace, i_dir );
+		
+		env_color = environment(
+			envmap, dir, dir, dir, dir, 
+			"samples", i_samples, "blur", i_blur);
+
+		env_color = env_color * env_color_gain + env_color_offset;
+		env_color *= env_intensity * env_specularity;
+	}
+
+	return env_color;
+}
+
+
+#endif

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1405 - 0
lmapper/shaders/shading_utils.h


+ 193 - 0
lmapper/shaders/utils.h

@@ -0,0 +1,193 @@
+/*
+	Copyright (c) 2006 soho vfx inc.
+	Copyright (c) 2006 The 3Delight Team.
+*/
+
+
+#ifndef _utils_h
+#define _utils_h
+
+#define LOG05 -0.693147180559945  /* log(0.5) */
+#ifndef UNDEFINED_UV
+#define UNDEFINED_UV -10000000
+#endif
+
+#define ISUVDEFINED(U, V) ( abs(U) < 100000 && abs(V) < 100000 )
+
+#define WRAPMAX (1.000001)
+#define EPSILON 1e-6
+
+float
+luminance( color i_color )
+{
+	return
+		0.3 * comp(i_color, 0) + 
+		0.59 * comp(i_color, 1) + 
+		0.11 * comp(i_color, 2);
+}
+
+// Compute the CIE luminance (Rec. 709) of a given color.
+float CIEluminance(color c)
+{
+	return
+	      comp(c, 0) * 0.212671
+	    + comp(c, 1) * 0.715160
+	    + comp(c, 2) * 0.072169;
+}
+
+// Compute the square of a given value.
+float sq(float x)
+{
+	return x * x;
+}
+
+color
+cabs( color i_color )
+{
+	return color(
+		abs(comp(i_color, 0)), abs(comp(i_color,1)), abs(comp(i_color,2)) );
+}
+
+/* Taken from ARMAN */
+float filteredpulse (float edge0, edge1, x, dx)
+{
+    float x0 = x - dx/2;
+    float x1 = x0 + dx;
+    return max (0, (min(x1,edge1)-max(x0,edge0)) / dx);
+}
+
+/* Taken from ARMAN and improved. */
+float filteredpulsetrain (float edge, period, x, dx)
+{
+	/* First, normalize so period == 1 and our domain of interest is > 0 */
+    float w = dx/period;
+    float x0 = x/period - w/2;
+    float x1 = x0+w;
+    float nedge = edge / period;
+
+	/* Definite integral of normalized pulsetrain from 0 to t */
+    float integral (float t) { 
+        extern float nedge;
+        return ((1-nedge)*floor(t) + max(0,t-floor(t)-nedge));
+    }
+
+	float result;
+	if( x0 == x1 )
+	{
+		/* Trap the unfiltered case so it doesn't return 0 (when dx << x). */
+		result = (x0 - floor(x0) < nedge) ? 0 : 1;
+	}
+	else
+	{
+    	result = (integral(x1) - integral(x0)) / w;
+
+		/*
+			The above integral is subject to its own aliasing as we go beyond
+			where the pattern should be extinct. We try to avoid that by
+			switching to a constant value.
+		*/
+		float extinct = smoothstep( 0.4, 0.5, w );
+		result = result + extinct * (1 - nedge - result);
+	}
+
+	return result;
+}
+
+/*
+	Perlin's bias function
+*/
+float bias(float b, x)
+{
+    return pow(x, log(b)/LOG05);
+}
+	
+void
+colorBalance(
+	output color io_outColor;
+	output float io_outAlpha;
+	uniform float i_alphaIsLuminance;
+	float i_alphaGain;
+	float i_alphaOffset;
+	color i_colorGain;
+	color i_colorOffset;
+	uniform float i_invert; )
+{
+	if(i_invert != 0.0)
+	{
+		io_outColor = 1 - io_outColor;
+		io_outAlpha = 1 - io_outAlpha;
+	}
+
+	if(i_alphaIsLuminance != 0.0)
+	{
+		io_outAlpha = luminance( io_outColor );
+	}
+
+	io_outColor *= i_colorGain;
+	io_outColor += i_colorOffset;
+
+	io_outAlpha *= i_alphaGain;
+	io_outAlpha += i_alphaOffset;
+}	
+
+float srgbToLinear(float i_value)
+{
+	float linear;
+
+	if(i_value <= 0.04045)
+	{
+		linear = (1.0/12.92) * i_value;
+	}
+	else
+	{
+		linear = pow((i_value + 0.055) * (1.0 / 1.055), 2.4);
+	}
+
+	return linear;
+}
+
+float rec709ToLinear(float i_value)
+{
+	float linear;
+
+	if(i_value <= 0.081)
+	{
+		linear = (1.0 / 4.5) * i_value;
+	}
+	else
+	{
+		linear = pow((i_value + 0.099) * (1.0 / 1.099), (1.0 / 0.45));
+	}
+
+	return linear;
+}
+
+color getLinearizedColor(color i_color)
+{
+	color result = i_color;
+
+	float profile;
+	if( option( "user:defaultinputcolorprofile", profile ) != 0 )
+	{
+		if( profile == 3 )
+		{
+			result =
+				color(
+					srgbToLinear(result[0]),
+					srgbToLinear(result[1]),
+					srgbToLinear(result[2]) );
+		}
+		else if( profile == 5 )
+		{
+			result =
+				color(
+					rec709ToLinear(result[0]),
+					rec709ToLinear(result[1]),
+					rec709ToLinear(result[2]) );
+		}
+	}
+
+	return result;
+}
+
+#endif

+ 39 - 0
lmapper/shaders/xplastic.sl

@@ -0,0 +1,39 @@
+surface xplastic(
+    float Ka = 1;
+    float Kd = 1;
+    float Ks = 0.5;
+    float roughness = 0.1;
+    color specularcolor = 1;
+    string mapName = "";
+)   
+{
+    normal Ni;
+    matrix mv, mp, mv_inv;
+    float xs, xt;
+    point P2;
+
+    // Query the normal map texture
+    textureinfo (mapName, "viewingmatrix", mv);
+    mv_inv = 1 / mv;
+    textureinfo (mapName, "projectionmatrix", mp);
+
+    // Transform P from current space to NDC space
+    P2 = transform (mp, P);
+    xs = (1.0 + xcomp (P2)) * 0.5;
+    xt = (1.0 - ycomp (P2)) * 0.5;
+
+    // Extract the normal Nf from the normal map texture
+    color cn = color texture (mapName, xs, xt, xs, xt, xs, xt, xs, xt,
+    "samples", 1);
+    setxcomp (Ni, comp (cn, 0));
+    setycomp (Ni, comp (cn, 1));
+    setzcomp (Ni, comp (cn, 2));
+    normal Nf = ntransform (mv_inv, Ni);
+    Nf = normalize (Nf);
+
+    vector V = - normalize (I);
+    Ci = Cs * (Ka * ambient () + Kd * diffuse (Nf)) +
+    Ks * specularcolor * specular (Nf, V, roughness);
+    Oi = Os;
+    Ci *= Oi;
+}

+ 1 - 0
lmapper/textures/fetch.sh

@@ -0,0 +1 @@
+tdlmake -progress -flipt /projects/xten_art/assets/environment/ground/source/tweaked_heightmap.tif tweaked_heightmap.tdl

BIN
rock_texture/rock_texture.hip


BIN
steampunk/source/41362_Sundew/sundew_engine.blend