Hi all!

Ok, so i’m starting a bit on rendering geometric forms using the OSL volume shader, all pyramids in the picture are actually contained within cubes that act as sort of a domain. I also posted the code below. Have fun!

shader Pyr(

float Transp = 1,

color CLI = color(1,0,0),

output closure color CL = holdout()

){

vector Loc = vector(0,0,0);

getattribute(“object:location”,Loc);

float Pyramid = sqrt(surfacearea()*0.01
/(((Loc[2]-P[2])*(30/surfacearea()))

-distance(Loc[1],P[1])

-distance(Loc[0],P[0])))+sin(0.5)

*0.001;*

Pyramidatan(Pyramid/0.1)

Pyramid

*= sqrt(pow(Pyramid,2));*

color Final = pow(0.3pow(0.5color Final = pow(0.3

*CLI*2,3),10)

*Transp;*

Final += sqrt(sin(Pyramid2-(CLI

Final += sqrt(sin(Pyramid

*0.01)));*

CL = emission()(Final);

CL = emission()

return;

}