Program that takes 3D model, and creates 2D array where indexes correspond to pixels on UV map of the model, and values correspond to points in 3D space where said pixels would be drawn.
I created it so it would be easier to generate seamless noise textures for 3D objects, and also because it would make it super easy to convert from one map projection to other.
Are there easier ways to do this? Probably. Could you write much better, more eficient and less clunky program than this? Most certainly. Do I care? Not really.
-
Open this project in blender.
-
Import your 3D model and input it into the scene, like this, for example:
Remember that more complicated meshes take much more time to map.
- Drag the mesh into "Mesh Node" field in the "Main" Node.
- Start program and set it up. If you want the array to generate Noise, remember that your texture does not have to be big at all. For the monkey here I would go with 256/256, or even smaller.
By the way, "sphere mode" normalizes all coordinates at the end and multiplies them by given radius, since this gives much better results. After this operation all the points lie exaclty on the sphere's surface.
- Click Start and watch the show.
- After the program finishes it generates noise and puts it on the model. so you can see if any seams are visible.
- If you want to now import your newly generated file, just check main.gd and use one of my functions.