Scripts/Shaders/R&D


gaetanlassagne_SendToSubstancePainter_1.1

3dsMax to Substance Painter – Tool created for Allegorithmic (/users and studios) to quickly send objects from 3dsMax to Substance Painter.

Features:
– Automatic export selected objects (and Normal maps assigned in “Bump/Normal bump” if available)
– Creation of a Substance Painter document at export location with correct normal maps/materials assignations (from scratch or using a .spp as source file)
– Automatically relaunch Substance Painter in order to get a quick preview
– Use a Substance Painter document (.spp file) as template
The script will create the folder structure (specified in the export path) and a subfolder (optional) based on the “Export name” (or first object name in alphabetic order if none is mentioned). This folder contains the Substance Painter file and all files created from 3dsMax to setup it.

Download/more information here.
Video example (enable subtitles if disabled): here.


AdvancedSearchAndReplace.

Advanced search and replace: Python & PyQT – A Python script (also available as an executable) I made at Allegorithmic to quickly update a large amount of files and do various operations.

You specify a “Source” path that contains the new files, a “Destination” path that contains the old files, the script will automatically replace if there is a file match (you don’t need to have the same folders structure).
It will also allow you to create a backup copy of the replaced file (with a unique timestamp).

The idea was to have the possibility to do the following things:
– Replace existing files with a new version (without having necessary the same folders structure)
– Have the possibillity to ignore file extension to place files at the same location (match based on file name only). For example place “koala.sbs” next  to “koala.sbsar”.
– Quickly get files from a txt list


SceneFromSubstances

Scene from substances – A small script created to have a quick preview of Substance Database in Unity (for debugging purposes).

The idea is to populate a scene using substances from a folder.
The script parse a folder to get all the substances it contains and create a mesh/apply a material for each substance.


Pixel art characters tools: Maxscript & Python – Tools created for an Allegorithmic project to render 10 (or more) animated characters in a few frames (8 by animation) in a pixel art style at different camera angles/formats/resolutions using a specific naming convention.

Maxscript (character processing/render):
– Scale automatically the animation of animated parts (as “Re-scale time”) to fit in several frames (specified by the user). Preserves existing keyframes in case the animation is scaled again.
– Setup the character materials to have a “pixel art” look. The script applies different settings depending on the part name.
– Render the animation (path specified by the user) using a specific naming convention (editable by the user) as PNG files. For each camera a folder with the correct naming convention is created.
– Render “idle” frames: 1 frame (specified by the user) from each camera angle (using the naming convention).

Python (spritesheet and gif creation):
– Get folders to process from a text file. Get all images and create a spritesheet and a gif for all animations/resolutions.
Spritesheet: created using PIL, the resolution is automatically adapted based on the images resolution (we can specify how much lines/columns we need).
Gif: created using ImageMagick (as gif transparency wasn’t well handled by PIL).


Geomerics Transporter – Planet creation (meshes/shaders/textures) in Unity for Geomerics “Transporter” mobile demo showcased at GDC14.

Animated clouds/details/atmosphere (UV offset based on editor Time) blended in additive mode with the main texture. Control on the intensity/color/speed. The effect fade on some areas (atmosphere effect) using a simple gradient texture. Fresnel effect with control on the intensity/spread/color.


BreakIt

Break it – Script to quickly break objects. The user pick an object, and have the possibility to break it randomly (based on a “Subdivisions number” parameter) or in equal parts (based on a “Subdivision” parameter for each axis).


FindAndReplace

Find and replace – A maxscript I made at Allegorithmic to quickly update a large amount of files. In this case it was “.sbsar” files, but it works for any format.
You select the folder to update, the folder with the new version. It will parse the old folder and replace each similar file by the corresponding new version (you don’t need a similar files organization). You also have the possibility to create a backup of the old file.


Post process shader – Vignetting, animated chromatic aberration and water trickle effects created for the Beneathdemo to showcase the native support of Substance in UDK. The effect evolve in kismet based on player progression in the level.


Automatic textures creation – A maxscript (and texture template) created for the Beneathdemo to showcase the native support of Substance in UDK. The idea was to texture a lot of meshes from the same template using specific informations for each one.

The script use “Substance batchtools” (command line tools), it process several meshes to bake informations (Ao, Curvature, etc.), and use them as input in a Substance template. We can then adjust the settings (visual aspect, normal intensity, size, random seed, etc.) directly  into the Unreal Engine/UDK.


PositionToText

Position to text – Create a renderable text spline for each object selected, based on the position of each one (updated in realtime). You have the possibility change the interpolation steps and the size of the selected splines. For motion graphics, or debug during rendering.