Skip to content

Simple program that takes 3D model, creates 2d array with 3D coordinates corresponding to position of every UV pixel and saves it to file.

Notifications You must be signed in to change notification settings

LukasSliacky/UvTo3D

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UV to 3D map generator

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.

How To Use

  1. Open this project in blender.

  2. Import your 3D model and input it into the scene, like this, for example:

image

Remember that more complicated meshes take much more time to map.

  1. Drag the mesh into "Mesh Node" field in the "Main" Node.

image

  1. 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.

image

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.

  1. Click Start and watch the show.

image

  1. After the program finishes it generates noise and puts it on the model. so you can see if any seams are visible.

image

  1. If you want to now import your newly generated file, just check main.gd and use one of my functions.

About

Simple program that takes 3D model, creates 2d array with 3D coordinates corresponding to position of every UV pixel and saves it to file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • GDScript 100.0%