# Shading one variable with the values of another (volume rendering)

**URL:** https://discourse.paraview.org/t/shading-one-variable-with-the-values-of-another-volume-rendering/2838
**Category:** ParaView Support
**Created:** [October 24, 2019, 7:22pm UTC](https://discourse.paraview.org/t/shading-one-variable-with-the-values-of-another-volume-rendering/2838 "2019-10-24T19:22:57Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![leighorf](https://discourse.paraview.org/user_avatar/discourse.paraview.org/leighorf/32/2291_2.png) [@leighorf](https://discourse.paraview.org/u/leighorf)
#### Post date: [October 24, 2019, 7:22pm UTC](https://discourse.paraview.org/t/shading-one-variable-with-the-values-of-another-volume-rendering/2838/1 "2019-10-24T19:22:57Z")

</div>

Hello, new Paraview user here. I’m a long time user of VisIt and do a lot of volume rendering (I simulate tornadoes/thunderstorms). I’d like to be able to volume render one variable but color it with the values of another variable. With VisIt, in the Volume plots attributes panel at the bottom, there is an “Opacity variable” option that enables this. What I wish to do is volume render vorticity magnitude, but I want to shade it with one of the components of vorticity. Since I model tornadoes, this can show me which way things are rotating (clockwise/counter clockwise) about a vertical axis, but also show horizontal vorticity.

An example of what I want to do is here: [https://youtu.be/NHhKI0T3t78?t=152](https://youtu.be/NHhKI0T3t78?t=152)

There are “red guys” and “blue guys”. The full vorticity magnitude field is volume rendered, but I’m shading it with the vertical component, with negative (blue) indicating clockwise rotation about a vertical axis, and positive (red) indicating counterclockwise rotation.

Can Paraview do this? I’m trying to get away from CPU based volume renderers as I have a nice big fat NVIDIA GPU that needs a workout 🙂

Leigh

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 25, 2019, 6:52am UTC](https://discourse.paraview.org/t/shading-one-variable-with-the-values-of-another-volume-rendering/2838/2 "2019-10-25T06:52:33Z")

</div>

The only thing that is remotely similar in ParaView is the multi component mapping volume rendering.

> [@Volume Viz with Multi Component Color/Opacity Mapping in Paraview 5.6.0-RC2](https://discourse.paraview.org/t/volume-viz-with-multi-component-color-opacity-mapping-in-paraview-5-6-0-rc2/649):
>
> Dear all, I just saw, that the newest release of Paraview supports 2D Transfer functions for volume rendering which maps data with 2 components by applying the colormap to the first component to determine colour and the opacity function to the second colormap. However, my Impression ist, that it does not work. Under “Scalar Coloring” I switched on “Multi Components Mapping” “Map Scalars” and “Interpolate Scalars Before Mapping”. Representation is switched to “Volume” of course. Using a “Struc…

@Michael may have other ideas.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [October 25, 2019, 11:56am UTC](https://discourse.paraview.org/t/shading-one-variable-with-the-values-of-another-volume-rendering/2838/3 "2019-10-25T11:56:47Z")

</div>

For what it’s worth, making opacity mapping by a different scalar array much easier is planned for implementation next year.

---

<div class="post-metadata">

### Author: ![leighorf](https://discourse.paraview.org/user_avatar/discourse.paraview.org/leighorf/32/2291_2.png) [@leighorf](https://discourse.paraview.org/u/leighorf)
#### Post date: [October 25, 2019, 2:06pm UTC](https://discourse.paraview.org/t/shading-one-variable-with-the-values-of-another-volume-rendering/2838/4 "2019-10-25T14:06:40Z")

</div>

Cory, that’s great to know. Mathieu, I will check out your link and give it a shot. Thanks.

---

<div class="post-metadata">

### Author: ![leighorf](https://discourse.paraview.org/user_avatar/discourse.paraview.org/leighorf/32/2291_2.png) [@leighorf](https://discourse.paraview.org/u/leighorf)
#### Post date: [July 4, 2020, 6:47pm UTC](https://discourse.paraview.org/t/shading-one-variable-with-the-values-of-another-volume-rendering/2838/5 "2020-07-04T18:47:31Z")

</div>

Hello again, checking if this functionality of being able to shade one volume rendered field with another field has been implemented yet.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [July 6, 2020, 2:59pm UTC](https://discourse.paraview.org/t/shading-one-variable-with-the-values-of-another-volume-rendering/2838/6 "2020-07-06T14:59:12Z")

</div>

Hi Leigh,

Opacity mapping by a separate array was just [added](https://gitlab.kitware.com/paraview/paraview/-/merge_requests/4228) to ParaView and will be available in ParaView 5.9, due out in early September 2020.
