This commit is contained in:
luboslenco 2018-11-19 14:28:04 +01:00
parent 10442cf0ff
commit 4904b50f1a
28 changed files with 8 additions and 509 deletions

View File

@ -1,13 +0,0 @@
IESNA:LM-63-1995
[TEST] INFINITY LIGHTING PHOTOMETRIC REPORT NO. W00006
[LUMINAIRE] ICEAL8-2X150-FL-CG1
TILT=NONE
2 11000 1 19 5 1 1 1.375 1.04167 0
1 1 314
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90
0 22.5 45 67.5 90
9085.62 9033.58 8923.24 8687.43 8145.53 7454.18 6336.9 5050.9 3180.16 2162.21 1292.02 677.24 243.87 48.44 16.1 6.48 6.25 6.99 3.31
9085.62 8902.2 8825.21 8578.38 8462.81 7787.37 6902.89 5633.64 3822.33 2423.91 1614.81 927.01 382.27 72.18 18.92 8.91 6.41 5.19 2.16
9085.62 9029.2 9168.27 8989.93 8818.57 8434.18 7791.45 6806.71 5489.39 3939.15 2518.39 1573.92 770.93 308.04 81.18 28.92 14.71 8.88 4.75
9085.62 9404.94 9244.69 9202.21 9146.45 8779.2 8121.15 7346.47 6513.38 5407.45 3976.98 2453.4 1106.06 428.6 117.57 35.96 12.34 7.19 1.55
9085.62 9315.27 9317.59 9459.68 9433.84 9128.13 8380.85 7752.85 6655.4 5439.5 3990.21 2472.54 1140.85 377.1 65.79 17.41 9 4.71 2.77

View File

@ -1,16 +0,0 @@
IESNA:LM-63-1995
[TEST]BALLABS TEST NO. 10974.0
[MANUFAC] INFINITY LIGHTING INC - CARTHAGE, MISSOURI
[LUMINAIRE] 1/250W HALOGEN CLEAR MINICAN 7.5"DIA RECESSED LUMINAIRE
[LUMINAIRE] FACETED HYDROFORMED SEMI-SPECULAR REFLECTOR
[LUMINAIRE] CLEAR GLASS LENS w/4"DEEPSPUN SPECULAR ALUMINUM CONE
[LUMCAT]CATALOG NO. : TH75-250-T4 NARROW w/SPACER I
[LAMPCAT]LAMP CODE : 250Q/CL/MC (EHT)
TILT=NONE
1 5000. 1.000000 19 1 1 1 .625 .625 .000
1.0000 1.0000 247.0000
.0 5.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0
50.0 55.0 60.0 65.0 70.0 75.0 80.0 85.0 90.0
.0
8183. 6729. 4775. 3866. 2714. 1600. 992. 715. 373. 119.
46. 20. 8. 4. 0. 0. 0. 0. 0.

View File

@ -1,14 +0,0 @@
IESNA91
[MANUFAC] Halo,Recessed
[LUMCAT] H7t-301
[LUMINAIRE] Open Trim (75W R-30 Flood)
[LAMP]
[REPORT]
TILT=NONE
1 900.0 1.0 36 1 1 1 0.0 -0.32 0.0
1.0 1.0 75.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 17.5 20.0 22.5 25.0 27.5 30.0 32.5 35.0 37.5 40.0 45.0
50.0 55.0 60.0 65.0 70.0 75.0 80.0 85.0 90.0
0.0
1512.0 1516.0 1508.0 1487.0 1453.0 1409.0 1357.0 1294.0 1229.0 1158.0 1085.0 1008.0 934.0 862.0 795.0 727.0 578.0 459.0 368.0
304.0 256.0 222.0 197.0 177.0 163.0 153.0 141.0 124.0 73.0 28.0 23.0 18.0 13.0 9.0 4.0 1.0

View File

@ -1,24 +0,0 @@
IESNA:LM-63-1995
[TEST]BALLABS TEST NO. 12447.0
[MANUFAC] INFINITY LIGHTING INC - CARTHAGE, MISSOURI
[LUMINAIRE] 1/100W ICETRON INDUCTION LAMP 20x15"AREALIGHT LUMINAIRE
[LUMINAIRE] MIRO4 HIGHLY SPEC FLOOD OPTICS w/CLEAR GLASS LENS
[LUMINAIRE] SYLVANIA BALLAST #QT1x150 ICE/UNV-T WATTS=145
[LUMCAT] ICE DC-150W/41K-FL/CGI-MTV @277VOLTS
[LAMPCAT] ICETRON100/QT150
TILT=NONE
1 11000. 1.000000 19 5 1 1 .938 1.266 .000
1.0000 1.0000 145.0000
.0 5.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0
50.0 55.0 60.0 65.0 70.0 75.0 80.0 85.0 90.0
.0 22.5 45.0 67.5 90.0
5122. 5161. 5246. 5337. 5360. 5211. 4910. 4510. 3890. 3056.
1952. 1153. 451. 139. 30. 15. 3. 0. 0.
5122. 5138. 5234. 5291. 5289. 5129. 4754. 4318. 3676. 2838.
2069. 1240. 482. 172. 37. 11. 6. 1. 0.
5122. 5134. 5160. 5118. 4967. 4781. 4477. 3831. 2940. 1851.
1139. 685. 306. 85. 25. 13. 7. 1. 0.
5122. 5119. 5076. 4880. 4697. 4385. 3786. 2876. 1738. 1121.
711. 388. 120. 30. 11. 6. 4. 1. 0.
5122. 5113. 5032. 4843. 4615. 4130. 3464. 2374. 1519. 1017.
589. 293. 73. 27. 11. 6. 3. 1. 0.

View File

@ -1,13 +0,0 @@
IESNA:LM-63-1995
[TEST] BE1680
[DATE] 12-FEB-96
[MANUFAC] BEGA
[LUMCAT] 6340
[LUMINAIRE] SURFACE MOUNTED WALL LUMINAIRE
[LAMP] (1) 100W A-19 INC
TILT=NONE
1 1750 1.75 73 1 1 2 -.1 0 .05
1 1 100
0 2.5 5 7.5 10 12.5 15 17.5 20 22.5 25 27.5 30 32.5 35 37.5 40 42.5 45 47.5 50 52.5 55 57.5 60 62.5 65 67.5 70 72.5 75 77.5 80 82.5 85 87.5 90 92.5 95 97.5 100 102.5 105 107.5 110 112.5 115 117.5 120 122.5 125 127.5 130 132.5 135 137.5 140 142.5 145 147.5 150 152.5 155 157.5 160 162.5 165 167.5 170 172.5 175 177.5 180
0
167.3 168.9 173 179.9 179.2 151.2 119.4 95.63 81.03 71.95 66.46 62.67 60.25 57.67 52.18 46.62 48.91 63.15 83.15 95.41 97.4 87.75 62.6 43.08 39.26 47.36 52.89 45.74 31.45 18.17 10.5 7.888 8.112 7.592 3.665 .6467 .498 .4252 .3735 .3185 .2765 .2279 .2199 .2021 .1746 .1407 .1358 .1277 .1326 .1342 .1406 .1374 .1358 .1375 .1488 .1488 .1536 .1925 .2183 .2328 .2345 .249 .2765 .3023 .3266 .3476 .3557 .3638 .3541 .3573 .3638 .3719 .3816

View File

@ -1,3 +1,4 @@
# Using IES profiles from http://www.derekjenson.com/3d-blog/ies-light-profiles
# IES parser based on:
# https://github.com/tobspr/RenderPipeline
# Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.com>

View File

@ -1 +0,0 @@
Using IES profiles from http://www.derekjenson.com/3d-blog/ies-light-profiles

View File

@ -13,9 +13,6 @@
#ifdef _VoxelAOvar
#include "std/conetrace.glsl"
#endif
#ifdef _DFAO
#include "std/sdf.glsl"
#endif
// uniform sampler2D gbufferD;
uniform sampler2D gbuffer0;
@ -59,9 +56,6 @@ uniform float envmapStrength;
uniform vec3 eye;
uniform vec3 eyeLook;
#endif
#ifdef _DFAO
//!uniform sampler3D sdftex;
#endif
in vec2 texCoord;
#ifdef _IndPos
@ -166,10 +160,6 @@ void main() {
#endif
#endif
#ifdef _DFGI
envl.rgb = dfgi(p, n) * albedo;
#endif
#ifdef _VoxelAOvar
#ifdef _VoxelGICam
@ -200,10 +190,6 @@ void main() {
#endif
#endif
#ifdef _DFAO
fragColor.rgb *= dfao(p, n);
#endif
// Show voxels
// vec3 origin = vec3(texCoord * 2.0 - 1.0, 0.99);
// vec3 direction = vec3(0.0, 0.0, -1.0);

View File

@ -62,11 +62,6 @@
"name": "envmapStrength",
"link": "_envmapStrength"
},
{
"name": "sdftex",
"link": "_sdfTexture",
"ifdef": ["_DFAO"]
},
{
"name": "backgroundCol",
"link": "_backgroundCol",

View File

@ -15,9 +15,6 @@
#ifndef _NoShadows
#include "std/shadows.glsl"
#endif
#ifdef _DFRS
#include "std/sdf.glsl"
#endif
#ifdef _SSS
#include "std/sss.glsl"
#endif
@ -49,9 +46,6 @@ uniform sampler2D gbuffer2;
uniform samplerCube shadowMapCube;
#endif
#endif
#ifdef _DFRS
//!uniform sampler3D sdftex;
#endif
#ifdef _LightIES
//!uniform sampler2D texIES;
#endif
@ -168,11 +162,6 @@ void main() {
if (dotNL > 0.0) visibility = max(0, 1.0 - traceShadow(voxels, voxpos, l, 0.1, length(lp), n));
#endif
#ifdef _DFRS
visibility = dfrs(p, l, lightPos);
#endif
visibility *= attenuate(distance(p, lightPos));
#ifdef _LightIES

View File

@ -111,11 +111,6 @@
"link": "_viewProjectionMatrix",
"ifdef": ["_SSRS"]
},
{
"name": "sdftex",
"link": "_sdfTexture",
"ifdef": ["_DFRS"]
},
{
"name": "smSizeUniform",
"link": "_shadowMapSize",

View File

@ -1,12 +0,0 @@
// Transfer material IDs to depth buffer
#version 450
uniform sampler2D tex;
in vec2 texCoord;
void main() {
const float fstep = 1.0 / 16777216.0; // 24bit
// const float fstep = 1.0 / 65536.0; // 16bit
gl_FragDepth = texture(tex, texCoord).r * fstep; // materialID
}

View File

@ -1,18 +0,0 @@
{
"contexts": [
{
"name": "matid_to_depth",
"depth_write": true,
"compare_mode": "always",
"color_write_red": false,
"color_write_green": false,
"color_write_blue": false,
"color_write_alpha": false,
"cull_mode": "none",
"links": [],
"texture_params": [],
"vertex_shader": "../include/pass.vert.glsl",
"fragment_shader": "matid_to_depth.frag.glsl"
}
]
}

View File

@ -1,207 +0,0 @@
const float res = 50.0; // sdftex res
uniform sampler3D sdftex;
float mapsdf(vec3 p) {
p = clamp(p, vec3(-1.0), vec3(1.0));
p = p * 0.5 + 0.5;
return texture(sdftex, p).a;
}
vec4 mapsdf2(vec3 p) {
p = clamp(p, vec3(-1.0), vec3(1.0));
p = p * 0.5 + 0.5;
return texture(sdftex, p);
}
vec3 calcNormal(const vec3 pos, const float eps) {
const vec3 v1 = vec3( 1.0,-1.0,-1.0);
const vec3 v2 = vec3(-1.0,-1.0, 1.0);
const vec3 v3 = vec3(-1.0, 1.0,-1.0);
const vec3 v4 = vec3( 1.0, 1.0, 1.0);
return normalize(v1 * mapsdf(pos + v1 * eps) +
v2 * mapsdf(pos + v2 * eps) +
v3 * mapsdf(pos + v3 * eps) +
v4 * mapsdf(pos + v4 * eps));
}
float sdBox(vec3 p, vec3 b) {
vec3 d = abs(p) - b;
return min(max(d.x, max(d.y, d.z)), 0.0) + length(max(d, 0.0));
}
float dfao(const vec3 p, const vec3 n) {
const float eps = 0.02;
float occ = 0.0;
float sca = 1.0;
for (int i = 0; i < 10; i++) {
float r = 0.01 + 0.1 * float(i);
vec3 rd = n * r;
vec3 sp = rd + p;
float d;
if (sdBox(sp, vec3(1.0)) <= 0.0) {
d = mapsdf(sp + rd);
// if (d < eps) break;
}
else {
vec3 sampleBorder = clamp(sp, vec3(-1.0), vec3(1.0));
float phi = mapsdf(sampleBorder);
float dd = 0.1;
float grad_x = mapsdf(sampleBorder + vec3(dd, 0, 0)) - phi;
float grad_y = mapsdf(sampleBorder + vec3(0, dd, 0)) - phi;
vec3 grad = vec3(grad_x, grad_y, 1.0);
vec3 endpoint = sampleBorder - normalize(grad) * phi;
d = distance(endpoint, sp);
}
occ += (r - d) * sca;
sca *= 0.85;
}
return clamp(1.0 - occ / (2.14), 0.0, 1.0);
}
// float dfrs(const vec3 p, const vec3 l) {
float dfrs(const vec3 p, const vec3 l, const vec3 lp) {
float visibility = 1.0;
const float distmax = 10.0;
const float eps = 0.01;
float dist = 0.05;
// float test = mapsdf(p);
// if (test < 0.1) {
// fragColor = vec4(1.0, 0.0, 0.0, 1.0);
// return;
// }
// float lastd = distmax;
for (int i = 0; i < 50; i++) {
vec3 rd = l * dist;
float d = sdBox(p + rd, vec3(1.0));
// Going out of volume box
// if (d > 0.0 && lastd < d) {
// visibility = 1.0;
// break;
// }
// lastd = d;
if (d <= 0.0) { // In volume
d = mapsdf(p + rd);
// if (distance(p + rd, lp) < 0.05) { // Hits light pos
if (dist + d > distance(p, lp) - 0.05) {
// visibility = 1.0;
break;
}
if (d < eps) {
visibility = 0.0;
break;
}
}
else { // To volume
// d += mapsdf(p + rd);
vec3 sampleBorder = clamp(p + rd, vec3(-1.0), vec3(1.0));
float phi = mapsdf(sampleBorder);
float dd = 0.1;
float grad_x = mapsdf(sampleBorder + vec3(dd, 0, 0)) - phi;
float grad_y = mapsdf(sampleBorder + vec3(0, dd, 0)) - phi;
vec3 grad = vec3(grad_x, grad_y, 1.0);
vec3 endpoint = sampleBorder - normalize(grad) * phi;
d = distance(endpoint, p + rd);
// float dd = 0.1;
// vec3 p0 = clamp(p, vec3(-1.0), vec3(1.0));
// vec3 p1 = clamp(p, vec3(-0.99), vec3(0.99));
// float r0 = mapsdf(p0);
// float r1 = mapsdf(p1);
// float h0 = 0.5 + (r0 * r0 - r1 * r1) / (2.0 * dd * dd);
// float ri = sqrt(abs(r0 * r0 - h0 * h0 * dd * dd));
// vec3 p2 = p0 + (p1 - p0) * h0;
// vec3 p3 = p2 + vec3(p1.z - p0.z, p1.y - p0.y, p1.x - p0.x) * ri;
// d = length((p + rd) - p3);
}
const float k = 4.0;
visibility = min(visibility, k * d / dist);
dist += d;
if (dist > distmax) {
break;
}
}
return visibility;
}
vec3 orthogonal(const vec3 u) {
// Pass normalized u
const vec3 v = vec3(0.99146, 0.11664, 0.05832); // Pick any normalized vector
return abs(dot(u, v)) > 0.99999 ? cross(u, vec3(0.0, 1.0, 0.0)) : cross(u, v);
}
vec3 traceCone(const vec3 p, const vec3 n) {
vec3 col = vec3(0.0);
const float eps = 0.02;
float dist = 0.05;
for (int i = 0; i < 10; i++) {
vec3 rd = n * dist;
float d = sdBox(p + rd, vec3(1.0));
if (d <= 0.0) {
vec4 res = mapsdf2(p + rd);
d = res.a;
if (d < eps) {
// float vis = dfrs(p + rd, l, lp);
// vec3 hitn = calcNormal(p + rd, 0.002);
// float diffuse = max(0.0, dot(hitn, l));// / dot(l,l);
col = res.rgb * max(1.0 - dist, 0.0);// * diffuse;// * vis;
break;
}
}
dist += d;
}
return col;
}
vec3 dfgi(const vec3 p, const vec3 n) {
const float ANGLE_MIX = 0.5; // Angle mix (1.0f -> orthogonal direction, 0.0f -> direction of normal)
const float w[3] = { 1.0, 1.0, 1.0 }; // Cone weights
// Find a base for the side cones with the normal as one of its base vectors
const vec3 ortho = normalize(orthogonal(n));
const vec3 ortho2 = normalize(cross(ortho, n));
// Find base vectors for the corner cones
const vec3 corner = 0.5 * (ortho + ortho2);
const vec3 corner2 = 0.5 * (ortho - ortho2);
// Find start position of trace (start with a bit of offset)
const vec3 offset = 0.0 * n;
const vec3 origin = p + offset;
vec3 col = vec3(0.0);
const float CONE_OFFSET = 0.0;//-0.01;
col += w[0] * traceCone(origin + CONE_OFFSET * n, n);
const vec3 s1 = mix(n, ortho, ANGLE_MIX);
const vec3 s2 = mix(n, -ortho, ANGLE_MIX);
const vec3 s3 = mix(n, ortho2, ANGLE_MIX);
const vec3 s4 = mix(n, -ortho2, ANGLE_MIX);
col += w[1] * traceCone(origin + CONE_OFFSET * ortho, s1);
col += w[1] * traceCone(origin - CONE_OFFSET * ortho, s2);
col += w[1] * traceCone(origin + CONE_OFFSET * ortho2, s3);
col += w[1] * traceCone(origin - CONE_OFFSET * ortho2, s4);
const vec3 c1 = mix(n, corner, ANGLE_MIX);
const vec3 c2 = mix(n, -corner, ANGLE_MIX);
const vec3 c3 = mix(n, corner2, ANGLE_MIX);
const vec3 c4 = mix(n, -corner2, ANGLE_MIX);
col += w[2] * traceCone(origin + CONE_OFFSET * corner, c1);
col += w[2] * traceCone(origin - CONE_OFFSET * corner, c2);
col += w[2] * traceCone(origin + CONE_OFFSET * corner2, c3);
col += w[2] * traceCone(origin - CONE_OFFSET * corner2, c4);
return col / 9.0;
}

View File

@ -298,18 +298,6 @@ class Inc {
#end
}
// public static inline function getRenderCaptureFormat():String {
// #if (rp_rendercapture_format == "8bit")
// return "RGBA32";
// #elseif (rp_rendercapture_format == "16bit")
// return "RGBA64";
// #elseif (rp_rendercapture_format == "32bit")
// return "RGBA128";
// #else
// return "RGBA32";
// #end
// }
#if (rp_gi == "Voxel GI")
public static function computeVoxelsBegin() {
if (voxel_sh == null) {

View File

@ -190,24 +190,13 @@ class RenderPathDeferred {
}
#end
// #if rp_rendercapture
// {
// var t = new RenderTargetRaw();
// t.name = "capture";
// t.width = 0;
// t.height = 0;
// t.format = Inc.getRenderCaptureFormat();
// path.createRenderTarget(t);
// }
// #end
#if rp_compositornodes
{
path.loadShader("shader_datas/compositor_pass/compositor_pass");
}
#end
#if ((!rp_compositornodes) || (rp_antialiasing == "TAA") || (rp_rendercapture) || (rp_motionblur == "Camera") || (rp_motionblur == "Object"))
#if ((!rp_compositornodes) || (rp_antialiasing == "TAA") || (rp_motionblur == "Camera") || (rp_motionblur == "Object"))
{
path.loadShader("shader_datas/copy_pass/copy_pass");
}
@ -842,7 +831,7 @@ class RenderPathDeferred {
}
#end
#if ((rp_supersampling == 4) || (rp_rendercapture))
#if (rp_supersampling == 4)
var framebuffer = "buf";
#else
var framebuffer = "";
@ -932,22 +921,11 @@ class RenderPathDeferred {
#if (rp_supersampling == 4)
{
// #if rp_rendercapture
// TODO: ss4 + capture broken
// var finalTarget = "capture";
// #else
var finalTarget = "";
// #end
path.setTarget(finalTarget);
path.bindTarget(framebuffer, "tex");
path.drawShader("shader_datas/supersample_resolve/supersample_resolve");
}
// #elseif (rp_rendercapture)
// {
// path.setTarget("capture");
// path.bindTarget(framebuffer, "tex");
// path.drawShader("shader_datas/copy_pass/copy_pass");
// }
#end
}
#end

View File

@ -78,20 +78,6 @@ class RenderPathForward {
}
#end
// #if rp_rendercapture
// {
// var t = new RenderTargetRaw();
// t.name = "capture";
// t.width = 0;
// t.height = 0;
// t.format = Inc.getRenderCaptureFormat();
// path.createRenderTarget(t);
// #if rp_compositornodes
// path.loadShader("shader_datas/copy_pass/copy_pass");
// #end
// }
// #end
#if ((rp_supersampling == 4) || (rp_antialiasing == "SMAA") || (rp_antialiasing == "TAA"))
{
var t = new RenderTargetRaw();
@ -416,7 +402,7 @@ class RenderPathForward {
}
#end
#if ((rp_supersampling == 4) || (rp_rendercapture))
#if (rp_supersampling == 4)
var framebuffer = "buf";
#else
var framebuffer = "";
@ -434,20 +420,14 @@ class RenderPathForward {
}
#end
path.bindTarget("lbuf", "tex");
#if rp_compositordepth
{
path.bindTarget("_main", "gbufferD");
}
#end
#if rp_compositornodes
{
path.drawShader("shader_datas/compositor_pass/compositor_pass");
}
#else
{
path.bindTarget("lbuf", "tex");
path.drawShader("shader_datas/copy_pass/copy_pass");
}
#end
@ -496,21 +476,11 @@ class RenderPathForward {
#if (rp_supersampling == 4)
{
// #if rp_rendercapture
// var finalTarget = "capture";
// #else
var finalTarget = "";
// #end
path.setTarget(finalTarget);
path.bindTarget(framebuffer, "tex");
path.drawShader("shader_datas/supersample_resolve/supersample_resolve");
}
// #elseif (rp_rendercapture)
// {
// path.setTarget("capture");
// path.bindTarget(framebuffer, "tex");
// path.drawShader("shader_datas/copy_pass/copy_pass");
// }
#end
}
#end

View File

@ -105,8 +105,6 @@ def invalidate_shader_cache(self, context):
global invalidate_enabled
if invalidate_enabled == False:
return
# import traceback
# traceback.print_stack()
fp = arm.utils.get_fp_build()
if os.path.isdir(fp + '/compiled/Shaders'):
shutil.rmtree(fp + '/compiled/Shaders', onerror=remove_readonly)

View File

@ -416,7 +416,7 @@ class ArmoryExporter:
deltaSclAnimated = [False, False, False]
mode = bobject.rotation_mode
sampledAnimation = ArmoryExporter.sample_animation_flag or mode == "QUATERNION" or mode == "AXIS_ANGLE"
sampledAnimation = mode == "QUATERNION" or mode == "AXIS_ANGLE"
if not sampledAnimation and bobject.animation_data and bobject.type != 'ARMATURE':
action = bobject.animation_data.action
@ -623,7 +623,7 @@ class ArmoryExporter:
o['transform']['values'] = self.write_matrix(transform)
curve_array = self.collect_bone_animation(armature, bone.name)
animation = len(curve_array) != 0 or ArmoryExporter.sample_animation_flag
animation = len(curve_array) != 0
if animation and pose_bone:
begin_frame, end_frame = int(action.frame_range[0]), int(action.frame_range[1])
@ -1583,9 +1583,6 @@ class ArmoryExporter:
if ArmoryExporter.option_mesh_per_file:
fp = self.get_meshes_file_path('mesh_' + oid, compressed=self.is_compress(bobject.data))
assets.add(fp)
# if hasattr(bobject.data, 'arm_sdfgen') and bobject.data.arm_sdfgen:
# sdf_path = fp.replace('/mesh_', '/sdf_')
# assets.add(sdf_path)
if self.is_mesh_cached(bobject) == True and os.path.exists(fp):
return
else:
@ -2605,7 +2602,6 @@ class ArmoryExporter:
ArmoryExporter.import_traits = [] # Referenced traits
ArmoryExporter.option_mesh_only = False
ArmoryExporter.option_mesh_per_file = True
ArmoryExporter.sample_animation_flag = wrd.arm_sampled_animation
# Used for material shader export and khafile
ArmoryExporter.mesh_context = 'mesh'

View File

@ -1,38 +0,0 @@
import os
import shutil
import subprocess
from .arm import assets
from .arm.utils import get_sdk_path, krom_paths
def export_sdf(bobject, fp):
# if hasattr(bobject.data, 'arm_sdfgen') and bobject.data.arm_sdfgen:
# o['sdf_ref'] = 'sdf_' + oid
if hasattr(bobject.data, 'arm_sdfgen') and bobject.data.arm_sdfgen:
# Copy input
sdk_path = get_sdk_path()
sdfgen_path = sdk_path + '/armory/tools/sdfgen'
shutil.copy(fp, sdfgen_path + '/krom/mesh.arm')
# Extract basecolor
# Assume Armpry PBR with linked texture for now
# mat = bobject.material_slots[0].material
# img = None
# for n in mat.node_tree.nodes:
# if n.type == 'GROUP' and n.node_tree.name.startswith('Armory PBR') and n.inputs[0].is_linked:
# img = n.inputs[0].links[0].from_node.image
# fp_img = bpy.path.abspath(img.filepath)
# shutil.copy(fp_img, sdfgen_path + '/krom/mesh.png')
# Run
krom_location, krom_path = krom_paths()
krom_dir = sdfgen_path + '/krom'
krom_res = sdfgen_path + '/krom'
subprocess.check_output([krom_path, krom_dir, krom_res, '--nosound', '--nowindow'])
# Copy output
sdf_path = fp.replace('/mesh_', '/sdf_')
shutil.copy('out.bin', sdf_path)
assets.add(sdf_path)
os.remove('out.bin')
os.remove(sdfgen_path + '/krom/mesh.arm')
# if img != None:
# os.remove(sdfgen_path + '/krom/mesh.png')

View File

@ -63,15 +63,6 @@ def add_world_defs():
wrd.world_defs += '_CSM'
assets.add_khafile_def('arm_csm')
# SS
# if rpdat.rp_dfrs:
# wrd.world_defs += '_DFRS'
# assets.add_khafile_def('arm_sdf')
# if rpdat.rp_dfao:
# wrd.world_defs += '_DFAO'
# assets.add_khafile_def('arm_sdf')
# if rpdat.rp_dfgi:
# wrd.world_defs += '_DFGI'
# assets.add_khafile_def('arm_sdf')
if rpdat.rp_ssgi == 'RTGI' or rpdat.rp_ssgi == 'RTAO':
if rpdat.rp_ssgi == 'RTGI':
wrd.world_defs += '_RTGI'

View File

@ -123,7 +123,6 @@ def init_properties():
bpy.types.World.arm_minimize = BoolProperty(name="Minimize Data", description="Export scene data in binary", default=True, update=assets.invalidate_compiled_data)
bpy.types.World.arm_minify_js = BoolProperty(name="Minify JS", description="Minimize JavaScript output when publishing", default=True)
bpy.types.World.arm_optimize_mesh = BoolProperty(name="Optimize Meshes", description="Export more efficient geometry indices, can prolong build times", default=False, update=assets.invalidate_mesh_data)
bpy.types.World.arm_sampled_animation = BoolProperty(name="Sampled Animation", description="Export object animation as raw matrices", default=False, update=assets.invalidate_compiled_data)
bpy.types.World.arm_deinterleaved_buffers = BoolProperty(name="Deinterleaved Buffers", description="Use deinterleaved vertex buffers", default=False, update=invalidate_compiler_cache)
bpy.types.World.arm_export_tangents = BoolProperty(name="Export Tangents", description="Precompute tangents for normal mapping, otherwise computed in shader", default=True, update=assets.invalidate_compiled_data)
bpy.types.World.arm_batch_meshes = BoolProperty(name="Batch Meshes", description="Group meshes by materials to speed up rendering", default=False, update=invalidate_compiler_cache)
@ -132,7 +131,6 @@ def init_properties():
bpy.types.World.arm_lod_gen_levels = IntProperty(name="Levels", description="Number of levels to generate", default=3, min=1)
bpy.types.World.arm_lod_gen_ratio = FloatProperty(name="Decimate Ratio", description="Decimate ratio", default=0.8)
bpy.types.World.arm_cache_build = BoolProperty(name="Cache Build", description="Cache build files to speed up compilation", default=True)
bpy.types.World.arm_gpu_processing = BoolProperty(name="GPU Processing", description="Utilize GPU for asset pre-processing at build time", default=True, update=assets.invalidate_compiled_data)
bpy.types.World.arm_play_camera = EnumProperty(
items=[('Scene', 'Scene', 'Scene'),
('Viewport', 'Viewport', 'Viewport'),
@ -201,7 +199,6 @@ def init_properties():
bpy.types.Mesh.arm_aabb = FloatVectorProperty(name="AABB", size=3, default=[0,0,0])
bpy.types.Mesh.arm_dynamic_usage = BoolProperty(name="Dynamic Usage", description="Mesh data can change at runtime", default=False)
bpy.types.Mesh.arm_compress = BoolProperty(name="Compress", description="Pack data into zip file", default=False)
# bpy.types.Mesh.arm_sdfgen = BoolProperty(name="Generate SDF", description="Make signed distance field data", default=False, update=invalidate_mesh_cache)
bpy.types.Curve.arm_cached = BoolProperty(name="Mesh Cached", description="No need to reexport curve data", default=False)
bpy.types.Curve.arm_compress = BoolProperty(name="Compress", description="Pack data into zip file", default=False)
bpy.types.Curve.arm_dynamic_usage = BoolProperty(name="Dynamic Data Usage", description="Curve data can change at runtime", default=False)

View File

@ -31,9 +31,6 @@ def update_preset(self, context):
rpdat.rp_volumetriclight = False
rpdat.rp_ssgi = 'SSAO'
rpdat.rp_ssr = False
rpdat.rp_dfrs = False
rpdat.rp_dfao = False
rpdat.rp_dfgi = False
rpdat.rp_bloom = False
rpdat.rp_eyeadapt = False
rpdat.rp_motionblur = 'Off'
@ -66,9 +63,6 @@ def update_preset(self, context):
rpdat.rp_volumetriclight = False
rpdat.rp_ssgi = 'Off'
rpdat.rp_ssr = False
rpdat.rp_dfrs = False
rpdat.rp_dfao = False
rpdat.rp_dfgi = False
rpdat.rp_bloom = False
rpdat.rp_eyeadapt = False
rpdat.rp_motionblur = 'Off'
@ -101,9 +95,6 @@ def update_preset(self, context):
rpdat.rp_volumetriclight = False
rpdat.rp_ssgi = 'Off'
rpdat.rp_ssr = False
rpdat.rp_dfrs = False
rpdat.rp_dfao = False
rpdat.rp_dfgi = False
rpdat.rp_bloom = False
rpdat.rp_eyeadapt = False
rpdat.rp_motionblur = 'Off'
@ -139,9 +130,6 @@ def update_preset(self, context):
rpdat.rp_ssgi = 'RTGI'
rpdat.arm_ssrs = False
rpdat.rp_ssr = True
rpdat.rp_dfrs = False
rpdat.rp_dfao = False
rpdat.rp_dfgi = False
rpdat.rp_bloom = True
rpdat.rp_eyeadapt = False
rpdat.rp_motionblur = 'Off'
@ -175,9 +163,6 @@ def update_preset(self, context):
rpdat.rp_volumetriclight = False
rpdat.rp_ssgi = 'Off'
rpdat.rp_ssr = False
rpdat.rp_dfrs = False
rpdat.rp_dfao = False
rpdat.rp_dfgi = False
rpdat.rp_bloom = False
rpdat.rp_eyeadapt = False
rpdat.rp_motionblur = 'Off'
@ -317,9 +302,6 @@ class ArmRPListItem(bpy.types.PropertyGroup):
('RTGI', 'RTGI', 'Ray-traced global illumination')
],
name="SSGI", description="Screen space global illumination", default='SSAO', update=update_renderpath)
rp_dfao = BoolProperty(name="DFAO", description="Distance field ambient occlusion", default=False)
rp_dfrs = BoolProperty(name="DFRS", description="Distance field ray-traced shadows", default=False)
rp_dfgi = BoolProperty(name="DFGI", description="Distance field global illumination", default=False)
rp_bloom = BoolProperty(name="Bloom", description="Bloom processing", default=False, update=update_renderpath)
rp_eyeadapt = BoolProperty(name="Eye Adaptation", description="Auto-exposure based on histogram", default=False, update=update_renderpath)
rp_motionblur = EnumProperty(

View File

@ -129,8 +129,6 @@ class DataPropsPanel(bpy.types.Panel):
row = layout.row(align=True)
row.prop(obj.data, 'arm_dynamic_usage')
row.prop(obj.data, 'arm_compress')
# if obj.type == 'MESH':
# layout.prop(obj.data, 'arm_sdfgen')
layout.operator("arm.invalidate_cache")
elif obj.type == 'LIGHT' or obj.type == 'LAMP': # TODO: LAMP is deprecated
row = layout.row(align=True)

View File

@ -113,7 +113,7 @@ def write_probes(image_filepath, disable_hdr, cached_num_mips, arm_radiance=True
mip_count = 7
wrd = bpy.data.worlds['Arm']
use_opencl = 'true' if wrd.arm_gpu_processing else 'false'
use_opencl = 'true'
if arm.utils.get_os() == 'win':
subprocess.call([ \

Binary file not shown.

View File

@ -1,9 +0,0 @@
import bpy
img = bpy.data.images.new(name="img", width=256, height=256)
for x in range(256):
for y in range(256):
x2 = (x - 37) & 255
y2 = (y - 17) & 255
img.pixels[(y * 255 + x) * 4 + 1] = img.pixels[(y2 * 255 + x2) * 4]
img.pixels[(y * 255 + x) * 4 + 3] = img.pixels[(y2 * 255 + x2) * 4 + 2]

Binary file not shown.