TH3 as color boxes - (TGLVoxelPainter)

Dear Rooters,

we are using the option GLCOL with TH3 (see att). The trapezoid with its
colored surfaces however is nearly hidden by the violet “background”.
Is there a way to get this “background” white / transparent.
I already tried other colormaps ( e.g. grey levels: minimum = white, maximum = black)
I also add the root file with the 3d hist and the 6 2d hists representing the surfaces of
the trapezoid.

Cheers
Otto
Sim.root (142 KB)


[quote=“Otto Schaile”]Dear Rooters,

we are using the option GLCOL with TH3 (see att). The trapezoid with its
colored surfaces however is nearly hidden by the violet “background”.
Is there a way to get this “background” white / transparent.
I already tried other colormaps ( e.g. grey levels: minimum = white, maximum = black)
I also add the root file with the 3d hist and the 6 2d hists representing the surfaces of
the trapezoid.

Cheers
Otto[/quote]

Hello. You can use a “transfer function”, to make these boxes fully transparent.
Or you can set them to zero in a histogram :slight_smile:

Do you think, you can reliably identify bins, which should be transparent? (I mean, do they have a value, which is really different from bins in a trapezoid?)

Hello,
thank you for the answer, however I am afraid I dont understand it.

  • How can I set a “transfer function”? Is it a method of TH3, THistPainter?
  • The bins in the 3d hist not belonging to the trapezoid have already content zero, i.e. “are not filled”

I admit that using GL directly whould be more appropriate. A 3d hist seems a much more lazy way.

Cheers
Otto.Schaile@lmu.de

[quote=“Otto Schaile”]Hello,
thank you for the answer, however I am afraid I dont understand it.

  • How can I set a “transfer function”? Is it a method of TH3, THistPainter?
  • The bins in the 3d hist not belonging to the trapezoid have already content zero, i.e. “are not filled”

I admit that using GL directly whould be more appropriate. A 3d hist seems a much more lazy way.

Cheers
Otto.Schaile@lmu.de[/quote]

Have a look at $ROOTSYS/tutorials/gl/glvox2.C, it uses transfer function.