In touch designer I have a sphere (globe) that rotates 360 degrees based on the mouse position. I want a selection(country) to be made based on what point in the sphere is facing the center viewpoint or a crosshair in the center of the viewpoint. How can I extract the values and create that interface?
This will work but it’s horribly optimised.
Assuming you have an equirectangular texture you’re using, bring it into photoshop and hand paint a matte of each country. You will have an image for each country, which can be “detected” by multiplying each render top with another top of a pixel in the centre of the screen. Analyze and logic this so you get a signal anytime your country is touching your crosshair.
I think maybe a better way would include finding a speadsheet or something that has the latitude and longitude coordinates of all the borders, and going from there?
Hi @eivonye and @HYPER_TETRA_HEDRON
that’s a clever solution
Via a Renderpick CHOP or DAT you could also get to the uv of the sphere. Now in a second texture encode the countries perhaps by color and with 195 countries in the world (currently) a 8bit greyscale map should be enough and it becomes a simple lookup.
Now creating that worldmap might be a bit of manual labor. You could however investigate how to utilize geopandas to do this automatically for you.
cheers
Markus