Search the Community
Showing results for tags 'uv mapping'.
Found 3 results
Hi Babylonians, I'm sorry I haven't been here much lately, but I'm burried in math hell - if there is such a place - alright, there is. I have a painting app - will post this soon once I've rebuilt the node server ( I haven't posted yet because multiuser is the main point). But I'm continuing to build on our old server to add features to test. So, here is the question - Does anyone have any math to translate x.y pointer events to UV mapping coodinates to piant locally on an object? I currently have the old standards working (unwrap UVs and paint on a plane to reflect the 3D objects UVs.) However, I'm sure there is a way to unwrap the UVs based upon the object your unwraping to allow real time painting locally from the 2D canvas to a dynamic texture. I can work the math on a specific object, but that's not good enough. Any thoughts from the brainiacs here? DB
Hi guys! I'm relatively new to both Babylon JS and 3D world and I'm trying to understand how things work in order to use Babylon JS in my current project. So please forgive me if I'll say nonsense. What I would like to do is import assets in my scene from external files, for example from a glTF or obj file, manipulate objects and then save the final 3D scene in .babylon format in order to read it back later. I'm getting problems when I import objects from glTF files and in particular for the textures. First of all, when I import the glTF file, for each texture a new blob in memory is created and the temporary object url (created with URL.createObjectURL()) is set to the texture url, losing the original file name. Secondly and more problematic, the UV mappings does not seem to work anymore when reading the serialized babylon json file. To explain better I created a playground sample. https://playground.babylonjs.com/#KGVJR8 The sample loads objects from two files: the original avocado.gltf file (shown on the left in the scene) and the serialized baylon file (on the right). To get the babylon js file I just serialized the scene with the object obtained from the glTF file and I replaced in the resulting json the blob object urls with the file names of the textures, saved to the same path as the babylon file. As you can see, in the object on the right the texture coordinates are not mapped well anymore to the mesh vertices. However, if you look at the console, you can see that the uv data seem to be there and are the same in both cases. So what could be the problem? Am I doing something wrong? I hope I've explained myself well, Thanks, Matteo
Hi gentlemen ! I need your help again... Like the title sai it... i would like import a mesh from Blender in Babylon.js with uv mapping. But with the material and texture, the mesh doesn't appear... and of course without the material and texture, the mesh appears correctly. I see that Blender have two kind of material options : "Data" and "Object".In first, I tried to create the material and texture with the option "Data" only, after with the option "Object" only and to finish with the two options but always nothing in Babylon.js... To create this material and texture, I took my inspiration of the exemple made by Deltakosh here : http://blogs.msdn.com/b/eternalcoding/archive/2013/06/28/babylon-js-how-to-load-a-babylon-file-produced-with-blender.aspx?PageIndex=2 But i don't see that I made wrong... because except the option "Use alpha" and "Diffuse", all of the checkbox are uncheked... I tried to chek many option at random but nothing better... So my request... Is it possible to have an exemple of mesh creation with uv mapping to import in Babylon.js from Blender? After my job, I will post my file or screeshot of my material and texture set up... Thanks you for your help !!