Re: pfMaterial
Marco Crocetta (onyx++at++datamat.it)
Mon, 13 Mar 95 16:21:19 MET
>
> I have problems understanding how to manipulate the
> material of an object. I read in a scene description
> file, which is ordered by Light sources, Materials
> and Objects. Each Object has a material tag and when
> I read an object (from an external file with LoadObj)
> and want to assign it the appropriate material.
> The pfMaterial man-page only explains how to apply
> a certain material to a GeoSet, which then could be attached
> to a Geode. But LoadObj doesn't return a Geode
> (I got the message: Performer Warning (9): pfAddGSet() geode is not a
> pfGeode). If I would use pfApplyMtl, that would apply
> this material to all the geometry in the database.
>
> So I am clueless, how to
> a) specify a material for a specific object read via LoadObj
> b) change the material once specified for such an object.
>
> Any help would be appreciated,
>
> Torsten Moeller
>
>
>
>
I don't know if this can be a little help for you but I have the same
problem in manipulating Material alpha.
What I'm trying to do now is to modify the pfuTrav routines (see Manual
pag.308) to obtain a node callback that could change the material
for each pfGeoSet under a pfGeode.
Unfortunately I didn't obtain any good result yet.
Anyway looking at the source code of trav.c could be useful to
have some good idea...
Ciao
-------------------------
Marco Crocetta
DATAMAT SpA,Rome
e-mail:onyx++at++datamat.it
-------------------------
at the source code of trav.c
This archive was generated by hypermail 2.0b2
on Mon Aug 10 1998 - 17:51:04 PDT