View Full Version : Image part as texture
I am trying to load a part of an image specifying the coordenades (in pixels) of the image that I want to use as a texture, but I can't find the way to do it. I only am able to load an entire image as a texture. ┐How can I do this?
Thanks in advance,
07-11-2011, 07:32 AM
I mean do you want to put an image as texture? It really meant that you have to do the changes in CSS. Changing in CSS will be effect the website
07-11-2011, 07:44 AM
I don't know of a direct way to only download a part of an image - you're always going to have to download it all.
However, you could render the section of the image that you're interested in into a 2D <canvas> - then use the canvas as a texture.
Alternatively, you could download the entire image into a texture and alter the UV coordinates on your mesh to use only the section that you want.
If you absolutely don't want to download the entire image to the client for bandwidth or security reasons - then the only way to really be sure of that would be to write code in a PHP script on the server to extract just the part of the image that you need.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.