3
$\begingroup$

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.

A set of objects that rotate along their direction of travel.

$\endgroup$
  • $\begingroup$ Could you post some example images of what you want to achieve, or perhaps an illustration of a similar effect? Would this be anywhere close to what you want to accomplish? plus.google.com/u/0/+DuarteFarrajotaRamos/posts/cJM1c6NyM5b (see the "white lines" flowing inside the colored shapes part) $\endgroup$ – Duarte Farrajota Ramos Apr 25 '16 at 2:29
  • 1
    $\begingroup$ @Duarte, I've added several examples after a lot of searching. I found that many potential examples did not include the level of detail I'm hoping to achieve. Their "streams" are basic halo-like blobs without any effect to indicate real motion. I hope my references get the idea across. The curves to guide the texture stretching are not so complex as the example you provided. My curves will be simple arcs or, at most, S-shaped. As you might tell from my references, I'm hoping to use this curved-texture effect in astronomical animations. $\endgroup$ – astrogeek Apr 25 '16 at 3:53
  • $\begingroup$ I couldn't think of any solution to your problem so far, the most obvious one of using UV mapping doesn't seem to work for volumes as you already mentioned, and guessing by the amount of answers bellow there doesn't seem to be any other obvious solution. So my suggestion to you would be to drop volumetric shaders as a means to represent the streaks and model them with actual geometry. $\endgroup$ – Duarte Farrajota Ramos Apr 25 '16 at 23:13
  • $\begingroup$ Thanks for the feedback, Duarte. I notice Particle Systems have a setting for Trail Count. But this does not seem to be active for Cycles. Do you know if this is true? Is there a way to mimic that effect with Cycles? I've thought of trying it using a frame offset, but I don't know how to implement that idea. Perhaps I should submit a new question? $\endgroup$ – astrogeek Apr 26 '16 at 17:22
  • $\begingroup$ Yes, maybe try asking a new more broad or open ended question like "how can I achieve particle trail effect" or something along those lines. Maybe someone else has as a way to do that using other methods not involving volumetric textures or even particles. From your image you might be able to do that in the compositor with motion blur quite easily, but I am not a compositor master, maybe someone else can help. $\endgroup$ – Duarte Farrajota Ramos Apr 26 '16 at 17:41