sociofob Posted April 14, 2016 Share Posted April 14, 2016 I'm trying to apply texture to my mesh, everything looks good except one thing: numbers are like on the photo attached. Does anyone know what is solution here? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 14, 2016 Share Posted April 14, 2016 Hello and welcome Can you try to set invertY = false when creating your texture? But perhaps I should ask first: How do you create the scene? Is it loaded from Blender or 3dsmax export? Quote Link to comment Share on other sites More sharing options...
sociofob Posted April 14, 2016 Author Share Posted April 14, 2016 3 hours ago, Deltakosh said: Hello and welcome Can you try to set invertY = false when creating your texture? But perhaps I should ask first: How do you create the scene? Is it loaded from Blender or 3dsmax export? Thank you for reply, Deltakosh I added a line to my code, liek this: var materialRoulette = new BABYLON.StandardMaterial("textureRoulette", scene); materialRoulette.invertY=false; materialRoulette.diffuseTexture = new BABYLON.Texture("Textures/reversedRoulette.jpg", scene); Unfortunately, it didn't help. I use the 3d object from blender. 1)I'm loading the object var loader = new BABYLON.AssetsManager(scene); tree = loader.addMeshTask("roulette", "", "", "roulette1.obj"); 2)Then I'm adding each mesh to the array t.loadedMeshes.forEach(function(m) { treeMeshArr.push(m); }); 3)Attaching texture to meshes: treeMeshArr[0].material=materialBlack; treeMeshArr[1].material=materialRoulette treeMeshArr[2].material=materialWheel; Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 14, 2016 Share Posted April 14, 2016 ok gotcha! but you have to set the invertY parameter of the constructor: http://doc.babylonjs.com/classes/2.3/Texture#new-texture-classes-2-3-texture-url-scene-nomipmap-inverty-samplingmode-onload-onerror-buffer-deletebuffer- Quote Link to comment Share on other sites More sharing options...
sociofob Posted April 15, 2016 Author Share Posted April 15, 2016 My bad, and now I set invertY parameter to false properly materialWheel.diffuseTexture = new BABYLON.Texture("Textures/wheel1.jpg", scene,false,false); But, it got much worse: Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 15, 2016 Share Posted April 15, 2016 Ok:) I thought every number was a different object Can you try to manually flip your texture on X-axis? (using a paint tool) Quote Link to comment Share on other sites More sharing options...
sociofob Posted April 15, 2016 Author Share Posted April 15, 2016 1 hour ago, Deltakosh said: Ok:) I thought every number was a different object Can you try to manually flip your texture on X-axis? (using a paint tool) Yep, It might help, but it's pretty different to flip round texture. By the way, I found the solution! It is about inverting 3d model in blender on Y axis. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 16, 2016 Share Posted April 16, 2016 excellent Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.