#Blender vertex paint .glb to Godot
183 messages · Page 1 of 1 (latest)
I have reason to believe this simply isn't posible in Godot 4 yet
So I might have to stick to obj for now.
If you check the box under File>External Data>Automatically Pack Resources, then image textures will be brought from Blender into Godot without needing to have them in a separate folder in godot
In this video I show you how to import your 3D models from Blender into Godot. Whether you're creating an FPS, Third Person Shooter, Adventure or any other 3D game in Godot, this tutorial will teach you everything you need to get your assets from Blender into Godot smoothly and quickly!
For more quick godot tips and tutorial, click that subscr...
@tawny fossil
@void bough My terrain mesh model only uses vertex paint as texture, but it's not an actual texture, it's vertex color information which influences each face/tri of the mesh for an interpolated color it will display.
I've seen both the videos you shared.
The first one states that you can export .blend files and they work fine on Godot. Which is cool, but doesn't solve my issue. I want to export using the recommended .glb format. It's pure binary, and faster for Godot since it runs well on GPU
The second video is only explaining how to export a regular model with textures. That's cool, and I'll likely reference it once I get to textures 🙂 But my model is Vertex Painted.
My conclusion is that VertexPaint data doesn't load correclty in Godot 4+ from a .glf (or any of the other variants) with only normals and vertex coloring being exported with the mesh.
It will work fine with the older .obj format.
maybe this helps https://www.youtube.com/watch?v=mj6a6Jcv1Mo
https://discord.com/invite/6THUkfy
Member - https://youtube.com/c/raven67854/join
Patreon - https://www.patreon.com/raven67854
In this tutorial I will show you how to make in Ambient Occlusion(AO) and Color data into a mesh from Blender and then use it inside of Godot. This can be very useful for adding extra pop to your meshes or very handy fo...
i dont know why he makes it like this but the vertex color data he made in blender is showing up in godot
Common mesh you get (ArrayMesh) supports vertex color
@tawny fossil
Yes I can get the vertex color to show in godot
he exports in obj, I do too.
the thing is glf is more optimal for godot, but godot still can't load vertex data from glf
too bad 😄
so the main problem is that the most optimal format can be used in godot but dont import the vertex color data
that sound like an bug
normaly every format that can be imported or exported runs like in every other programm too
so i would call this an bug
pls report the bug in detail here https://github.com/godotengine/godot/issues
Godot Engine – Multi-platform 2D and 3D game engine - Issues · godotengine/godot
so they fix it in the next month
you need discribe it in much detail as you can there
there are coders that fix things 24/7
when it is an bug (what i exspect) its fixed in 4 weeks
it it not an bug they will provide you an solution fast
@tawny fossil
I see. Well, I am obviously curious as to what is going on and why this isn't working as expected for .glf
The issue tracker for godot is really packed, contributers do seem to be busy 😂
but if you recommend it I will report this, we'll get to the bottom of it 👌
I mean, 8k open issues 😅
when its confimred most of the time is needs 2 patches and its done
there are also 1,8k pull request with fixes
some need an review of an dev and than it get merged with the core programm
issue hasn't been reported yet
?
thats from yesterday
is an bug that godot didnt accept vertex colors as default when blender importer is used
oh is it now?
it might be cross your problem
I mean usually I have to add a material override and click the "use vertex color as albedo" toggle in it.
i dont know anymore how the importer works and where to find its settings
However in .glb this doesn't even work.
The toggle is clearly on, and the coloring looks stripey
stripey means most of the time some streching is going on
This isn't how vertex color is meant to behave 😂
yeah sorry that's the blender export.
I'm just exporting normals and colors.
just like with obj
then in godot it's a new material
shouldn't stretch anything.
wait on what project do you work i mean forward+,mobile or compatibility ?
Compatibility for html, which I believe is the least developed.
but only forward+ uses all graphical benefits.....
pls
yeah same issue with forward+
ok
wait this is the picture how its look in godot right ? can i see how its look in blender pls ?
? its the same
yes
No that's how it looks in blender too.
This is godot.
both formats
the .obj is ok its just an light problem
Yes, the lighting can be tweaked, the issue is with vertex paint.
but you want the .gbl
Exactly.
afaik I've been recommended to use .glb multiple times, and would go on using it for vertex paint if posible.
nice axolotl pfp btw. Are you making an axolotl game by any chance?
ok try in blender triangulating your meshes before exporting
yes
I'll now export and import as glf
indeed, the color looks... fine 😂 triangulated in blender.
not the finest work of art but still a good example
godot forward+ still stripey
shit
the stripes shifted a bit.
but yeah
material autogenerates
with use vertexpaint as albedo
but it's messed up
Spatial shaders are used for shading 3D objects. They are the most complex type of shader Godot offers. Spatial shaders are highly configurable with different render modes and different rendering o...
maybe its an position problem
because the colors are correct
but not the y,z and x cordinates
Warning
If your model contains blend shapes (also known as "shape keys" and "morph targets"), your glTF export setting Export Deformation Bones Only needs to be configured to Enabled under the Animation export configurations.
Exporting non-deforming bones anyway will lead to incorrect shading.
Note
Blender versions older than 3.2 do not export emissive textures with the glTF file. If your model uses one and you're using an older version of Blender, it must be brought in separately.
By default, Blender has backface culling disabled on materials and will export materials to match how they render in Blender. This means that materials in Godot will have their cull mode set to Disabled. This can decrease performance since backfaces will be rendered, even when they are being culled by other faces. To resolve this, enable Backface Culling in Blender's Materials tab, then export the scene to glTF again.
Blender 3.4 and later can export RGB vertex colors in OBJ files (this is a nonstandard extension of the OBJ format). Godot is able to import those vertex colors since Godot 4.0, but they will not be displayed on the material unless you enable Vertex Color > Use As Albedo on the material.
Vertex colors from OBJ meshes keep their original color space once imported (sRGB/linear), but their brightness is clamped to 1.0 (they can't be overbright).
but they will not be displayed on the material unless you enable Vertex Color > Use As Albedo on the material.
ok. That's how I do it for .obj
as i said make your own bug report and explain it
that is my own
this cant be normal
ah ok
but i like your approach
you make an 3d model without any texture
that means also you cant use any pattern generator, or brush effect
you can only use colors and an blend method and you can only color specific parts
its a little bit like pixelart
wouldnt be pixelart textures as gif in only 4bit colors have the same effect on the performance ?
or are there other problems later in the game itself for the look or performance ?
There also seems to be a lighting calculation that goes per vertex and not per pixel somewhere, can't remember where it was, do you (currently unavailable, at least for compatibility)? If they fixed that it looks like it could be perfect for low poly layouts.
This is my level 1
No not really, it's just that I find it strange that godot recommends glb, but then something more basic than textures, like vertex paint doesn't work unless using older .obj format.
I also read glb trims out information and runs really smooth on gpu, so the recommendation makes sense.
but yeah I also have some performance issues being a game html and such, but mainly collision/physics-wise. Every little helps.
then why not use defold engine its made for mobile and html
I really wanted to try out godot 😂
so I made a small project for testing, and I also wanted it easy to share.
open source, royalty free... it all sound very sexy.
but yeah, coming from Unity, I do see it is relatively underdeveloped.
ok we should wait what they say to your bug report
It got an answer but idk where vertex compression is, to try to disable it.
does the same with generate lod's off as suggested.
compression is here #1152621941769916616 message
left down
and In Godot, Level of Detail (LOD) versions are generated automatically on import and work almost transparently with the default settings. If you want to disable LOD generation, you might need to do it manually in your 3D modelling tool before importing the model into Godot. As of now, there doesn't seem to be a direct option in Godot's import settings to disable automatic LOD generation.
Oh yeah, so it was already disabled.
lod is on the blender part for the export
i am afk until tomorrow
maybe its an blender bug in the export https://www.reddit.com/r/blenderhelp/comments/11i3ca8/vertex_paint_information_lostscrambled_on_glbgltf/
i am at work now
so i am back
This appears solved. Either the export randomly works when starting a new blender file, or the following worked: I found what appears to be a exporter code update for an upcoming release. I copy-pasted it into the add-on folder. Started blender, imported my model, exported as .glb with default settings with only the Y-transform deactivated. Object showed up correctly.
Interesting, thanks for finding this.
Maybe updating blender or using an older version 🤔
update it
blender devs are good in fixing
when this works and you can do what you wanted , pls when you see someone here in the future with similar problems just show him your solution too
Blender 3.4 had a bug exporting .glb which seems fixed in 3.6
furthermore, exporting .glb you don't even need to add a material to the mesh. Surface0 shows a preexisting material with use vertex paing as albedo setting already toggled true.
hmmm
not a huge issue though. I'm more intrigued about:
Where is the default generated material in a .glb saved?
Because it autogenerates one in layer0, but I never exported it from blender.
When you import a .glb file in Godot, the materials are stored within the .glb file itself1. If you want to edit these materials, you need to create a new inherited scene from your .glb file2.
Here’s how you can do it:
Right-click your .glb file in the FileSystem dock.
Select “New Inherited”.
Open the newly created scene.
Now, you should be able to see and edit the materials in the Inspector2. Please note that any changes you make will be saved to the inherited scene, not the original .glb file2.
i ask bing chat