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

Applying materials to PathExtrude3D #6

Open
patrykkalinowski opened this issue Feb 4, 2025 · 4 comments
Open

Applying materials to PathExtrude3D #6

patrykkalinowski opened this issue Feb 4, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@patrykkalinowski
Copy link

Hi,
Thanks for building the plugin. I found it while searching for something more performant than CSGPolygon3D.

In my case, native Godot's CSGPolygon3D along Path3D works perfectly, apart from noticeable FPS hit, as my Path3D is modified every frame - therefore I cannot bake the mesh which is also regenerated every frame.

That also means that I need to apply material in real time and CSGPolygon3D allows that.

I was wondering if it's possible to add material support to your nodes, just like in CSGPolygon3D?

Best

@iiMidknightii
Copy link
Owner

If you are using the PathMesh3D or PathMultiMesh3D nodes, you can apply your material to the meshes themselves and it should work once tiled/instanced. If not, let me know.

For PathExtrude3D, for right now you can set the material_override property to your material. I can work on adding a material property that works similarly to CSGPolygon3D.

@iiMidknightii iiMidknightii added the enhancement New feature or request label Feb 7, 2025
@iiMidknightii
Copy link
Owner

@patrykkalinowski I updated the plugin to v1.2.0, which added a material property to PathExtrude3D. It should behave almost exactly like CSGPolygon3Ds material, including using the same UV space. Let me know if it works for you.

@patrykkalinowski
Copy link
Author

@iiMidknightii thanks for working on this!
I had a chance to test it out over the weekend.
Looks like UVs are working differently. I applied the same texture to CSGPolygon3D and PathExtrude3D.
I can play around with UV1 scale to tile a texture over CSGPolygon3D, but it doesn't work with PathExtrude3D. Seems like it ignores UV scale and always extends the image over the whole object.

Attaching small project to reproduce. Play around with UV1 offset and scale on both objects and you'll see the difference.

path-extrude-test.zip

@patrykkalinowski
Copy link
Author

patrykkalinowski commented Feb 17, 2025

You know what, I think I will be able to achieve most of the same with PathMesh3D. I didn't notice all mesh rotation options before. It's still not tiling exactly like I'd like to, but I'll keep experimenting.

EDIT: Nope, unfortunately can't use it. Modyfing Path3D in realtime results in PathMesh3D adding additional full sized mesh objects which causes visible jumps, while 2D mesh is smoothly extruded.

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

No branches or pull requests

2 participants