Skip to content

Generate random interfaces for GIFs #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 28 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
06569fd
feat: initial gif procesing
VsevolodX Jan 9, 2025
eeb69ce
update: move gif creation nb
VsevolodX Jan 10, 2025
a678e9b
update: optimize
VsevolodX Jan 10, 2025
6e4f767
update: restructure
VsevolodX Jan 10, 2025
f54f463
update: control wave with messages
VsevolodX Jan 15, 2025
f3cd7aa
update: cleanup and strucutre
VsevolodX Jan 15, 2025
d465ba6
update: wait for gif to generate, reset viewer
VsevolodX Jan 16, 2025
de7717c
update: limit wait time
VsevolodX Jan 16, 2025
3c1621b
update: process multiple gifs
VsevolodX Jan 16, 2025
06584fc
update: with new set camera to cell
VsevolodX Jan 16, 2025
fb60dc4
update: cleanups
VsevolodX Jan 16, 2025
0b17bb0
update: add short readme
VsevolodX Jan 16, 2025
870cc8f
update: urls
VsevolodX Jan 16, 2025
a920e17
update: add nb to generate interfaces
VsevolodX Jan 18, 2025
854b718
update: fix naming
VsevolodX Jan 18, 2025
4bf5f1c
chore: visualize from side
VsevolodX Feb 1, 2025
2cc9b77
update: add smarter generation and processing
VsevolodX Feb 3, 2025
be0361c
chore: rename
VsevolodX Mar 23, 2025
d5047f8
update: add explanation to running nbs
VsevolodX Mar 23, 2025
545d6dc
chore: add more explanation
VsevolodX Mar 23, 2025
fbfe1ff
update: add point defects
VsevolodX Mar 23, 2025
414f7e7
update: adjust according to new messages
VsevolodX Mar 24, 2025
8bfc6e6
chore: edits to readme
VsevolodX Mar 24, 2025
b92ab8b
chore: add description
VsevolodX Mar 24, 2025
3d3b87c
update: add random MI generation
VsevolodX Mar 24, 2025
f4fbdc7
Merge branch 'dev' into feature/SOF-7438
VsevolodX May 2, 2025
e58e90d
update: new made
VsevolodX May 9, 2025
7c465b3
chore: fix relative import
VsevolodX May 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added other/generate_gifs/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions other/generate_gifs/gif_processing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
"metadata": {},
"cell_type": "code",
"source": [
"from other.media_generation.utils.font_manager import FontManager\n",
"from other.generate_gifs.utils.font_manager import FontManager\n",
"\n",
"# Initialize font manager and list available fonts\n",
"font_manager = FontManager()\n",
Expand Down Expand Up @@ -243,7 +243,7 @@
"metadata": {},
"cell_type": "code",
"source": [
"from other.media_generation.utils.gif_processor import GIFProcessor\n",
"from other.generate_gifs.utils.gif_processor import GIFProcessor\n",
"\n",
"\n",
"def process_all_gifs():\n",
Expand Down
38 changes: 38 additions & 0 deletions other/media_generation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# GIFs generation with Materials visualization

## 1. Setup materials

1.1. Generate materials in Mat3ra JSON format with [Materials Designer](https://materials-designer.mat3ra.com/) or use a script.

1.2. Place materials JSON files in the `uploads` directory.

1.3. Name them with a short name that will appear at bottom left of GIF.

Alternatively, you can use `create_materials` notebook that has functionality for random generation of some types of materials. Since it's random, verification of the generated materials is necessary.

## 2. Start wave.js

2.1. Run wave.js (from PR: https://github.com/Exabyte-io/wave.js/pull/165) locally (default port 3002 -- used in notebooks).

Or keep URL of the Netlify deployment in the notebook.

## 3. Record material GIFs

3.1. Run `record_gifs_with_wave.ipynb` to generate GIFs.

This notebook will generate GIFs for all JSON materials in the `input` directory and save them in the `output` directory.

3.2. Wait until the GIFs are downloaded. They will appear at the top level of the repo, because we can't control the saving directory. But the next notebook will automatically move them to the `output` directory.

## 4. Add overlays and generate final GIFs

4.1. Store any media files (e.g. images, videos) you want to overlay on the GIFs in the `assets` directory.

4.2. Run `gif_processing_multiple.ipynb` to add overlays and generate final GIFs.

This notebook will move the GIFs from the top level to the `output` directory, removing any duplications (judging by the file name), and add overlays with the material names.


## Single GIF processing

If you created a GIF with Materials Designer manually, you can use the `gif_processing_single.ipynb` notebook to add overlays and generate the final GIF.
Loading
Loading