Obj file and custom per vertex data
Asked Answered
B

1

0

Hi,

I think what i want to do is quite easy, but i'm still stuck...
I want (with gdscript) to load a mesh in my scene (actually an obj, but i Can change this to gltf if it's help) and add per vertex data (xyz velocity) load from a txt file.
My data (obj and txt) have been generated with paraview, so vertex information are in the same order in both files.
I easily make the fonction to read my txt file and i have been able to load my obj and add it to my 3dmeshinstance.
But i cannot find the way to add an array_custom to my mesh to use per vertex data intro my shader.

Actually i have a plane.mesh = imported_obj and customvel in PackedFloat32Array() will all the value already filles.

Thanks for any help/leads
(Godot 4.2.1)

Barricade answered 11/2, 2024 at 13:52 Comment(0)
B
0

Barricade
I find a way... If need for someone else

I just copy my surface array then clean it, update custom0 and regenarate the surface.

I doesn't need to do it very often, it's only to visualize CFD results, so the user Can wait few seconds before screen update.

Pehaps i Can only update custom0, but i doesn't find how to do this

Barricade answered 22/2, 2024 at 7:36 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.