documentation updates for the height field class
parent
60ee5ad6cf
commit
55c8726dbd
Binary file not shown.
After Width: | Height: | Size: 323 KiB |
10
doc/main.bib
10
doc/main.bib
|
@ -213,6 +213,7 @@
|
|||
pages = {54--59},
|
||||
publisher = {}
|
||||
}
|
||||
|
||||
@article{Reinhard2002Photographic,
|
||||
title={Photographic tone reproduction for digital images},
|
||||
author={Reinhard, E. and Stark, M. and Shirley, P. and Ferwerda, J.},
|
||||
|
@ -222,6 +223,7 @@
|
|||
pages={267--276},
|
||||
year={2002}
|
||||
}
|
||||
|
||||
@inproceedings{Cook2007Stochastic,
|
||||
author = {Cook, Robert L. and Halstead, John and Planck, Maxwell and Ryu, David},
|
||||
title = {Stochastic simplification of aggregate detail},
|
||||
|
@ -554,3 +556,11 @@
|
|||
publisher = {ACM},
|
||||
address = {New York, NY, USA}
|
||||
}
|
||||
|
||||
@inproceedings{Tevs2008Maximum,
|
||||
author = {Art Tevs and Ivo Ihrke and Hans-Peter Seidel},
|
||||
title = {Maximum Mipmaps for Fast, Accurate, and Scalable Dynamic Height Field Rendering},
|
||||
booktitle = {Symposium on Interactive 3D Graphics and Games (i3D'08)},
|
||||
year = 2008,
|
||||
pages = {183--190}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* camera whose distortion is known. When \code{kc=0, 0}, the model
|
||||
* turns into a standard pinhole camera. The reason for creating a separate
|
||||
* plugin for this feature is that distortion involves extra overheads per ray that
|
||||
* users may not be willing to pay for if their scene doesn't use distortion.
|
||||
* users may not be willing to pay for if their scene doesn't use it.
|
||||
* The MATLAB Camera Calibration Toolbox by Jean-Yves Bouguet
|
||||
* (\url{http://www.vision.caltech.edu/bouguetj/calib_doc/}) can be used to
|
||||
* obtain a distortion model, and the first entries of the \code{kc} variable
|
||||
|
|
|
@ -60,6 +60,61 @@ namespace {
|
|||
};
|
||||
};
|
||||
|
||||
/*!\plugin{heightfield}{Height field intersection shape}
|
||||
* \order{11}
|
||||
* \parameters{
|
||||
* \parameter{shadingNormals}{\Boolean}{
|
||||
* Use linearly interpolated shading normals over the height
|
||||
* field as opposed to discontinuous normals from the underlying
|
||||
* bilinear patches? \default{\code{true}, i.e. interpolate smoothly varying normals}
|
||||
* }
|
||||
* \parameter{flipNormals}{\Boolean}{
|
||||
* Optional flag to flip all normals. \default{\code{false}, i.e.
|
||||
* the normals are left unchanged}.
|
||||
* }
|
||||
* \parameter{toWorld}{\Transform}{
|
||||
* Specifies an optional linear object-to-world transformation.
|
||||
* \default{none, i.e. object space $=$ world space}
|
||||
* }
|
||||
* \parameter{width, height}{\Integer}{
|
||||
* When the nexted texture is procedural (see below),
|
||||
* this parameter specifies the resolution at which it should
|
||||
* be rasterized to create a height field made of bilinear patches.
|
||||
* }
|
||||
* \parameter{\Unnamed}{\Texture}{
|
||||
* A nested texture that specifies the height field values. This
|
||||
* could be a bitmap-backed texture or one that is procedurally defined.
|
||||
* In the latter case, it will be rasterized using the resolution specified
|
||||
* by the \code{width} and \code{height} arguments.
|
||||
* }
|
||||
* }
|
||||
*\vspace{-2mm}
|
||||
* \renderings{
|
||||
* \rendering{Heigh field rendering of a mountain, see \lstref{heightfield-bitmap}}
|
||||
* {shape_heightfield}
|
||||
* }
|
||||
* This plugin implements an efficient height field intersection shape, i.e.
|
||||
* a two-dimensional plane that is vertically displaced using height values
|
||||
* loaded from a texture.
|
||||
* Internally, the height field is represented as a min-max mipmap
|
||||
* \cite{Tevs2008Maximum}, allowing cheap storage and efficient ray
|
||||
* intersection queries. It is generally preferable to represent
|
||||
* height fields using this specialized plugin rather than converting
|
||||
* them into triangle meshes.
|
||||
*
|
||||
* \begin{xml}[caption={Declaring a height field from a monochromatic scaled bitmap texture}, label=lst:heightfield-bitmap]
|
||||
* <shape type="heightfield">
|
||||
* <texture type="scale">
|
||||
* <float name="scale" value="0.5"/>
|
||||
* <texture type="bitmap">
|
||||
* <float name="gamma" value="1"/>
|
||||
* <string name="filename" value="mountain_profile.png"/>
|
||||
* </texture>
|
||||
* </texture>
|
||||
* </shape>
|
||||
* \end{xml}
|
||||
*/
|
||||
|
||||
class Heightfield : public Shape {
|
||||
public:
|
||||
Heightfield(const Properties &props) : Shape(props), m_data(NULL), m_normals(NULL), m_minmax(NULL) {
|
||||
|
@ -674,6 +729,6 @@ private:
|
|||
};
|
||||
|
||||
MTS_IMPLEMENT_CLASS_S(Heightfield, false, Shape)
|
||||
MTS_EXPORT_PLUGIN(Heightfield, "Height field intersection primitive");
|
||||
MTS_EXPORT_PLUGIN(Heightfield, "Height field intersection shape");
|
||||
MTS_NAMESPACE_END
|
||||
|
||||
|
|
Loading…
Reference in New Issue