Hi, I was wondering if it’s possible to import uv coord from external program (I.e. blender) and apply to a mesh coded from babylon. In blender I saw that it’s possible to export a png uv map, but I was thinking if I can get only uv coord and then apply later in some way in my code.
The idea is to create my mesh in babylon, because could be parametric, apply a texture and then using an uv map.
Thank you in advance.
Not sure how/why one would encode UVs into a png, never worked with blender all that much. But yea, you can totally change the UVs of meshes. That’s what i’m doing at WebGL Demo - Holzregal to keep the textures from distorting when changing the size of the meshes. Just make your Mesh “updateable” when you create it and then you can change almost everything Updating Vertices | Babylon.js Documentation
3 Likes
Thanks, I was thinking to something like that: make an uv map with easy to use method, for example unwrap in blender, instead of doing it by code. And then import the uv coord all at once in babylon. I don’t want to modify the uv map “manually” in code, but simply make all the dirty job with blender and then import the uv in babylon. Is it possible?
To create the uv in blender you need to have the mesh there so why not simply exporting the mesh from Blender ?
You will have a lot of trouble with the other way.
Because some meshes are parametric and generated runtime, so i was thinking to map only the texture externally and than adjust it in some way only using UV coord.
but to map the texture you need the UVs and they should in this case also be generated parametrically.
yes,i thought that, only for simple changes (some width or height of simple meshes), it would be possible to modify the UV map as well.