3D image renderer parent class More...
Inherits DD::Image::Render.
Public Member Functions | |
void | knobs (Knob_Callback) |
int | knob_changed (Knob *k) |
Op::HandlesMode | doAnyHandles (ViewerContext *ctx) |
void | build_handles (ViewerContext *) |
int | minimum_inputs () const |
int | maximum_inputs () const |
int | split_input (int) const |
const OutputContext & | inputContext (int, int, OutputContext &) const |
bool | test_input (int input, Op *op) const |
Op * | default_input (int input) const |
const char * | input_label (int input, char *buffer) const |
bool | transparency () const |
bool | ztest_enabled () const |
double | zblend_range () |
int | zblend_mode () |
virtual void | detach () |
virtual void | attach () |
Protected Types | |
enum | { kZBlendNone, kZBlendLinear, kZBlendSmooth } |
Protected Member Functions | |
RenderScene (Node *node, bool enable_mip_filter=false) | |
void | _validate (bool) |
void | _request (int x, int y, int r, int t, ChannelMask, int) |
void | initialize_span_context (Span &span) |
CameraOp * | render_camera (int sample=0) |
GeoOp * | render_geo (int sample=0) |
Matrix4 | camera_matrix (int sample=0) |
Matrix4 | projection_matrix (int sample=0) |
Protected Attributes | |
bool | uniform_distribution_ |
If true uniform distribuite the scenes over times. | |
int | stochastic_samples_ |
Number of sample for pixel to use in the stocastic reconstruction. | |
bool | output_shader_vectors |
Channel | P_channel [3] |
P(osition) vector to output. | |
Channel | N_channel [3] |
N(ormal) vector to output. |
3D image renderer parent class
void RenderScene::_validate | ( | bool | for_real | ) | [protected, virtual] |
Validate the 3D scene renderer. We construct one Scene structure per time sample. The Scene contains all primitives and lights transformed at that moment in time.
Reimplemented from DD::Image::Render.
References DD::Image::Scene::ambient, DD::Image::IopInfo::black_outside(), DD::Image::Iop::copy_info(), DD::Image::Box::h(), DD::Image::IopInfoOwner::info(), DD::Image::IopInfoOwner::info_, DD::Image::Op::input(), DD::Image::Iop::input0(), DD::Image::Scene::lights, DD::Image::Mask_All, DD::Image::Render::MB_channel, DD::Image::Box::merge(), DD::Image::Iop::merge_info(), N_channel, DD::Image::Render::output_motion_vectors, P_channel, DD::Image::Render::scenes_, DD::Image::Render::screen_bbox, DD::Image::Box::set(), DD::Image::Iop::set_out_channels(), DD::Image::Op::slowness(), and DD::Image::Box::w().
void RenderScene::_request | ( | int | x, |
int | y, | ||
int | r, | ||
int | t, | ||
ChannelMask | out_channels, | ||
int | count | ||
) | [protected, virtual] |
Request input channels from background and assign output channels.
Reimplemented from DD::Image::Render.
References DD::Image::IopInfoOwner::channels(), DD::Image::Iop::in_channels(), DD::Image::IopInfoOwner::info(), DD::Image::Iop::input0(), DD::Image::Scene::lights, DD::Image::Render::MB_channel, N_channel, DD::Image::Op::node_disabled(), DD::Image::Render::output_motion_vectors, P_channel, DD::Image::Box::r(), DD::Image::Scene::request(), DD::Image::Iop::request(), DD::Image::Render::scenes_, DD::Image::Box::t(), DD::Image::Box::x(), and DD::Image::Box::y().
CameraOp * RenderScene::render_camera | ( | int | sample = 0 | ) | [protected, virtual] |
Returns the camera attached to input 2(if available,) otherwise 0.
Reimplemented from DD::Image::Render.
References DD::Image::CameraOp::default_camera(), DD::Image::Iop::input(), DD::Image::Op::inputs(), DD::Image::Render::output_motion_vectors, and DD::Image::Op::validate().
GeoOp * RenderScene::render_geo | ( | int | sample = 0 | ) | [protected, virtual] |
Returns the GeoOp connected to input 1 for
sample.
Implements DD::Image::Render.
References DD::Image::Iop::input().
Matrix4 RenderScene::camera_matrix | ( | int | sample = 0 | ) | [protected, virtual] |
Returns the inverse camera matrix for a particular sample. This supports jittering of the camera's position around the focal_point.
Reimplemented from DD::Image::Render.
References DD::Image::Render::scenes_.
Matrix4 RenderScene::projection_matrix | ( | int | sample = 0 | ) | [protected, virtual] |
Returns the camera projection matrix for a particular sample. ARRGH! Egg makes this translate from -1..1 rather than pixels... This should be able to use CameraOp::to_format().
Reimplemented from DD::Image::Render.
References DD::Image::IopInfoOwner::info_, DD::Image::Iop::sample(), and DD::Image::Render::scenes_.
Op::HandlesMode RenderScene::doAnyHandles | ( | ViewerContext * | ctx | ) | [virtual] |
we have to shift the mode to perspective as downstream nodes will make decisions based upon that type.
Reimplemented from DD::Image::Render.
References DD::Image::ViewerContext::transform_mode(), DD::Image::VIEWER_2D, and DD::Image::VIEWER_PERSP.
void RenderScene::build_handles | ( | ViewerContext * | ctx | ) | [virtual] |
Sets 2D viewer to 3D mode to draw any geometry in the input. Adds the camera as something that should be snapped to.
Reimplemented from DD::Image::Render.
References DD::Image::ViewerContext::addCamera(), DD::Image::CameraOp::default_camera(), DD::Image::Op::EXECUTABLE, DD::Image::IopInfoOwner::format(), DD::Image::Render::get_format_matrix(), DD::Image::ValueStuffI::get_value(), DD::Image::Op::hash(), DD::Image::Op::knob(), DD::Image::CameraOp::LENS_RENDER_CAMERA, DD::Image::ViewerContext::modelmatrix, DD::Image::Op::node_input(), DD::Image::Knob::store(), DD::Image::ViewerContext::transform_mode(), DD::Image::Op::uiContext(), DD::Image::VIEWER_2D, and DD::Image::VIEWER_PERSP.
int RenderScene::split_input | ( | int | n | ) | const [virtual] |
Return how many op inputs this operator requires for the arrow the user sees numbered n.
Reimplemented from DD::Image::Op.
References DD::Image::Render::output_motion_vectors.
const OutputContext & RenderScene::inputContext | ( | int | i, |
int | j, | ||
OutputContext & | context | ||
) | const [virtual] |
Changes the time for input m for temporal sampling.
Reimplemented from DD::Image::Op.
References clamp(), DD::Image::Render::output_motion_vectors, DD::Image::Op::outputContext(), DD::Image::p_random(), DD::Image::Render::temporal_jitter_, and uniform_distribution_.