Skip to content

Takes an image (png, jpg, etc.) and creates a flat 3d .obj format mesh based on the pixels in that image. Anything with an opacity of 0 will not be included.

Notifications You must be signed in to change notification settings

blakejrobinson/imagetoobj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

imagetoobj

Takes an image (png, jpg, etc.) and creates a flat 3d .obj format mesh based on the pixels in that image. Anything with an opacity of 0 will not be included.

Installation

  • Grab the files from the repository
  • Use npm to install dependencies (npm i from command line in folder you downloaded to)

Usage

Use from the command line with node . [pathtofile]. For example:

node . "C:\\Users\\Documents\\Rodney\\Pictures\\coolpicture.png"
This example would generate coolpicture.obj in "C:\Users\Documents\Rodney\Pictures\"

Here's an example of the output from a provided sprite (with transparency). It can then be refined and extruded in your favorite 3D software:

Example

About

Takes an image (png, jpg, etc.) and creates a flat 3d .obj format mesh based on the pixels in that image. Anything with an opacity of 0 will not be included.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published