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

Need some clarifications I can't find in documentation/example #62

Closed
derekeden opened this issue Jul 14, 2021 · 14 comments
Closed

Need some clarifications I can't find in documentation/example #62

derekeden opened this issue Jul 14, 2021 · 14 comments

Comments

@derekeden
Copy link

Hi,

First I just wanted to say thank you SO much for maintaining this repo. As someone who's been dabbling with Blender for a couple years, but am used to doing model renderings in Paraview, Python and various other software, this is absolutely amazing.

I was hoping you could clarify a couple things so I can understand how to use a couple of the VTK functions in Blender. Specfically, I am trying to figure out :

vtkClipDataSet and vtkWarpScalar


For clipping, I'm just trying to figure out what I actually need to pass in here. What is ClipFunction supposed to be or are you able to give me an example?

This is what my nodes look like now:

image

I get an error that it can't do the clip without a clipping function.

My aim is to do a clip by scalar, using a function like:

Variable_Data >= -999

like in paraview:

image

Can you give me an idea how to do this?

For warp scalar, I am trying to warp the z axis of the surface by the scalar value. Like this in paraview:

image

I've tried a couple different things with the BVTK node and couldnt get it to work..

image

Are you able to give me an example how I can warp the surface by a scalar?

I tried using Custom Code by adding:

AddArray(vtk.vtkDataObject.POINT, "Surface_elevation")

and in vtkPassArrays.. also tried using a vtkArrayCalculator..

I'm honestly not that familiar with VTK itself and really don't know what I'm supposed to be giving it.

Can you point me in the right direction?

FYI I know I need to connect these to a to Blender node to create the blender mesh.. I've just screenshotted the minimum to show you what I'm trying to do.

@derekeden
Copy link
Author

I was able to figure out the vtkWarpScalar after a couple hours of going in circles :) probably not hard if I knew what I was doing..

image
image

now to work on the clipping..

@brioglade
Copy link

Could you please send the data file that I want to exercise this example you had done.Thank you very much.

@derekeden
Copy link
Author

dfs2output.vtk.005.txt

just remove the .txt from the file name, github wouldn't let me upload the file with the existing extension

@brioglade
Copy link

brioglade commented Jul 16, 2021 via email

@derekeden
Copy link
Author

derekeden commented Jul 16, 2021 via email

@brioglade
Copy link

brioglade commented Jul 16, 2021 via email

@brioglade
Copy link

brioglade commented Jul 16, 2021 via email

@derekeden
Copy link
Author

I can't see the image you posted can you try again

@brioglade
Copy link

brioglade commented Jul 17, 2021 via email

@brioglade
Copy link

brioglade commented Jul 18, 2021 via email

@tkeskita
Copy link
Owner

Quick comments: please use github web interface, it works better. For clipping see this example in the docs.

@brioglade
Copy link

brioglade commented Jul 20, 2021 via email

@derekeden derekeden reopened this Jul 20, 2021
@derekeden
Copy link
Author

derekeden commented Jul 20, 2021

sorry accidentally clicked close so had to reopen... I will test this out on both surface and volume data shortly and let you know how it works out for me... my concern is that if I use an isosurface, it will create a hollow shell with just 1 contour value. In paraview when you clip by scalar, it's like clipping everything above/below a certain value (as opposed to just one value)...and particularly for volume data, after clipping by scalar there is still internal data in the clipped mesh (i.e. you could slice the clipped mesh)..

I could be totally confusing myself, and will let you know once I've tried with some real data

@tkeskita
Copy link
Owner

@derekeden if you need to exclude some cells, you can try vtkThreshold.

@brioglade not sure what you mean? Please check the examples in the docs. Also please use github web interface when replying.

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

3 participants