Re: Re: [info-performer] pfVolume and lookup table

Date view Thread view Subject view Author view

From: Simone Herrmann (sim_her++at++web.de)
Date: 06/10/2003 05:43:33


Hi Yves,

I tried this and I could see that my volume is still existing. What can I do, that the lookup table looks like in the volumizer application?

deum <deum++at++sgi.com> schrieb am 10.06.03 12:55:18:
>
> Simone,
>
> Just try to put the full opacity on your alpha component (255 for 8
> bits, 1.0 for float)
> keeping the linear transfer function for the others RGB componants.
> Then you will be able to see if your volume is present or not.
> check also your volume is not black on black !
>
> This code can be applied (not compiled but _have_ to work).
>
> vzParameterLookupTable*
> MyObj::initLookupTable(int width)
> {
> // Initialize a LUMINANCE_ALPHA lookup table
> float* data = new float[4*width];
>
> for (int i = 0; i < width; i++) {
> data[i * 4 + 0] = Rvalue (i); // Red Transfert Function in [0..1]
> data[i * 4 + 1] = Gvalue (i); // Green Transfert Function in [0..1]
> data[i * 4 + 2] = Bvalue (i); // Red Transfert Function in [0..1]
> data[i * 4 + 3] = 1.0; // Alpha value alway as an OPAQUE transfert
> function
> }
>
> vzParameterLookupTable* table =
> new vzParameterLookupTable(width, data, VZ_FLOAT, VZ_RGBA);
>
> return table;
> }
>
> ...
>
> vzParameterLookupTable* myTable = initLookupTable(width);
>
> ...
>
> Yves
>
> Praveen Bhaniramka wrote:
>
> >Hi Simone,
> >
> >Did you define the parameter "lookup_table" appropriately for the shape's
> >appearance? You will still need to do the LUT initialization and other
> >stuff that you had mentioned in your code snippet! Do you get any errors
> >printed on the console?
> >
> >- Praveen
> >
> >On Tue, 10 Jun 2003, Simone Herrmann wrote:
> >
> >
> >
> >>Hi Praveen,
> >>
> >>I tried this and now my volume volume is not visible any more.
> >>What happened?
> >>
> >>Praveen Bhaniramka <praveenb++at++mrcoffee.engr.sgi.com> schrieb am 09.06.03 18:44:52:
> >>
> >>
> >>>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.
> >>>-----------------------------------------------------------------
> >>>
> >>>
> >>____________________________________________________________________________
> >>Jetzt bei WEB.DE FreeMail anmelden = 1qm Regenwald schuetzen! Helfen
> >>Sie mit! Nutzen Sie den Serien-Testsieger. http://user.web.de/Regenwald
> >>
> >>
> >>
> >>
> >
> >
> >
>
>
> --
>
> -- Yves DEMANGE -- S G I -- EMEA Visualization Solutions group
> -- Phone : +33 4 4210-1868 / Mobile : +33 6 8553-8264
> -- Email : deum++at++sgi.com
>
>
>
> -----------------------------------------------------------------------
> 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
> -----------------------------------------------------------------------
>

______________________________________________________________________________
UNICEF bittet um Spenden fur die Kinder im Irak! Hier online an
UNICEF spenden: https://spenden.web.de/unicef/special/?mc=021101


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Jun 10 2003 - 05:46:04 PDT