GetSurfaceData

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 22/09/2011 at 14:12, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   12 
Platform:      Mac OSX  ; 
Language(s) :     C++  ;

---------
This doesn't seem to work in the SimpleSurface example:

SurfaceData aSurfaceData;
SurfaceIntersection aSurfaceIntersection;
aSurfaceIntersection.op = vd->op;
aSurfaceIntersection.id = vd->lhit;
aSurfaceIntersection.p = vd->p;
aSurfaceIntersection.n = vd->n;
aSurfaceIntersection.sid = vd->sid;
aSurfaceIntersection.par_u = vd->par_u;
aSurfaceIntersection.par_v = vd->par_v;

vd->GetSurfaceData( &aSurfaceData, TRUE, TRUE, TRUE, TRUE, vd->ray, aSurfaceIntersection );

vd->col = aSurfaceData.col;
vd->trans = Vector(0.0);

The sample is opaque but the color is always black?

noel

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 24/09/2011 at 10:47, xxxxxxxx wrote:

Hy there,

which example are you relating to? I didn't spot a SimpleSurface in my R12 examples ...

Cheers,
maxx

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/09/2011 at 06:28, xxxxxxxx wrote:

It can't work. You are sampling the object that has the plugin material applied. What are you trying to achieve?

cheers,
Matthias