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

Feature: write shapefile fields to mesh attributes for access from Geometry/Shader Nodes #804

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SerLinkzero
Copy link

This PR add a feature to write attributes from shapefiles to mesh points, edges or faces, depending on the feature type.

This feature will allow access to the attributes from Geometry Nodes (with Named Attribute node) and Shader Nodes (with Attribute node), and facilitates data-based motion graphics and visualization.

Due to the limitation of mesh attribute data types, only float or integer fields will be written.

The PR also includes two utility options:

  1. An option to allow converting dates to float values, in a format that the integer part indicates the year, and the fractional part indicates the ratio of the day in a year, e.g. 2023-06-30 will be converted to 2023.4958904109589041. This allow users to create time-based animation easier.
  2. An option to map NULL to a user-specified no-data value. Since mesh attributes in Blender cannot be null, this allow users to specify an unlikely value in the dataset and remove features accordingly.

image

The attached video shows an example where the features are animated and stylized with a date field written to the faces.

2023-08-06.00-03-26.mp4

@rjgarnicap
Copy link

Question, how did you use geometry nodes, I've tried but alway crash blender.Thank you

@SerLinkzero
Copy link
Author

Question, how did you use geometry nodes, I've tried but alway crash blender.Thank you

Is the crashes related to this PR, i.e. crashing only on the branched plugin, but not in the master?

If so, it would be helpful if you could provide more detailed information, such as a sample of the shapefile, and the steps to reproduce the issue, 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

Successfully merging this pull request may close these issues.

2 participants