|
|
|
 |
Reply From: |
klaas |
Hi,
no, you cant. Godot only allows 1 set of vertex colors.
This is of what a Godot mesh is made of:
ARRAY_VERTEX = 0 — Array of vertices.
ARRAY_NORMAL = 1 — Array of normals.
ARRAY_TANGENT = 2 — Array of tangents as an array of floats, 4 floats per tangent.
ARRAY_COLOR = 3 — Array of colors.
ARRAY_TEX_UV = 4 — Array of UV coordinates.
ARRAY_TEX_UV2 = 5 — Array of second set of UV coordinates.
ARRAY_BONES = 6 — Array of bone data.
ARRAY_WEIGHTS = 7 — Array of weights.
ARRAY_INDEX = 8 — Array of indices.
you see … two sets of uv data only one color
And no, you cant change or customize that, its a core component of the engine.
You can allways store additional data into textures. Blender also can bake into textures, so maybe this is your way to go.
Huh… well that sucks. Thank you for the informative answer though! XD
I’m going for a very specific, N64-esque styling, where a single texture is multiplied over a vertex color. The idea was to have separate sets of vertex colors for times of day, such as day and night, and interpolating between the two sets to forego realtime lighting altogether. For that reason I’d rather avoid having to bake in and include separate lighting textures and UVs.
I wonder if it’s possible to export two versions of the same mesh, each with its own set of unique vertex colors, and use a shader on one to draw from the color data from the other? Though I’m not sure if there’s a way to access a separate mesh in the shader of another…
Gubbles | 2020-09-24 17:48
Hi
possible to export two versions of the same mesh, each with its own set of unique vertex colors, and use a shader on one to draw from the color data from the other?
No thats not possible
I suggest what you want is vertex lighting, Wich is allready built in. Just hit the Vertex lighting flag under flags in the spatial shader. You can then use the build in lights and change there color and intensity for your day and night cycle.
And dont worry for performance, you dont have to bake those informations into a color channel. Even on the lowest end hardeware vertexlighting is insanly fast.
Baking the lighting into a vertex is although not working for anything that rotates in the scene.