script to generate HeN ipfs app exports of GLSL shaders

Overview

HeNerator

A simple script to generate HeN ipfs app exports from any frag shader created with:

How it works?

  1. If you are using GlslEditor or The Book of Shaders's on-line editor, download the file.
  2. Excecute henerator.py follow with the --title NAME of your work and (optionally) the --duration_secs SECONDS of the thumbnail GIF. If you don't set a duration it will use the first frame as an image.
./henerator.py test.frag --title ball --duration 2.5
  1. That's all! Y ou should see a heneration.zip file in the same folder.

Other arguments

  • --width WIDTH of the thumbnail
  • --height HEIGHT of the thumbnail
  • --fps FPS of the thumbnail animation
  • --start SECONDS of the thumbnail animation
  • --pixel_density PIXEL_density of the thumbnail (in MacOS usually is 2)

Requirements and Install

  • Latest version of GlslViewer
  • Ffmpeg (only required to make animated GIFs for your thumbnails)
  • Python3
  • ArgParse module for Python3
pip3 install argparse
  • You can install henerator.py globaly on your system by just typing
make install
Comments
  • HeNerator.py  Errno 2 [SOLVED]

    HeNerator.py Errno 2 [SOLVED]

    Hi again @patriciogonzalezvivo, this is the error trying to doing it in a Windows PC:

      File "C:\Users\Alejo\Desktop\HeNerator\henerator.py", line 2309, in <module>
        generate(file, args)
      File "C:\Users\Alejo\Desktop\HeNerator\henerator.py", line 2239, in generate
        shader_in_file = open(shader_filename+'.frag', "r")
    FileNotFoundError: [Errno 2] No such file or directory: 'ejndjhwghg6pwxsu9vvskh27yhk011sz.frag'
    

    I installed GLSLViewer I think, there is a way to verify that?

    opened by AlejoHarris 8
  • WinErrNo 2 after exporting other *.frag file

    WinErrNo 2 after exporting other *.frag file

    Hello again, I'm getting this error now when trying to extract another zip file

    [image2 @ 000001f02a920c00] Could find no file with path '%05d.png' and index in the range 0-4
    %05d.png: No such file or directory
    Traceback (most recent call last):
      File "C:\Users\Alejo\Desktop\HeNerator\henerator.py", line 2309, in <module>
        generate(file, args)
      File "C:\Users\Alejo\Desktop\HeNerator\henerator.py", line 2265, in generate
        zip_file.write('thumbnail.' + thumbnail_ext)
      File "C:\Users\Alejo\AppData\Local\Programs\Python\Python39\lib\zipfile.py", line 1727, in write
        zinfo = ZipInfo.from_file(filename, arcname,
      File "C:\Users\Alejo\AppData\Local\Programs\Python\Python39\lib\zipfile.py", line 501, in from_file
        st = os.stat(filename)
    FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado: 'thumbnail.gif'
    

    Translate of the error: The system cannot finde the specified file: 'thumbnail.gif'

    opened by AlejoHarris 5
  • Fullscreen height issue

    Fullscreen height issue

    Hello Patricio, I found the way to get the .zip folder. Everything is fine but the fullscreen offfset height problem persists... any clue how to solve it? photo_2021-09-22_11-43-13

    opened by pablovitamin 3
  • u_frame returns 0

    u_frame returns 0

    Hi Patricio,

    I was trying to do some debugging today, but noticed that u_frame was always returning 0 once I loaded the project in the browser. You can test with something simple like:

    #ifdef GL_ES
    precision highp float;
    #endif
    
    uniform int u_frame;
    
    void main(){
      float f = fract(float(u_frame) * 0.01);
      gl_FragColor = vec4(f, f, f, 1.0)
    }
    

    I'm testing on a MPB osx 11.5.2 Chrome 94

    opened by aferriss 2
  • Inconsistent rendering with multiple buffers between HeNerator and GLSLViewer

    Inconsistent rendering with multiple buffers between HeNerator and GLSLViewer

    I noticed a few differences between Henerator and GLSLViewer outputs:

    • Time seems to move at a different speed between the two. The browser looks much slower.
    • Exports using HeNerator set the buffer's filtering and wrap modes to different settings than in GLSL viewer. In HeNerator, we're getting NEAREST and CLAMP_TO_EDGE, while GLSLViewer gets LINEAR and REPEAT. I know there's restrictions in the browser for repeat and NPOT textures, but I think they have been lifted for webGL2.
    • The colors between the two environments are ever so slightly different. I wonder if there is some blending happening by mistake in the browser (this might be happening with all HeNerator Sketches, but I definitely noticed it with the ripples example).
    • I see flickering and occasional glitchy frames with the multiple buffer examples in the browser.

    Chrome 94 MPB Osx 11.5.2

    opened by aferriss 2
Owner
Patricio Gonzalez Vivo
Patricio Gonzalez Vivo
Wikipedia WordCloud App generate Wikipedia word cloud art created using python's streamlit, matplotlib, wikipedia and wordcloud packages

Wikipedia WordCloud App Wikipedia WordCloud App generate Wikipedia word cloud art created using python's streamlit, matplotlib, wikipedia and wordclou

Siva Prakash 5 Jan 2, 2022
Python script to generate a visualization of various sorting algorithms, image or video.

sorting_algo_visualizer Python script to generate a visualization of various sorting algorithms, image or video.

null 146 Nov 12, 2022
A script written in Python that generate output custom color (HEX or RGB input to x1b hexadecimal)

ColorShell ─ 1.5 Planned for v2: setup.sh for setup alias This script converts HEX and RGB code to x1b x1b is code for colorize outputs, works on ou

Riley 4 Oct 31, 2021
Generate a roam research like Network Graph view from your Notion pages.

Notion Graph View Export Notion pages to a Roam Research like graph view.

Steve Sun 214 Jan 7, 2023
Generate graphs with NetworkX, natively visualize with D3.js and pywebview

webview_d3 This is some PoC code to render graphs created with NetworkX natively using D3.js and pywebview. The main benifit of this approac

byt3bl33d3r 68 Aug 18, 2022
Generate a 3D Skyline in STL format and a OpenSCAD file from Gitlab contributions

Your Gitlab's contributions in a 3D Skyline gitlab-skyline is a Python command to generate a skyline figure from Gitlab contributions as Github did at

Félix Gómez 70 Dec 22, 2022
BGraph is a tool designed to generate dependencies graphs from Android.bp soong files.

BGraph BGraph is a tool designed to generate dependencies graphs from Android.bp soong files. Overview BGraph (for Build-Graphs) is a project aimed at

Quarkslab 10 Dec 19, 2022
Generate the report for OCULTest.

Sample report generated in this function Usage example from utils.gen_report import generate_report if __name__ == '__main__': # def generate_rep

Philip Guo 1 Mar 10, 2022
Generate knowledge graphs with interesting geometries, like lattices

Geometric Graphs Generate knowledge graphs with interesting geometries, like lattices. Works on Python 3.9+ because it uses cool new features. Get out

Charles Tapley Hoyt 5 Jan 3, 2022
Because trello only have payed options to generate a RunUp chart, this solves that!

Trello Runup Chart Generator The basic concept of the project is that Corello is pay-to-use and want to use Trello To-Do/Doing/Done automation with gi

Rômulo Schiavon 1 Dec 21, 2021
Generate visualizations of GitHub user and repository statistics using GitHub Actions.

GitHub Stats Visualization Generate visualizations of GitHub user and repository statistics using GitHub Actions. This project is currently a work-in-

JoelImgu 3 Dec 14, 2022
Generate "Jupiter" plots for circular genomes

jupiter Generate "Jupiter" plots for circular genomes Description Python scripts to generate plots from ViennaRNA output. Written in "pidgin" python w

Robert Edgar 2 Nov 29, 2021
🐞 📊 Ladybug extension to generate 2D charts

ladybug-charts Ladybug extension to generate 2D charts. Installation pip install ladybug-charts QuickStart import ladybug_charts API Documentation Loc

Ladybug Tools 3 Dec 30, 2022
A toolkit to generate MR sequence diagrams

mrsd: a toolkit to generate MR sequence diagrams mrsd is a Python toolkit to generate MR sequence diagrams, as shown below for the basic FLASH sequenc

Julien Lamy 3 Dec 25, 2021
Generate visualizations of GitHub user and repository statistics using GitHub Actions.

GitHub Stats Visualization Generate visualizations of GitHub user and repository statistics using GitHub Actions. This project is currently a work-in-

Aditya Thakekar 1 Jan 11, 2022
Generate SVG (dark/light) images visualizing (private/public) GitHub repo statistics for profile/website.

Generate daily updated visualizations of GitHub user and repository statistics from the GitHub API using GitHub Actions for any combination of private and public repositories, whether owned or contributed to - no server required.

Adam Ross 2 Dec 16, 2022
Automatically generate GitHub activity!

Commit Bot Automatically generate GitHub activity! We've all wanted to be the developer that commits every day, but that requires a lot of work. Let's

Ricky 4 Jun 7, 2022
Smoking Simulation is an app to simulate the spreading of smokers and non-smokers, their interactions and population during certain amount of time.

Smoking Simulation is an app to simulate the spreading of smokers and non-smokers, their interactions and population during certain

Bohdan Ruban 5 Nov 8, 2022
Simple CLI python app to show a stocks graph performance. Made with Matplotlib and Tiingo.

stock-graph-python Simple CLI python app to show a stocks graph performance. Made with Matplotlib and Tiingo. Tiingo API Key You will need to add your

Toby 3 May 14, 2022