# Lighting effects when using rgba component volumes with vr

**URL:** https://discourse.vtk.org/t/lighting-effects-when-using-rgba-component-volumes-with-vr/12362
**Category:** Web
**Tags:** code
**Created:** [September 26, 2023, 3:08pm UTC](https://discourse.vtk.org/t/lighting-effects-when-using-rgba-component-volumes-with-vr/12362 "2023-09-26T15:08:45Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![JohnSkinner](https://discourse.vtk.org/user_avatar/discourse.vtk.org/johnskinner/32/6197_2.png) [@JohnSkinner](https://discourse.vtk.org/u/JohnSkinner)
#### Post date: [September 26, 2023, 6:50pm UTC](https://discourse.vtk.org/t/lighting-effects-when-using-rgba-component-volumes-with-vr/12362/5 "2023-09-26T18:50:09Z")

</div>

I’m looking at this case to see if it helps me.

> [@Color Volume Rendering: vtkDataArray Indexing](https://discourse.vtk.org/t/color-volume-rendering-vtkdataarray-indexing/5695):
>
> I’m trying to do a color volume rendering for a 3D segmentation that has RGB values. To have a color image, I started by drawing a Red box, for some reason I’m not able to get a color volume rendering of it at all. My questions is what is the order of RGB in the vtkDataArray? is it [R,G,B,R,G,B, …] ? To create a full red box, my code is: const numComponents = 3; const scalarData = new Float32Array( dimensions[0] \* dimensions[1] \* dimensions[2] \* numComponents ); const yStride = dimen…

---

_[View the full topic](https://discourse.vtk.org/t/lighting-effects-when-using-rgba-component-volumes-with-vr/12362)._
