Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: multi-attribute unstructured queries? #22

Open
timsandstrom opened this issue Jan 8, 2024 · 3 comments
Open

question: multi-attribute unstructured queries? #22

timsandstrom opened this issue Jan 8, 2024 · 3 comments

Comments

@timsandstrom
Copy link

timsandstrom commented Jan 8, 2024

I hope my nomenclature is correct....

I'm wondering if there will be support for sampling vec3f on an unstrctured volume similar to structured....
[I know this is may be hard]

i.e. vec3f v = VKLUnstructuredVolume_sample(...)

We could use this, for example, to sample a vector field, useful for particle advection in unstructured volumes...

Otherwise, it seems like we'd have to create a volume/sampler for each component... could be expensive for us memorywise...

I do see some internal use of with particle sampling but nothing exposed by the api... any hope?

Thanks in advance for help/suggestions, openvkl/ospray remains fairly essential for our group.
-Tim

// sample (multiple attributes)
unsigned int M = 3;
unsigned int attributeIndices[] = {0, 1, 2};
float samples[3];
vklComputeSampleM(&sampler, &coord, samples, M, attributeIndices, time);
printf("\tsampling (multiple attributes)\n");
printf("\t\tsamples = %f %f %f\n\n", samples[0], samples[1], samples[2]);

@gregjohnson
Copy link
Contributor

Hi Tim,
You're correct that unstructured volumes do not support multiple attributes as some of the other volume types do (e.g. structured regular volumes). So, unfortunately the only solution now is to create / sample separate volumes for each vec3f component -- which I know is inefficient in multiple ways.

We don't have multi-attribute support for unstructured volumes planned at this point, which means we won't be able to address it this quarter.

@timsandstrom
Copy link
Author

Hey Greg, thanks for the reply and the continued support.

I'm working on calling ispc from c++, manually walking the bvh, using the cell-weights to interpolate vec3fa's at the nodes...

-Tim

@gregjohnson
Copy link
Contributor

Thanks Tim, and sorry we're not able to more fully support this right now. If you have questions, definitely let us know -- we can also schedule a meeting to go over code questions, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants