Best approach for a large scale tiled map ??

Jul 6, 2010 at 5:35 PM
Now that I got my subdivided icosahedron generated, I need to render it. What is the best approach given that I need to be able to individually texture each triangle ?? Create a single geometry object ?? Create each individual triangle ?? (I saw something about clustering of statically positioned objects ?? I can do that and just move the camera ??) Something else ??
Jul 7, 2010 at 6:43 AM

If I understand you correctly, you could just create a Material for each texture you need and then walk through using the GeometryContext on the Geometry and set the Material you want on each triangle/Face.

Jul 7, 2010 at 7:59 AM

hmmmmmmm .. that would require a seperate image file for each texture and I would set the same texture coords for every face, which would make setting up the texture coords quite a bit easier, and only require changing the mat for a face to change the map<br><br>

My current plan was to use a tiled texture and set texture coords as needed to pull the right tile from the texture.<br><br>

ummmm I dont see anyplace to set the texture on a material.. I've not done that much client side 3D so I'm a bit fuzzy on some of this stuff :)<br><br>



Jul 7, 2010 at 8:51 AM

You could of course just have one material with a big texture, even have it contain multiple textures within the one texture. Performance wise, that would probably be faster as the CPU cache would most likely cache your entire texture. Which can't be guaranteed if you're having multiple textures.

Anyways, if you go for the multiple texture thing, which as you also say is easier, you have something called GetDetailLevel() which returns the detail level in which you want to modify, currently there is only one : DetailLevel.Full. Also, the Full detail level is a property on the Geometry for convience, and it has a method called SetMaterial() that takes a index and a material. The index would be the index of the face.

Hope that helps.