java.lang.Object
de.grogra.task.Task
de.grogra.ray2.tracing.PixelwiseRenderer
de.grogra.ray2.tracing.MetropolisRenderer
- All Implemented Interfaces:
Renderer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from class de.grogra.ray2.tracing.PixelwiseRenderer
PixelwiseRenderer.RenderTask, PixelwiseRenderer.Result -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic booleanstatic booleanstatic final intprotected Color4fprotected Color4fprotected Color4fprotected float[][]protected BufferedImageprotected int[]static booleanstatic final Stringstatic intintstatic final Stringstatic intintprotected int[]protected MTRandomstatic final intstatic final Stringstatic intintprotected static floatstatic intstatic booleanFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateLocalSolver(boolean sameThread) protected voiddispose(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 booleandone()Returnstrueiff the complete task has been solved.floatgetFirstStageImageValue(int x, int y) float[]getPixelsForLine2Vertex(Environment env, Point3d vertex) voidincreaseNotMutatedPixels(int count) voidinitialize(Options opts, ProgressMonitor progress) Initializes the renderer.voidprotected PartialTasknextPartialTask(int solverIndex) This method returns the next partial task for this task.voidrender(Scene scene, Sensor camera, Matrix4d cameraTransformation, int width, int height, ImageObserver obs) Renders an image of ascene.protected voidrenderMLT(Antialiasing antialiasing, int mutatedPixPerProc, int solverNo, PixelwiseRenderer.Result res) voidstop()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, toRGBAMethods 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:TaskThis method is invoked in order to stop the computation of this task. -
initialize
Description copied from interface:RendererInitializes the renderer. This method has to be invoked at first.- Specified by:
initializein interfaceRenderer- Overrides:
initializein 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:RendererRenders an image of ascene.- Specified by:
renderin interfaceRenderer- Overrides:
renderin 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:
createLocalSolverin classPixelwiseRenderer
-
nextPartialTask
Description copied from class:TaskThis method returns the next partial task for this task. If all parts of the task have been solved or currently are being solved,nullis returned. However, a later invocation may return a partial task if a currently active solver does not completely solve its partial task.- Overrides:
nextPartialTaskin classPixelwiseRenderer- Parameters:
solverIndex- index of solver which will be used for next task- Returns:
- next partial task, or
null
-
dispose
Description copied from class:TaskThis 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:
disposein classPixelwiseRenderer- Parameters:
task- partial task which is no longer processed
-
increaseNotMutatedPixels
public void increaseNotMutatedPixels(int count) -
done
protected boolean done()Description copied from class:TaskReturnstrueiff the complete task has been solved.- Overrides:
donein classPixelwiseRenderer- Returns:
- has the task been solved?
-
renderMLT
protected void renderMLT(Antialiasing antialiasing, int mutatedPixPerProc, int solverNo, PixelwiseRenderer.Result res) -
merge
- Overrides:
mergein classPixelwiseRenderer
-
getPixelsForLine2Vertex
-
getFirstStageImageValue
public float getFirstStageImageValue(int x, int y)
-