import sys
sys.path.append('..')
from helpers import render_frames
from graphs.SideBySide import SideBySide as g
from falcor import *

m.addGraph(g)

# default
render_frames(m, 'default')

# imageLeftBound
for v in [250, 500, 750]:
	g.updatePass('SideBySidePass', {'imageLeftBound': v})
	render_frames(m, 'imageLeftBound.' + str(v))

exit()
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.GBufferRaster import GBufferRaster as g
from falcor import *

m.addGraph(g)
m.loadScene('Arcade/Arcade.pyscene')

# default
render_frames(m, 'default', frames=[1, 16, 64])

# re-load scene with non-indexed vertices
m.loadScene('Arcade/Arcade.pyscene',
            buildFlags=SceneBuilderFlags.NonIndexedVertices)

render_frames(m, 'non-indexed', frames=[1, 16, 64])

exit()
Beispiel #3
0
from helpers import render_frames
from graphs.MinimalPathTracer import MinimalPathTracer as g
from falcor import *

m.addGraph(g)
m.loadScene('Arcade/Arcade.fscene')
ctx = locals()

# default
render_frames(ctx, 'default', frames=[128])

exit()
Beispiel #4
0
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.ModulateIllumination import ModulateIllumination as g
from falcor import *

m.addGraph(g)

# default
render_frames(m, 'default')

exit()
Beispiel #5
0
from helpers import render_frames
from graphs.SplitScreen import SplitScreen as g
from falcor import *

m.addGraph(g)
ctx = locals()

# default
render_frames(ctx, 'default')

# splitLocation
for v in [0.5, 0.25, 0.75]:
    g.updatePass('SplitScreenPass', {'splitLocation': v})
    render_frames(ctx, 'splitLocation.' + str(v))

exit()
import sys
sys.path.append('..')
from falcor import *
from helpers import render_frames

exec(open('../../../Source/Mogwai/Data/BSDFViewer.py').read())

# arcade
m.loadScene('Arcade/Arcade.pyscene')
render_frames(m, 'arcade', frames=[16])

# materials
m.loadScene('TestScenes/MaterialTest.pyscene')
render_frames(m, 'materials', frames=[16])

exit()
import sys
sys.path.append('..')
import os
from helpers import render_frames
from graphs.TestRtProgram import TestRtProgramGraph as g
from falcor import *

m.addGraph(g)

# default: triangles and custom primitives
m.loadScene('TestScenes/GeometryTypes.pyscene')
render_frames(m, 'default', frames=[1])

# two_curves: triangles, curves, and custom primitives
m.loadScene('CurveTest/two_curves.pyscene')
render_frames(m, 'two_curves', frames=[1])

g.updatePass('TestRtProgram', {'mode': 1})

# test for dynamic dispatch
m.loadScene('TestScenes/AlphaTest/AlphaTest.pyscene')
render_frames(m, 'types', frames=[1])

exit()
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.PathTracerDielectrics import PathTracerDielectrics as g
from falcor import *

m.addGraph(g)
m.loadScene('TestScenes/NestedDielectrics.pyscene')

# default
render_frames(m, 'default', frames=[1, 256])

exit()
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.GaussianBlur import GaussianBlur as g
from falcor import *

m.addGraph(g)
m.loadScene("Arcade/Arcade.pyscene")

# default
render_frames(m, 'default')

# kernelWidth, sigma
for kernelWidth, sigma in [(5, 1), (9, 1.5), (15, 2)]:
    g.updatePass('GaussianBlur', {'kernelWidth': kernelWidth, 'sigma': sigma})
    render_frames(m,
                  'kernelWidth.' + str(kernelWidth) + '.sigma.' + str(sigma))

exit()
Beispiel #10
0
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.FLIPPass import FLIPPass as g
from falcor import *

m.addGraph(g)

# default
render_frames(m, 'default')

# useMagma
for useMagma in [False, True]:
    g.updatePass('FLIP', {'useMagma': useMagma})
    render_frames(m, 'useMagma.' + str(useMagma))

exit()
Beispiel #11
0
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.ColorMapPass import ColorMapPass as g
from falcor import *

m.addGraph(g)

# default
render_frames(m, 'default')

# colorMap
for colorMap in [
        ColorMap.Grey, ColorMap.Jet, ColorMap.Viridis, ColorMap.Plasma,
        ColorMap.Magma, ColorMap.Inferno
]:
    g.updatePass('ColorMap', {'colorMap': colorMap})
    render_frames(m, 'colorMap.' + str(colorMap))

# channel
for channel in [0, 1, 2, 3]:
    g.updatePass('ColorMap', {'channel': channel})
    render_frames(m, 'colorMap.channel.' + str(channel))

# minValue, maxValue
for (minValue, maxValue) in [(0, 1), (1, 0), (0.25, 0.75)]:
    g.updatePass('ColorMap', {
        'colorMap': ColorMap.Jet,
        'minValue': minValue,
        'maxValue': maxValue
    })
from helpers import render_frames
from graphs.CompositePass import CompositePass as g
from falcor import *

m.addGraph(g)
ctx = locals()

# default
render_frames(ctx, 'default')

# scaleA, scaleB
for scaleA, scaleB in [(0.5, 1.5), (1.0, 1.0), (1.5, 0.5)]:
    g.updatePass('Composite', {'scaleA': scaleA, 'scaleB': scaleB})
    render_frames(ctx, 'scaleA.' + str(scaleA) + '.scaleB.' + str(scaleB))

exit()
Beispiel #13
0
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.FXAA import FXAA as g
from falcor import *

m.addGraph(g)
m.loadScene('Arcade/Arcade.pyscene')

# default
render_frames(m, 'default')

# qualitySubPix
for v in [0.25, 0.5, 0.75]:
    g.updatePass('FXAA', {'qualitySubPix': v})
    render_frames(m, 'qualitySubPix.' + str(v))

# qualityEdgeThreshold
for v in [0.166, 0.5, 0.75]:
    g.updatePass('FXAA', {'qualityEdgeThreshold': v})
    render_frames(m, 'qualityEdgeThreshold.' + str(v))

# qualityEdgeThresholdMin
for v in [0.0833, 0.25, 0.375]:
    g.updatePass('FXAA', {'qualityEdgeThresholdMin': v})
    render_frames(m, 'qualityEdgeThresholdMin.' + str(v))

# earlyOut
for b in [False, True]:
    g.updatePass('FXAA', {'earlyOut': b})
    render_frames(m, 'earlyOut.' + str(b))
Beispiel #14
0
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.ToneMapping import ToneMapping as g
from falcor import *

m.addGraph(g)

# default
render_frames(m, 'default')

# operator
for operator in [
        ToneMapOp.Linear, ToneMapOp.Reinhard, ToneMapOp.ReinhardModified,
        ToneMapOp.HejiHableAlu, ToneMapOp.HableUc2, ToneMapOp.Aces
]:
    g.updatePass('ToneMapping', {'operator': operator})
    render_frames(m, 'operator.' + str(operator))

# autoExposure
for b in [False, True]:
    g.updatePass('ToneMapping', {'autoExposure': b})
    render_frames(m, 'autoExposure.' + str(b))

# exposureCompensation
for v in [-2, 0, 2]:
    g.updatePass('ToneMapping', {'exposureCompensation': v})
    render_frames(m, 'exposureCompensation.' + str(v))

# fNumber
for v in [0.5, 1.0, 2.0]:
Beispiel #15
0
from helpers import render_frames
from graphs.ForwardRendering import ForwardRendering as g
from falcor import *

g.unmarkOutput("ForwardLightingPass.motionVecs")
m.addGraph(g)
m.loadScene("grey_and_white_room/grey_and_white_room.fbx")
ctx = locals()

# default
render_frames(ctx, 'default', frames=[1, 16, 64, 128, 256])

exit()
Beispiel #16
0
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.MVecRaster import MVecRaster as g
from falcor import *

sceneFile = 'Cerberus/Standard/Cerberus.pyscene'

m.addGraph(g)
m.loadScene(sceneFile)

# default
render_frames(m, 'default', frames=[1, 16, 64])

# re-load scene with 32-bit indices
m.loadScene(sceneFile, buildFlags=SceneBuilderFlags.Force32BitIndices)

render_frames(m, '32bit-indices', frames=[1, 16, 64])

# re-load scene with non-indexed vertices
m.loadScene(sceneFile, buildFlags=SceneBuilderFlags.NonIndexedVertices)

render_frames(m, 'non-indexed', frames=[1, 16, 64])

exit()
Beispiel #17
0
from helpers import render_frames
from graphs.SSAO import SSAO as g
from falcor import *

m.addGraph(g)
m.loadScene('Arcade/Arcade.fscene')
ctx = locals()

# default
render_frames(ctx, 'default', frames=[1,16,64])

# radius
for v in [0.5, 1.0, 5.0]:
    g.updatePass('SSAO', {'radius': v})
    render_frames(ctx, 'radius.' + str(v), frames=[1,16,64])

# kernelSize
for v in [1, 5, 10]:
    g.updatePass('SSAO', {'kernelSize': v})
    render_frames(ctx, 'kernelSize.' + str(v), frames=[1,16,64])

# distribution
for distribution in [SampleDistribution.Random, SampleDistribution.UniformHammersley, SampleDistribution.CosineHammersley]:
    g.updatePass('SSAO', {'distribution': distribution})
    render_frames(ctx, 'distribution.' + str(distribution), frames=[1,16,64])

exit()
Beispiel #18
0
sys.path.append('..')
import os
from helpers import render_frames
from graphs.SceneDebugger import SceneDebugger as SceneDebuggerGraph
from graphs.GBufferRTCullBack import GBufferRTCullBack
from graphs.GBufferRasterCullBack import GBufferRasterCullBack
from falcor import *

# Load test scene that has mixed triangle winding in object/world space
m.loadScene('TestScenes/WindingTest.pyscene')

m.addGraph(SceneDebuggerGraph)
SceneDebuggerGraph.getPass(
    'SceneDebugger').mode = SceneDebuggerMode.FrontFacingFlag

render_frames(m, 'frontfacing', frames=[2])

SceneDebuggerGraph.getPass('SceneDebugger').mode = SceneDebuggerMode.FaceNormal

render_frames(m, 'facenormal', frames=[2])

m.removeGraph(SceneDebuggerGraph)
m.addGraph(GBufferRTCullBack)

render_frames(m, 'rt_cullback', frames=[2])

m.removeGraph(GBufferRTCullBack)
m.addGraph(GBufferRasterCullBack)

render_frames(m, 'raster_cullback', frames=[2])
Beispiel #19
0
from helpers import render_frames
from graphs.TAA import TAA as g
from falcor import *

m.addGraph(g)
m.loadScene('Arcade/Arcade.fscene')
ctx = locals()

# default
render_frames(ctx, 'default', frames=[1, 16, 64])

# alpha
for v in [0.0, 0.5, 1.0]:
    g.updatePass('TAA', {'alpha': v})
    render_frames(ctx, 'alpha.' + str(v), frames=[1, 16, 64])

# colorBoxSigma
for v in [0.0, 7.5, 15.0]:
    g.updatePass('TAA', {'colorBoxSigma': v})
    render_frames(ctx, 'colorBoxSigma.' + str(v), frames=[1, 16, 64])

exit()
Beispiel #20
0
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.PathTracer import PathTracer as g
from falcor import *

m.addGraph(g)

# default
m.loadScene('TestScenes/CornellBox.pyscene')
render_frames(m, 'default', frames=[1])

# load other scene
m.loadScene('TestScenes/NestedDielectrics.pyscene')
render_frames(m, 'nested', frames=[1])

exit()
Beispiel #21
0
import sys
sys.path.append('..')
import os
from helpers import render_frames
from graphs.SceneDebugger import SceneDebugger as SceneDebuggerGraph
from graphs.MegakernelPathTracerVBuffer import MegakernelPathTracerVBuffer
from falcor import *

m.addGraph(MegakernelPathTracerVBuffer)

# arcade
m.loadScene('Arcade/Arcade.pyscene', SceneBuilderFlags.RebuildCache)
render_frames(m, 'arcade', frames=[64])
m.loadScene('Arcade/Arcade.pyscene', SceneBuilderFlags.UseCache)
render_frames(m, 'arcade.cached', frames=[64])

# grey_and_white_room
m.loadScene('grey_and_white_room/grey_and_white_room.fbx', SceneBuilderFlags.RebuildCache)
render_frames(m, 'grey_and_white_room', frames=[64])
m.loadScene('grey_and_white_room/grey_and_white_room.fbx', SceneBuilderFlags.UseCache)
render_frames(m, 'grey_and_white_room.cached', frames=[64])

m.removeGraph(MegakernelPathTracerVBuffer)
m.addGraph(SceneDebuggerGraph)

# volumes
m.loadScene(os.path.abspath('scenes/Volumes.pyscene'), SceneBuilderFlags.RebuildCache)
render_frames(m, 'volumes', frames=[1])
m.loadScene(os.path.abspath('scenes/Volumes.pyscene'), SceneBuilderFlags.UseCache)
render_frames(m, 'volumes.cached', frames=[1])
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.GBufferRasterAlpha import GBufferRaster as g
from falcor import *

m.addGraph(g)
m.loadScene('TestScenes/AlphaTest/AlphaTest.pyscene')

# default
render_frames(m, 'default', frames=[1])

# force cull back
g.updatePass('GBufferRaster', {
    'forceCullMode': True,
    'cull': CullMode.CullBack
})
render_frames(m, 'cullback', frames=[1])

# force cull front
g.updatePass('GBufferRaster', {
    'forceCullMode': True,
    'cull': CullMode.CullFront
})
render_frames(m, 'cullfront', frames=[1])

# force cull none
g.updatePass('GBufferRaster', {
    'forceCullMode': True,
    'cull': CullMode.CullNone
})
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.FLIPPass import FLIPPass as g
from falcor import *

m.addGraph(g)

# default
render_frames(m, 'default')

# useMagma
for useMagma in [False, True]:
    g.updatePass('FLIP', {'useMagma': useMagma})
    render_frames(m, 'useMagma.' + str(useMagma))

# isHDR
for isHDR in [False, True]:
    g.updatePass('FLIP', {'isHDR': isHDR})
    render_frames(m, 'isHDR.' + str(isHDR))

# toneMapper
for toneMapper in [FLIPToneMapperType.ACES, FLIPToneMapperType.Hable, FLIPToneMapperType.Reinhard]:
    g.updatePass('FLIP', {'isHDR': True, 'toneMapper': toneMapper})
    render_frames(m, 'toneMapper.' + str(toneMapper))

exit()
IMAGE_TEST = {'tolerance': 1e-7}

# NOTE:
# DLSS seems to be non-deterministic in some cases even with identical inputs.
# We're setting a larger threshold here to account for that.

import sys
sys.path.append('..')
from helpers import render_frames
from graphs.DLSS import DLSS as g
from falcor import *

m.addGraph(g)
m.loadScene('Cerberus/Standard/Cerberus.pyscene')

# default
render_frames(m, 'default', frames=[64, 128, 192, 256])

exit()
# use the WhittedRayTracer pass to test various texture LOD modes
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.WhittedRayTracer import WhittedRayTracer as g
from falcor import *

m.addGraph(g)
m.loadScene('Arcade/Arcade.pyscene')

# default
render_frames(m, 'default')

# texture LOD mode
for mode in [
        TextureLODMode.Mip0, TextureLODMode.RayCones,
        TextureLODMode.RayDiffsIsotropic, TextureLODMode.RayDiffsAnisotropic
]:
    g.updatePass('WhittedRayTracer', {
        'mTexLODMode': mode,
        'mUsingRasterizedGBuffer': True,
        'mMaxBounces': 1
    })
    render_frames(m, 'mode.' + str(mode))
exit()
from helpers import render_frames
from graphs.ToneMapping import ToneMapping as g
from falcor import *

m.addGraph(g)
ctx = locals()

# default
render_frames(ctx, 'default')

# operator
for operator in [
        ToneMapOp.Linear, ToneMapOp.Reinhard, ToneMapOp.ReinhardModified,
        ToneMapOp.HejiHableAlu, ToneMapOp.HableUc2, ToneMapOp.Aces
]:
    g.updatePass('ToneMapping', {'operator': operator})
    render_frames(ctx, 'operator.' + str(operator))

# autoExposure
for b in [False, True]:
    g.updatePass('ToneMapping', {'autoExposure': b})
    render_frames(ctx, 'autoExposure.' + str(b))

# exposureCompensation
for v in [-2, 0, 2]:
    g.updatePass('ToneMapping', {'exposureCompensation': v})
    render_frames(ctx, 'exposureCompensation.' + str(v))

# exposureValue
for v in [-2, 0, 2]:
    g.updatePass('ToneMapping', {'autoExposure': False, 'exposureValue': v})
Beispiel #27
0
import sys
sys.path.append('..')
from falcor import *
from helpers import render_frames

exec(open('../../../Source/Mogwai/Data/VBufferPathTracer.py').read())

# default
render_frames(m, 'default', frames=[64])

# arcade
m.loadScene('Arcade/Arcade.pyscene')
render_frames(m, 'arcade', frames=[64])

exit()
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.CompositePass import CompositePass as g
from falcor import *

m.addGraph(g)

# default
render_frames(m, 'default')

# modes
for mode in [CompositeMode.Add, CompositeMode.Multiply]:
    g.updatePass('Composite', {'mode': mode})
    render_frames(m, 'mode.' + str(mode))

# scaleA, scaleB
for scaleA, scaleB in [(0.5, 1.5), (1.0, 1.0), (1.5, 0.5)]:
    g.updatePass('Composite', {
        'mode': CompositeMode.Add,
        'scaleA': scaleA,
        'scaleB': scaleB
    })
    render_frames(m, 'scaleA.' + str(scaleA) + '.scaleB.' + str(scaleB))

exit()
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.ForwardRendering import ForwardRendering as g
from falcor import *

m.addGraph(g)
m.loadScene('Cerberus/Standard/Cerberus.pyscene')

# default
render_frames(m, 'default', frames=[1, 16, 64])

exit()
import sys
sys.path.append('..')
from helpers import render_frames
from graphs.SimplePostFX import SimplePostFX as g
from falcor import *

m.addGraph(g)

# default
render_frames(m, 'default')

# turn off features one by one
config = g.getPass('SimplePostFX').getDictionary()
config['bloomAmount'] = 0.
g.updatePass('SimplePostFX', config)
render_frames(m, 'nobloom')

config['chromaticAberrationAmount'] = 0.0
g.updatePass('SimplePostFX', config)
render_frames(m, 'nochromatic')

config['barrelDistortAmount'] = 0.0
g.updatePass('SimplePostFX', config)
render_frames(m, 'nodistort')

config['enabled'] = False
g.updatePass('SimplePostFX', config)
render_frames(m, 'fullydisabled')

exit()