Set image or texture on only particular part of a sphere

Hello Everybody,

I am creating application similar to google earth.

Initially I have set one image on sphere.

I have written C#-script for Rotating sphere using Mouse and Zooming sphere using Mouse double click and Mouse Scroll Wheel like google earth.

Now when I will zoom sphere at that time I want to render image on perticular part (Clicked Part) of sphere only.

Can anybody suggest me what to do for that ?

If anybody can provide me any sample piece of code then it will be better.

Thanks in advance.

You can change the texture of sphere material to a larger texture.

renderer.material.mainTexture = _largerTexture;

You just need to check the position of mouse click on sphere using raycast and load related larger texture.

That's an interesting problem. There are means of fiddling with UVs that I'm not really sure of, but if I were to tackle the problem without that knowledge, here's what I would try (although you will lose some color detail without tweaking).

I would have my globe sphere, but then I'd also have 2 copies of the globe, which I cut into hemispheres, roughly N/S/E/W. When a target is selected for a zoom, one of these hemispheres will be in full view at a certain magnitude. To help this along, I'd fiddle with their rotation so that there is no spot that is too close to a crease on ALL hemispheres.

These hemispheres would be given a properly aligned texture of higher resolution, and since the surface area is half the size of the sphere, there won't be a larger file size. These are initially inactive, and very slightly smaller in scale than the globe (so they're beneath the surface).

For the first order of magnitude or two, the globe is probably fine. Once it's been determined what hemisphere we're looking at (perhaps through clever collider use earlier), that hemisphere becomes active, and the alpha of the globe fades, and now we have a high res hemisphere for another order of magnitude or two.

We can't keep chopping up the globe to smaller bits, of course, so what I would do next is gather up and organize all my smaller scale maps, and use a light projector (in a static position) pointed at the sphere's surface from a perpendicular axis. From here, any zoom you want to do is trading between 2 projectors: the initial one, and one that is closer to the surface. The first one fades out as the closer one fades in (presumeably once it is filling the view). Since you can't Really keep walking the projectors closer forever, Once you're that close it might be easier to choreograph movement of the projectors or their parameters rather than moving the camera much, since you'll likely be approaching the clip plane. This can give the illusion of further magnitude.

Obviously this requires a lot of choreography in animating the alpha of the globe, the material of the hemisphere, and the intensity of the projectors, and thats if you don't try going further than the second projector in magnitude... But that's probably what I'd try.

EDIT: there's always going to be an intersecting crease with the hemispheres, so... it would have to be 3 copies, so 2 extra hemispheres will make up for that spot (on the bright side there wouldn't have to be any rotational fiddling)