1
$\begingroup$

I have created a 3D terrain of the entire "European continent". You can see the elevation details. This is done already.

Now I want to selectively be able to show individual countries. I want the European continent to light up where a particular country is. How could I do this most effectively? Suppose I have exported all the country shapes into a single SVG file but I can also use QGIS to give me a different format of data...

enter image description here This image is only an example I took from elsewhere. It is something I would like to achieve, but in my case it should be even better because my map would be 3D :-)

What have I thought of already?

As I want to individually animate and the light up where countries, I thought of creating a separate PNG file as an alpha mask for each country. Then in the Geometry nodes or Shader nodes I would have a bunch of ImageTexture nodes and a switch/boolean hell to be able to turn an individual country on and off.

Would there be a more elegant solution to this? I would like to have something more compact and reusable.

P.S. - I am not against using Python if that can make it work more elegantly.

$\endgroup$

1 Answer 1

1
$\begingroup$

The way you outlined works. Here is the initial GN material switch node group:

enter image description here

We can use these nodes but we want to use the material switch between objects in a collection.

We create a bunch of objects, (I used basic geometric shapes) and put them in a collection, so we can use the instance index to pick an object to make red:

enter image description here

Then we want to delete and replace only the object that is selected and keep the rest:

enter image description here

Now in the modifier stack you can select a number and it will change only the material of that object.

We also might want to add our materials to both sides of the boolean, and fields so we can change the true/false materials used in the switch.

This has some limitations. But it is a good start, and we have something reusable as a group we can apply to new collections of objects.

enter image description here enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .