Viriatos Posted July 16, 2014 Share Posted July 16, 2014 Hello. I applied a texture with some text to a sphere. When applied, the text appears as I am looking through a mirror... like it happens in ambulances.As a solution, I flipped the texture, and it works perfectly, but I supposed I'm not doing it as intended. Cause if I apply that same texture to a cube, it's all messed up again. Any tips? Cheers,Viriatos Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 16, 2014 Share Posted July 16, 2014 Hi Viriatos, welcome to the forum. Good to have you with us. I (a newbie too) have no solution, and it is good that you have reminded us of this issue. I have seen this same thing in a zip I once made, and in a playground scene that I tested today. In the playground scene, notice that the "Z" is backwards unless you activate line 25. Your issue is valid, and I am sure the framework experts will be looking into this soon. Feel free to experiment with that playground scene, making changes, clicking Run again, observing what happens. You can even Save it again if you like. (You won't overwrite anything, because when you Save things in the playground, it issues a new URL.) Unfortunately, due to the CORS policy, you cannot use your own text textures in the playground. I used a texture that I knew was already in the playground's textures/ folder. It doesn't have much text on it, but it had the letter "Z" and that was enough to prove that what you are claiming, is indeed true. Its backwards. Again, welcome, and be patient while the experts look into this. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 16, 2014 Share Posted July 16, 2014 Did you try calling the texture constructor with invertY to false?function Texture(url, scene, noMipmap, invertY, samplingMode) { Quote Link to comment Share on other sites More sharing options...
Viriatos Posted July 17, 2014 Author Share Posted July 17, 2014 Hello Wingnut and Deltakosh. It's now working!I experimented both answers and they work perfectly, but I rather use the second one for now. I have one more question, if you don't mind...Does the texture applied to spheres need to be vertical, meaning you need to have an image twice as high as wide? I used THREE.js in the past and it didn't work like that in that api. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 17, 2014 Share Posted July 17, 2014 you can do whatever you want by playing with texture.uScale / vScale / uOffset / vOffset 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.