Re: [info-performer] pfVolume and lookup table

Date view Thread view Subject view Author view

From: Praveen Bhaniramka (praveenb++at++mrcoffee.engr.sgi.com)
Date: 06/09/2003 09:44:27


Hi Simone,

The various parameters attached to the shape's appearance are used by the
shader, which uses them to do the actual shading (in your case applying a
lookup table). So, adding new parameters will only have any effect if the
corresponding shader _uses_ these parameters.

In short, update the shader for the shape's appearance to use the
TMLUTShader, which would then apply the lookup table.

vzTMLUTShader *newShader = new vzTMLUTShader();
vol->getShape()->getAppearance()->setShader(newShader);

Cheers,
Praveen

On Mon, 9 Jun 2003, Simone Herrmann wrote:

> Hi,
>
> How can I apply a lookup table to a volume in the pfVolume node?
>
> I tried:
>
> vzParameterLookupTable* myTable = myLoadLookupTable();
>
> pfVolume* vol = new pfVolume;
> vol->readFile("myVolume.vz");
> vol->getShape()->getAppearance()->setParameter("lookup_table", myTable);
>
> but the image still remains uncoloured.
>
> Thanks,
> Simone
> ______________________________________________________________________________
> UNICEF bittet um Spenden fur die Kinder im Irak! Hier online an
> UNICEF spenden: https://spenden.web.de/unicef/special/?mc=021101
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
>
>

-- 
-----------------------------------------------------------------
Praveen Bhaniramka               Member of Technical Staff (MTS)
praveenb++at++sgi.com                 Advanced Graphics Division
(650)933-1785                    Silicon Graphics, Inc.
-----------------------------------------------------------------


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Jun 09 2003 - 09:45:53 PDT