Anyone know why this is happening

0 like 0 dislike

I'm trying to find out what surface type is below each particle and while reading I found that popcorn has a function called scene.unpackSceneSureface(). Now as shown in the image below for some reason I get an error when using it as shown in the documentation, the same issue comes from scene.unpackSceneDist(). However, scene.unpackNormal() works fine. So my question is does anyone know what I'm doing wrong or if I'm missing something? 

asked Aug 21, 2017 by Jamesking96 (760 points)

1 Answer

1 like 0 dislike
Best answer


this is an error in the documentation, it's now been fixed.
The proper functions to use are:

float3 nml = scene.unpackNormal(hit);
float sd = scene.unpackDist(hit);
int st = scene.unpackSurfaceType(hit);

Thanks for the report !

answered Aug 21, 2017 by Julien (31,050 points)

Thanks for letting me know about this. However, Even with this change, I'm getting the same error. Any other ideas as to why this is happening?

Error message:
        Error: L_14: Unresolved symbol: "unpackSurface(1)"

function void    Eval()
    int4 hit = scene.intersectExt(
        Position, //StartPoint
    float3 nml = scene.unpackNormal(hit);
    int st = scene.unpackSurface(hit);

Edit: The issue only happens with scene.unpackSurface()
damn, my bad, it's 'unpackSurfaceType', not 'unpackSurface'. reply updated.
Thank you for your help <3