Your task is to implement continuous noise function and use it for approximation of orange peel appearance:
Project 048rtmontecarlo-script (or 048rtmontecarlo) from the
grcis repository will be used as a template.
There is a form application able to select scene from a list-box, set various ray-tracing options,
super-sampling, multi-thread comutation, etc.
If you want to define R-T scene using CSharpScript, please use the
048rtmontecarlo-script project and put your scene definition into a new
.cs file (be inspired by builtin scenes in the directory data/rtscenes/).
Scripts have access to the text parameter Param: as well.
Oral description at the lecture & lab, noise function examples – texture examples, PDF slideshow about noise functions and textures.
Method Apply() modifies any data stored in an Intersection instance (after its completion using the Intersection.Complete() function). You are free to rewrite/change any data, in this case Normal and SurfaceColor are relevant. (keep the normal vector 'normalized' .. its length should be 1). Inspiration: existing texture implementation CheckerTexture.
Attention: for a couple of reasons – animation rendering and parallelization –
you have to use deterministic implementations of all algoritms (even the 'random' looking noise
functions). This can be achieved by deriving random values from (deterministic) coordinates
in 2D/3D space using appropriate hash functions.. (see the lecture).
You must use the "object space" in case of 3D coordinates. This space is attached to
individual objects and is animation-invariant. See Intersection.CoordObject.
You can use popular hashing function from cryptography or random-generator functions
from the MathSupport.RandomStatic class.
You have to take MonteCarloRT.cs file, create a new classes in it (preferred approach: general noise function[s] plus specific orange-peel texture class), use some simple shape (class Sphere) and attach a texture object to it.
See details of a orange peel: note the small red dots on the yellow backgroud and some micro bumps (able to be simulated by a normal map).
You must send the modified file MonteCarloRT.cs, optionally a couple of rendered images.
There is an option to define your scene in a CS-script file (see the 048rtmontecarlo-script project), you have to hand in a script file together with your source file. Script format: see the data/rtscenes/ directory in the repository.
Hand in the assignment until: 30. 6. 2019
Basis: 28 points, bonus points for approximation fidelity.
Visual Studio project: 048rtmontecarlo-script or 048rtmontecarlo
Modify and hand in the source file: MonteCarloRT.cs
Edit your name in the InitializeScenes() function!
Copyright (C) 2013-2019 J.Pelikán, last change: 2019-05-09 17:52:59 +0200 (Thu, 09 May 2019)