Skip to content

a (work in progress) demoscene scene generator and renderer that may be potentially used for creating artworks for vaporwave related content.

License

Notifications You must be signed in to change notification settings

casiojapi/vector-graphica

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a (work in progress) demoscene scene generator and renderer that may be potentially used for creating artworks for vaporwave related content. Check the github.io to see some samples.

sample-1

Installation:

To install vector-graphica, first clone this repository:

$ git clone https://github.com/casiojapi/vector-graphica.git

Enter the repository folder:

$ cd vector-graphica

Build the program:

$ make

You just installed vector-graphica.

sample-2

Use:

Once you have the binary built, you will find an executable named: 'vector-graphica'.

To generate your images (jpg) in the renders folder, run:

$ make run

This will execute the program with the default values, create the images in PPM, and then convert them into JPG. After the program finished running you will have your fresh images in the 'renders' folder.

sample-3

Advanced use:

Run the executable:

$ ./vector-graphica

Optional argument: you can use '-n N_FILES', to select the number of images to be generated. Otherwise the default value of N_FILES will be used.

$ ./vector-graphica -n N_FILES

This will generate the images in PPM format inside the "renders" folder.

Now you can convert them to any filetype you like, or use them as PPM (does someone use PPM?).

You can convert them to JPG format running:

$ make convert

Which is a command that will convert all the PPM formatted files to JPG, and then erase all the PPM files.

Internally this make command uses:

convert renders/*.ppm -set filename: "%t" renders/%[filename:].jpg

rm renders/*.ppm 

And that's all you have to know. If you want to learn more about the program, you can hit me up on twitter @casiojapi or just read the source code. It's pretty simple code, and will be pretty easy to mess with it in order to get weirder stuff.

sample-3

Default values

Currently the program runs with some deafult values that would be nice to make them mutable. (you can change them if you change the DEFS in main.c... more on that down there)

#define WIDTH 1920
#define HEIGHT 1080
#define FOV 75
#define N_LIGHTS 6
#define N_SPHERES 8
#define N_FILES 10
  • WIDTH: horizontal resolution.
  • HEIGHT: vertical resolution.
  • FOV: field of view. (mess with it to get weirder images)
  • N_LIGHTS: number of lights reflecting the spheres.
  • N_SPHERES: number of spheres to randomly generate.
  • N_FILES: number of images to generate.

Changing default values

Remove your executable (to build the new one later)

$ rm vector-graphica

Change the values you want on top of main.c:

#define WIDTH 500
#define HEIGHT 500
#define FOV 60
#define N_LIGHTS 8
#define N_SPHERES 14
#define N_FILES 1318

Now build the program again (using the new main.c)

$ make

And execute it as it was previously explained.

sample-3

Misc

This is my first real release. I hope you enjoy it and would love to have some feedback.

Hit me up on twitter @casiojapi if you want to chat. And if you happen to use any image generated by this program, please tag me so I can see it. Cheers.

About

a (work in progress) demoscene scene generator and renderer that may be potentially used for creating artworks for vaporwave related content.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published