BaseVolumeData Struct Reference

#include <c4d_shader.h>

Inheritance diagram for BaseVolumeData:

Public Attributes

Int32   version
Int32   fps
向量   ambient
Float   time
向量   col
向量   trans
向量   refl
Float   alpha
Ray tray
Ray rray
Vector64   p
Vector64   bumpn
Ray ray
Vector64   orign
Vector64   n
Vector64   dispn
Float64   dist
Float64   cosc
向量   uvw
向量   delta
RayHitID   lhit
const TexData tex
向量   ddu
向量   ddv
Int32   raydepth
Int32   calc_trans
Int32   calc_refl
Bool   calc_shadow
Int32   calc_illum
Int32   calc_mip
向量   pp [3]
向量   nn [3]
RAYBIT   raybits
const RayLight xlight
const RayObject op
Int32   recursion_id
void *  recursion_data
Multipass multipass
向量   back_p
向量   back_delta
Float   global_mip
Int32   sid
Float   par_u
Float   par_v
SurfaceIntersection intersection
Float   mb_offset
向量   comp_color
向量   comp_specular
向量   comp_luminance
TexEntry *  rtex [4]
Int32   rtex_count
Int32   elementIndex
const RayPolyWeight displacementWeight

Protected Member Functions

  BaseVolumeData ()

构造函数 & 析构函数文档编制

◆  BaseVolumeData()

BaseVolumeData ( )
protected

Member Data Documentation

◆  version

Int32 version

[READ ONLY] The version number of the structure.

◆  fps

Int32 fps

[READ ONLY] The frames per second.

◆  ambient

向量 ambient

[READ ONLY] The global ambient component.

◆  time

Float time

[READ ONLY] The current time in seconds.

◆  col

向量 col

[READ WRITE] Set the calculated color within MaterialData::CalcSurface() and MaterialData::CalcVolumetric() .

◆  trans

向量 trans

[READ WRITE] Set the calculated transparency within MaterialData::CalcSurface() , MaterialData::CalcTransparency() and MaterialData::CalcVolumetric() .

◆  refl

向量 refl

[READ WRITE] Set the calculated reflection within MaterialData::CalcSurface() .

◆  alpha

Float alpha

[READ WRITE] Set the calculated alpha within MaterialData::CalcAlpha() .

◆  tray

Ray * tray

[READ WRITE] The transmitted vector (can be modified in MaterialData::ChangeNormal() ), only valid if shader sets VOLUMEINFO::TRANSPARENCY and only during MaterialData::CalcSurface() .

◆  rray

Ray * rray

[READ WRITE] The reflected vector (can be modified in MaterialData::ChangeNormal() ), only valid if shader sets VOLUMEINFO::REFLECTION and only during MaterialData::CalcSurface() .

◆  p

Vector64 p

[READ WRITE] The surface point, this can only be modified by MaterialData::Displace() .

◆  bumpn

Vector64 bumpn

[READ WRITE] The surface phong and bump normal.

◆  ray

Ray * ray

[READ ONLY] The current eye ray. Always valid, not nullptr .

◆  orign

Vector64 orign

[READ ONLY] The original surface normal.

◆  n

Vector64 n

[READ ONLY] The surface phong normal.

◆  dispn

Vector64 dispn

[READ ONLY] The suggested displacement direction.

◆  dist

Float64 dist

[READ ONLY] The distance between p and ray->p , i.e. the ray length.

◆  cosc

Float64 cosc

[READ ONLY] The angle between ray vector and unbumped normal.

◆  uvw

向量 uvw

[READ ONLY] The surface UVW coordinates, this is invalid for volumetric shaders.

◆  delta

向量 delta

[READ ONLY] The MIP sample radius. Defines the radius for the area around UVW that needs to be sampled.
If this value is ignored by a shader, it will work, but produce aliasing artefacts.

◆  lhit

RayHitID lhit

[READ ONLY] The surface identity.

◆  tex

const TexData * tex

[READ ONLY] The surface texture, never change this pointer.

◆  ddu

向量 ddu

[READ ONLY] U direction vector perpendicular to n ; can be used for bump mapping if VOLUMEINFO::DUDVREQUIRED is set.

◆  ddv

向量 ddv

[READ ONLY] V direction vector perpendicular to n ; can be used for bump mapping if VOLUMEINFO::DUDVREQUIRED is set.

◆  raydepth

Int32 raydepth

[READ ONLY] The depth of the actual ray.

注意
0 during shadow calculation.

◆  calc_trans

Int32 calc_trans

[READ ONLY] Specifies if transparency will be rendered:

◆  calc_refl

Int32 calc_refl

[READ ONLY] Specifies if reflections will be rendered:

◆  calc_shadow

Bool calc_shadow

[READ ONLY] Specifies, if shadows will be rendered.

◆  calc_illum

Int32 calc_illum

[READ ONLY] Specifies, if illumination will be rendered.
If this value is 0 then VolumeData::CalcSurface() should directly return the surface color without illumination (also, no bump mapping is needed in VolumeData::ChangeNormal() etc.). This technique is used for some types of objects like the sky. Illuminance1 automatically takes care of calc_illum .

◆  calc_mip

Int32 calc_mip

[READ ONLY] Specifies if MIP calculations will be done.
If this value is 0 then no MIP mapping needs to be calculated. calc_mip can in some cases be false, even if the shader sets VOLUMEINFO::MIPSAT.
calc_mip is false you should not access MIP/SAT variables such as delta etc.

◆  pp

向量 pp[3]

[READ ONLY] MIP corner points in global space.

注意
Only valid if VOLUMEINFO::MIPSAT is set.

◆  nn

向量 nn[3]

[READ ONLY] MIP normals of the three other corner points.

注意
Only valid if VOLUMEINFO::MIPSAT is set.

◆  raybits

RAYBIT raybits

[READ ONLY] The ray information: RAYBIT

◆  xlight

const RayLight * xlight

The light source during shadow evaluation. Can be nullptr , always check.

◆  op

const RayObject * op

The object. Can be nullptr , always check.

◆  recursion_id

Int32 recursion_id

[READ WRITE] The plugin ID of data passed through recursion.

◆  recursion_data

void* recursion_data

[READ WRITE] The address of data passed through recursion.

◆  multipass

Multipass * multipass

[READ WRITE] To be filled for multipasses.

◆  back_p

向量 back_p

[READ ONLY] The back-projected point ( StickTextureTag ) will be generated if the shader sets the flag VOLUMEINFO::TRANSFORM or SHADERINFO::TRANSFORM for a channel shader.

◆  back_delta

向量 back_delta

[READ ONLY] This the 'spot size' (MIP mapping value) for the back-projected point.
The back-projected point ( StickTextureTag ) will be generated if the shader sets the flag VOLUMEINFO::TRANSFORM (或 SHADERINFO::TRANSFORM if it is a channel shader).

◆  global_mip

Float global_mip

[READ ONLY] The global MIP scale.

◆  sid

Int32 sid

[READ ONLY] Sub-polygon ID (only used for SPD).

◆  par_u

Float par_u

[READ ONLY] Barycentric U coordinate (only used for SPD).

◆  par_v

Float par_v

[READ ONLY] Barycentric U coordinate (only used for SPD).

◆  intersection

SurfaceIntersection * intersection

[READ ONLY] The intersection data. Can be nullptr , always check.

◆  mb_offset

Float mb_offset

[READ ONLY] The motion blur time offset. (Between 0.0 and 1.0 , only valid in Physical Render.)

◆  comp_color

向量 comp_color

[READ WRITE] The diffuse component of the calculated color.

◆  comp_specular

向量 comp_specular

[READ WRITE] The specular component of the calculated color.

◆  comp_luminance

向量 comp_luminance

[READ WRITE] The luminance component of the calculated color.

◆  rtex

TexEntry* rtex[4]

[READ ONLY] Internal . The reflection textures.

由于
R16

◆  rtex_count

Int32 rtex_count

[READ ONLY] Internal . The number of reflection textures in rtex .

由于
R16

◆  elementIndex

Int32 elementIndex

[READ ONLY] Internal . Stores the index of the currently rendering hair. May be extended to other object types eventually.

由于
R19

◆  displacementWeight

const RayPolyWeight * displacementWeight

[READ ONLY] Private.