Does anyone have experience using a Python script to compute volumetric density for an arbitrary mathematical function?
I’ve build a Node Tree to create a Gaussian density distribution (density = constant * exp(-r^2)) for a cube filled with volumetric emission material in Cycles. It works just fine, but it’s a rather indirect way to do something in a few lines of code. I’ve attached the .blend if you care to look. I haven’t gone to the trouble of making a custom node group, but that would be my next step if I continued with the Node route.
density-calculation.blend (464 KB)