Does the type of Patterns for primitives can only be used to build distribution of material?

Hi everyone,

I am learning Radiance now. With the radiance_tutorial.pdf, I learned that there are 4 basic types of primitives. I have a question about the Textures and Patterns. Do they only be used to define the distribution of material?

The second question is if we do not define the distribution of material we can use void as the modifier to define material; if we need to define the distribution of material, we need first to use one type of Textures or Patterns to define the distribution and then use the identifier of distribution to defined the material. Is my understanding correct?

Cheers,

Hao

Hi Hao,
yes, you can “stack” modifiers to e.g. modulate brightness and normals, and cut out parts from a surface. Most modifiers act as multiplicators for basis materials, or for modified materials - allowing to chain them:

void <modifierA> <modifierAName>
(...)

<modifierAName> <modifierB> <modifierBName>
(...)

<modifierBName> <basisModel> <modifiedBasisModelName>
0
0
n A1 A(..) An

<modifierA> and <modifierB> can be any of the pattern functions such as brightfunc, colorpict, texfunc etc. <basisModel> stands for one of the reflection or transmission models, such as plastic, metal, trans, … Just make sure that you end up with a plausible result, e.g. that the product of all patterns produces an average of 1 if you want to locally modulate properties rather than change the average.

One exception is the mix*-family of modifiers. These reference the underlying basis materials on the first line of their definition. So here you would blend the modified model defined above with void (may not make much sense):

void mixfunc <mixName>
4 void <modifiedBasisModelName> '0.5' rayinit.cal
0
0

I am just writing this without testing, so I hope I did not include any mistake. But in general, this works pretty well and makes Radiance very flexible. Unfortunately, not all model parameters can be modified with patterns - e.g. the roughness parameter of the basic reflection model, the index of refraction, or the parameters of participating media are fixed.

Best, Lars.

About the idea to cut out parts of a surface using mixfunc, please refer to e.g. Radiance colorpict and perforate.cal

1 Like

Hi Lars,

Thank you so much for your reply.

I understand the chain to define primitives. But what I am confused about is that the Geometry type can mainly be used to define the geometry properties, and Textures and Patterns can mainly be used to define the distribution of material like lighting sources. Am I getting it right?

Kind regards,

Hao

Geometry types are always last in the chain, and it must have exactly one material type modifying it in order to be visible. Materials can have any number of patterns and texture types modifying the material, which may appear before or after the material in the chain of modifiers.

The exception pointed out above by @Lars_O_Grobe is the mixture type, which can blend materials, patterns, textures, and other mixtures.

Hope this helps,
-Greg

Hi Greg,

Thank you so much for your reply. So what do you and @Lars_Grobe mean that:

1)Geometry types are always last in the chain
2) It must have at least one material type to modify so it can be visible
3) Materials can have any number of patterns and texture types to modify the material and it can appear before or after the material in the chain of modifiers.
4) For light sources, you can only use one of light, illum, glow and spotlight to define the material.
5) For the sun, you don’t need to define the distribution.
6) For artificial lighting source, sky and ground, you must define the distribution.
7) If you have to define the distribution, the distribution should be in the first. The order of the chain should be like: distribution-material-geometry.
8) When you need to define the distribution, you can only use one of the Textures and Patterns as the type.

Am I getting it right?

Warm regards,

Hao

Hi Hao,

Items 1-5 are correct.

Item 6 is a good recommendation, but a distribution is not required by Radiance for a light source. It’s output can be constant.

As for Item 7, the distribution modifier may come before or after the material, but the geometry must be last.

Regarding Item 8, textures are not generally useful for light sources, as they perturb the surface normal, but this may be desirable in some situations. Textures are usually used for reflective (and sometimes transmissive) surfaces.

Cheers,
-Greg

Hi Greg,

Thank you for your reply. It is very clear and helpful for understanding the primitives definition of Radicane. I appreciate it.

Best regards,

Hao