I need a Cycles volumetric material that appears to flow along a curved path. Specifically, I would like to stretch a texture along the direction of motion to mimic streamlines in fluid flow. I seem to keep running into the same problem: texture coordinates don't bend.
I originally wanted to model the flow with a particle system affected by a Force Field. While the particles (and their Object Instances) can be made to rotate to point in the direction of motion, the Object Texture coordinates remain constant for the lifetime of the particles.
I also tried mimicking the appearance with a beveled Curve and ticking the "Use UV for mapping" option, but UV coordinates do not support volumetric textures. That is, all coordinates are zero for all locations along and within the Curve shape.
I'm willing to try any method at this point, but utilizing the Compositor could be a problem given the complexity of the scene.
Two potential solutions come to mind but I don't know how to implement them:
- Perhaps I'm missing a setting that allows Instances to retain their rotated coordinates?
- Generating the UV coordinates of a Curve and using Drivers or some other method (Python? OSL?) to apply them to the volumetric texture to stretch it along the tangent of the Curve.
Any other methods that could work? Even methods restricted to 2 dimensions are welcome.
A couple of reference images:
- Io's volcanic plumes The plume is made of multiple curves, each erupted from the volcano in a different direction.
- NASA illustration of streamers This effect is likely created with Photoshop or GIMP. Focus your attention on the way the texture bends along each "streamer".
Here is an OpenGL render I did with a stretched cube using a Particle Instance modifier. The particles bend along a path controlled by a Force Field. The effect I'm hoping to achieve would have the texture stretched along the long axes of these thin objects.