
Python Particles
This project displays the results of using Python to procedurally create particles for Maya.
Maya Particles


Links to Python Code
• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• •​ • •​ • • •​ • •​ • •

Image Sequence to mp4
This page shows the development of python scripts that use ffmpeg to convert an image sequence to a mp4 movie.
Algorithm
-
Get the path to the directory containing our python script, should be the same as the directory containing the image sequence(s).
-
Obtain a list of the images - we assume we only support .jpg, .tif, and .png image types.
-
Make a dictionary (database) containing the names of each sequence of images and their image type.
-
Wrote a script that the user could double click to convert each image sequence to a .mp4. The name of the script and it's text are specific to the operating system of the users computer.
Python Codes
How to Use the Code
-
Download these python scripts:
- image_sequence_to_mp4.py
- ffmpeg_utils.py
and save them in the folder containing the image sequences that ffmpeg will convert to MP4 movies. -
Run the image_sequence_to_mp4.py by opening a CMD window or a terminal. Use the cd command to change to the directory in which the python scripts have been saved.
Then use this command,
python image_sequence_to_mp4.py -
Double click the file named,
convertJPGtoMP4.bat
or
convertJPGtoMP4
to perform the conversion of the sequences to their corresponding MP4 movies.
• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• •​ • •​ • • •​ • •​ • •

Compress mp4s
This page describes the development of python scripts that use ffmpeg to compress movie files.
Algorithm
-
Get the path to the directory containing our python script - should be the same as the directory containing the mp4 file(s).
-
Obtain a list of the mp4 files.
-
Make a dictionary containing the names of mp4 files.
-
Write a script that the user could double click to convert each mp4 to a compressed version. The name of the script and it's text are specific to the operating system of the users computer.
Python Codes
How to Use the Code
-
Download these python scripts:
- compress_mp4.py
- ffmpeg_utils.py
and save them in the folder containing the MP4 files. -
Run the compress_mp4.py by opening a CMD window or a terminal. Use the cd command to change to the directory in which the python scripts have been saved.
Then use this command,
python compress_mp4.py -
Double click the file named,
compressMP4.bat
or
compressMP4
to perform the conversion of the input mp4 files to their corresponding compressed versions.
• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• •​ • •​ • • •​ • •​ • •

Python: UI
This page explains the development of a GUI that enables a non-programmer to convert a sequence of images to an mp4 movie, compress an mp4 movie, and convert a mov file into an mp4 movie.
User Interface Overview

Images to mp4

Compress mp4
User Instructions
In order to complete these steps, you must have
Python 3.8 and Cutter 8.2.3 or higher installed on your computer.
Download for Python 3.8:
https://www.python.org/downloads/release/python-380/
Download for Cutter 8.2.3:

MOV to mp4
Step 1: Installation of Codes
-
Double click on "All Codes for Python GUI" on the top of this page.
-
In downloads on your computer, there should be a python_gui.zip folder.
-
Unzip the folder.

Shows .zip folder in Downloads.

Contents in .zip folder after unzip.

Step 2: How to Launch
-
In cutter, go to File---> Open. Find the folder with all the Python Code in it.
-
Open the ffmpeg_utility.py file.
Shows 'Open' menu in Cutter with all the code.
Step 3: How to Use
-
With the ffmpeg_utility.py file open, go to the top left hand corner and click on "Script".
-
Click on the first option - "Execute Python".
-
Two separate windows should pop up, one called the "process monitor" (ignore this one) and a window called "ffmpeg utilities".
-
The ffmpeg utilities window is the GUI that you will use. Instructions to do so are at the top of this page under "User Interface Overview".

Shows process monitor window and UI window.
• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• • ​• •​ • •​ • • •​ • •​ • •

Python Maya nParticles UI
This page shows the results of my personal explorations of creating a Python User Interface for generating nParticles in Maya.
After working with nParticles for a bit, I've realized that there's always a possibility that they can go glitchy on you, and the work of setting them up gets to be a bit tedious at times. By creating this UI, I want to make this process easier and more efficient for effects artists.
Above is my UI's Sphere tab. Features include the number of nParticles, radius, render type, and color editor. Every tab page has the number of nParticles, color editor, and render type feature. However, radius is only used by the sphere, cylinder, ring, disk and cone.
Current Feature Lists (2/20/21)
For ALL Tabpages:
-
Number of nParticles (min. = 0, max. ranging from 1000 to 3000)
-
Render Type (Multipoint/streak, Numeric, Points, Spheres, Sprites, Streaks, Blobby, Cloud & Tube)
-
Color Editor (RGB & HSV)
-
Generate Button: Allows user to generate particles.
-
Reset Button: Allows user to delete particles generated.
Specific Features Per Tab:
-
Radius (Sphere, Cylinder, Ring, Disk & Cone)
-
Width & Depth (Box & Cube)
-
Height (Box, Cube, Cylinder & Cone)
-
Length (Sine Wave & Sine(2x) Wave)
UI in Action!
Render Results
Sphere

Cylinder

Cone

Box

Ring

Sine Wave

Cube

Disk

Sine (2x) Wave
