Search the Community
Showing results for tags 'repeat texture'.
Found 1 result
Hello there, I'm trying to create placeholder editor (svg), where users can edit photo on the left and they get 3d preview of it on the right. So far so good, but I'm having problems with texturing mesh. Here is a screen how it looks: Model I use: https://www.dropbox.com/s/iaxrakz0a5knu1o/cup_v2.blend?dl=0 And function how I update texture: //get texture url and create material: var textureUrl = "http://localhost/FotoEditor/app/php/" + response +"?"+new Date().getTime(); var materialTest = new BABYLON.StandardMaterial("texture", $scope.babylon.sceneVars.scene); materialTest.diffuseTexture = new BABYLON.Texture(textureUrl, $scope.babylon.sceneVars.scene); //scale it somehow, dont know is it good or not, but without it texture is strongly zoomed: materialTest.diffuseTexture.uScale = 5; materialTest.diffuseTexture.vScale = 5; //assign material to mesh: $scope.babylon.sceneVars.scene.meshes.material = materialTest; Issues: 1. Why is texture initially rotated? Object is in 0,0,0 position and it's not turned around... 2. Is there any way I can make sure proportions from what user create on the left are exact on 3d model? In SVG users create in editor on the left I have all dimensions I need, but I'm not sure how can i connect them with those on 3d model (model is created in blender with metrics dimensions) 3. How can I turn off texture repetition? If user pan out image it should not repeat on 3d object and leave white space instead.