java.lang.Object
de.grogra.task.Task
de.grogra.ray2.tracing.PixelwiseRenderer
de.grogra.ray2.tracing.MetropolisRenderer
- All Implemented Interfaces:
Renderer
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from class de.grogra.ray2.tracing.PixelwiseRenderer
PixelwiseRenderer.RenderTask, PixelwiseRenderer.Result
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
static boolean
static boolean
static final int
protected Color4f
protected Color4f
protected Color4f
protected float[][]
protected BufferedImage
protected int[]
static boolean
static final String
static int
int
static final String
static int
int
protected int[]
protected MTRandom
static final int
static final String
static int
int
protected static float
static int
static boolean
Fields inherited from class de.grogra.ray2.tracing.PixelwiseRenderer
antialiasing, ANTIALIASING, AUTO_ADJUST, AUTO_ADJUST_MAX_VALUE, autoAdjust, autoAdjustMaxValue, brightness, BRIGHTNESS, camera, cameraTransformation, DEBUG_LINE, DEBUG_PIXEL, DEBUG_SUBPIXEL, DEBUG_X, DEBUG_Y, hdr, HDR, hdrPixels, height, image, imageUpdateDistance, imageUpdateRate, lineState, maxValue, monitor, observer, originalScene, RAYPROCESSOR, REMOVE_OUTLIERS, removeOutliers, renderedLines, rgbaPixels, seed, SEED, THREAD_COUNT, threadCount, width
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateLocalSolver
(boolean sameThread) protected void
dispose
(PartialTask task) This method is invoked when an active solver is removed or invokesTask.partialTaskDone(Solver)
in order to tell this task that the partial task of the solver is no longer processed.protected boolean
done()
Returnstrue
iff the complete task has been solved.float
getFirstStageImageValue
(int x, int y) float[]
getPixelsForLine2Vertex
(Environment env, Point3d vertex) void
increaseNotMutatedPixels
(int count) void
initialize
(Options opts, ProgressMonitor progress) Initializes the renderer.void
protected PartialTask
nextPartialTask
(int solverIndex) This method returns the next partial task for this task.void
render
(Scene scene, Sensor camera, Matrix4d cameraTransformation, int width, int height, ImageObserver obs) Renders an image of ascene
.protected void
renderMLT
(Antialiasing antialiasing, int mutatedPixPerProc, int solverNo, PixelwiseRenderer.Result res) void
stop()
This method is invoked in order to stop the computation of this task.Methods inherited from class de.grogra.ray2.tracing.PixelwiseRenderer
getAdjustFactor, getAutoAdjust, getBooleanOption, getBrightness, getCamera, getCameraTransformation, getClassOption, getNumericOption, getScene, getSeed, luminance, removeOutliers, renderLines, setAntialiasing, setAutoAdjust, setAutoAdjustMaxValue, setBrightness, setHDR, setMessage, setThreadCount, toIntColor, toRGBA
Methods inherited from class de.grogra.task.Task
addSolver, finishSolve, getSolverCount, getSolvers, isSolving, isStopped, partialTaskDone, prepareSolve, removeSolver, removeSolvers, solve
-
Field Details
-
INITIAL_COUNT
- See Also:
-
SEED_COUNT
- See Also:
-
MUTATION_PP_COUNT
- See Also:
-
FIRST_STAGE
public static final int FIRST_STAGE- See Also:
-
SECOND_STAGE
public static final int SECOND_STAGE- See Also:
-
pixelChangeArray
protected int[] pixelChangeArray -
initialCount
public static int initialCount -
seedPathCount
public static int seedPathCount -
mutationPPCount
public static int mutationPPCount -
mutatedPixPerProc
public int mutatedPixPerProc -
solverCount
public int solverCount -
notMutatedPixelsLeft
public int notMutatedPixelsLeft -
twoStage_Ref
public static boolean twoStage_Ref -
directLightning_Ref
public static boolean directLightning_Ref -
expectedValues_Ref
public static boolean expectedValues_Ref -
importanceSampling_Ref
public static boolean importanceSampling_Ref -
actRenderingStage
public static int actRenderingStage -
firstStageImage
-
firstStageRgbaPixels
protected int[] firstStageRgbaPixels -
firstStageHdrPixels
protected float[][] firstStageHdrPixels -
firstStageBrightestValue
-
firstStageDarkestValue
-
firstStageAverageValue
-
testimageCorrectionFactor
protected static float testimageCorrectionFactor -
testimageMutperPix
public static int testimageMutperPix -
rnd
-
-
Constructor Details
-
MetropolisRenderer
public MetropolisRenderer()
-
-
Method Details
-
stop
public void stop()Description copied from class:Task
This method is invoked in order to stop the computation of this task. -
initialize
Description copied from interface:Renderer
Initializes the renderer. This method has to be invoked at first.- Specified by:
initialize
in interfaceRenderer
- Overrides:
initialize
in classPixelwiseRenderer
- Parameters:
opts
- options to use (may benull
)progress
- monitor to display rendering progress (may benull
)
-
render
public void render(Scene scene, Sensor camera, Matrix4d cameraTransformation, int width, int height, ImageObserver obs) Description copied from interface:Renderer
Renders an image of ascene
.- Specified by:
render
in interfaceRenderer
- Overrides:
render
in classPixelwiseRenderer
- Parameters:
scene
- scene to rendercamera
- camera to usecameraTransformation
- transformation from camera coordinates to world coordinateswidth
- width of imageheight
- height of imageobs
- the observer receives the image data
-
createLocalSolver
- Overrides:
createLocalSolver
in classPixelwiseRenderer
-
nextPartialTask
Description copied from class:Task
This method returns the next partial task for this task. If all parts of the task have been solved or currently are being solved,null
is returned. However, a later invocation may return a partial task if a currently active solver does not completely solve its partial task.- Overrides:
nextPartialTask
in classPixelwiseRenderer
- Parameters:
solverIndex
- index of solver which will be used for next task- Returns:
- next partial task, or
null
-
dispose
Description copied from class:Task
This method is invoked when an active solver is removed or invokesTask.partialTaskDone(Solver)
in order to tell this task that the partial task of the solver is no longer processed. Note that the solver may not have completely processed its partial task.- Overrides:
dispose
in classPixelwiseRenderer
- Parameters:
task
- partial task which is no longer processed
-
increaseNotMutatedPixels
public void increaseNotMutatedPixels(int count) -
done
protected boolean done()Description copied from class:Task
Returnstrue
iff the complete task has been solved.- Overrides:
done
in classPixelwiseRenderer
- Returns:
- has the task been solved?
-
renderMLT
protected void renderMLT(Antialiasing antialiasing, int mutatedPixPerProc, int solverNo, PixelwiseRenderer.Result res) -
merge
- Overrides:
merge
in classPixelwiseRenderer
-
getPixelsForLine2Vertex
-
getFirstStageImageValue
public float getFirstStageImageValue(int x, int y)
-