BaseVolumeData Struct Reference

#include <c4d_shader.h>

Inheritance diagram for BaseVolumeData:

Public Attributes

Int32 version
 
Int32 fps
 
Vector ambient
 
Float time
 
Vector col
 
Vector trans
 
Vector refl
 
Float alpha
 
Raytray
 
Rayrray
 
Vector64 p
 
Vector64 bumpn
 
Rayray
 
Vector64 orign
 
Vector64 n
 
Vector64 dispn
 
Float64 dist
 
Float64 cosc
 
Vector uvw
 
Vector delta
 
RayHitID lhit
 
const TexDatatex
 
Vector ddu
 
Vector ddv
 
Int32 raydepth
 
Int32 calc_trans
 
Int32 calc_refl
 
Bool calc_shadow
 
Int32 calc_illum
 
Int32 calc_mip
 
Vector pp [3]
 
Vector nn [3]
 
RAYBIT raybits
 
const RayLightxlight
 
const RayObjectop
 
Int32 recursion_id
 
void * recursion_data
 
Multipassmultipass
 
Vector back_p
 
Vector back_delta
 
Float global_mip
 
Int32 sid
 
Float par_u
 
Float par_v
 
SurfaceIntersectionintersection
 
Float mb_offset
 
Vector comp_color
 
Vector comp_specular
 
Vector comp_luminance
 
TexEntry * rtex [4]
 
Int32 rtex_count
 
Int32 elementIndex
 
const RayPolyWeightdisplacementWeight
 

Protected Member Functions

 BaseVolumeData ()
 

Constructor & Destructor Documentation

◆ 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

Vector ambient

[READ ONLY] The global ambient component.

◆ time

Float time

[READ ONLY] The current time in seconds.

◆ col

Vector col

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

◆ trans

Vector trans

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

◆ refl

Vector 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

[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

[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

Vector uvw

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

◆ delta

Vector 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

Vector ddu

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

◆ ddv

Vector 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.

Note
0 during shadow calculation.

◆ calc_trans

Int32 calc_trans

[READ ONLY] Specifies if transparency will be rendered:

  • 0 No transparency.
  • 1 No refractions.
  • 2 Full calculation.

◆ calc_refl

Int32 calc_refl

[READ ONLY] Specifies if reflections will be rendered:

  • 0 No reflection.
  • 1 Only sky/floor.
  • 2 Full calculation.

◆ 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::
If calc_mip is false you should not access MIP/SAT variables such as delta etc.

◆ pp

Vector pp[3]

[READ ONLY] MIP corner points in global space.

Note
Only valid if VOLUMEINFO::MIPSAT is set.

◆ nn

Vector nn[3]

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

Note
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

Vector 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

Vector 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 (or 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

Vector comp_color

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

◆ comp_specular

Vector comp_specular

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

◆ comp_luminance

Vector comp_luminance

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

◆ rtex

TexEntry* rtex[4]

[READ ONLY] Internal. The reflection textures.

Since
R16

◆ rtex_count

Int32 rtex_count

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

Since
R16

◆ elementIndex

Int32 elementIndex

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

Since
R19

◆ displacementWeight

const RayPolyWeight* displacementWeight

[READ ONLY] Private.