Character Material Editor Maxscript
This user-friendly interface speeds up characters' creation process and prevents human-made mistakes. 3dsmax's material editor can often be pretty stressful when it comes to deal with lots of parameters, this script sets up most of the artist's work while displaying easy to read texture panels.
SVN Status Maxscript
A script made to improve file management between users working with 3dsmax.
It displays current SVN file status each time a scene is loaded by showing a small popup with useful informations.
Communicates with SVN by command-lines.
File is up-to-date : You have the latest file on the server, unchanged. You can choose to lock the file to prevent other from editing it.
You have modified the file : Same as above, but you've made some modifications on the file.
File is out-of-date : A newer version of the file is available on the server. You can update directly from the dialog box.
CONFLICT!! You modified the file although a newer version is present on the server.
File is locked by someone : Darn it! At least it tells you WHO did that.
You have locked the file : Somebody will probably hate you for this. (Locked file are automatically released once commited)
And some other states...
You can also force the window to automatically close after a bunch of seconds (Critical means Conflict, Not up-to-date, Deleted, and such...).
...or totally disable SVN Check (you'll have to run it again manually if you feel sorry about this later).
Maxscripts Manager Maxscript
This tool was made to centralize all the maxscripts we are using into one folder, so that they're easily shared to anyone on the project.
Adding, removing or sorting scripts then become much easier.
Uses DotNet treeview.
Each maxscript we're using is put in a specific directory, with a config file and an icon. The script manager reads the entire folder hierarchy and display each scripts accordingly.
Here is an example of a typical script folder:
Config file is extremely simple, as follow :
tooltip="Generates a cubemap texture (.dds) from any point in a max scene"
All scripts put in there are maxscripts, not macroscripts. This is done intentionally to limit memory consumption by loading too many macroscripts for nothing (scripts are generally used by department : environment, characters, animation, vfx, ...).
For each maxscript file found, a tiny and specifically named macroscript is automatically created and put in the right folder, allowing the user to have access to everything from the "Customize User Interface" panel (keyboard shortcuts, toolbar creation, ...). Each time the Manager is called, everything is cleaned preventing orphan macroscripts in case of scripts removal.
The "SVN Update" button is used to get latest version of each scripts without exiting max or the Manager.
Lights Optimization Maxscript
A problem we've faced was to optimize our scenes lights in order to reduce the number of objects lighted.
This script helps by automatically removing all objects that are not in the light radius or frustum, creating for each light a list of objects affected by it.
How does it work?
For each light in the scene, a camera is created with exactly the same parameters as the light (position, rotation, cone size, attenuation, ...). For Omnidirectional lights, 6 cameras are created in each direction.
The scene is then rendered with Node Channel enabled for each camera and final images are read to determine the objects in the camera frustum.
Once the list is created, non-visible objects are removed from the light calculation.
A treeView is displayed at the end of the process.
This script saved us several hours of fastidious optimization and was able to reduce the number of effective lighted objects by 5.
Bank Objects Manager Maxscript
Improve scene creation and assets placement by displaying a list of bank objects (maxfiles) and working as a pick-and-click editor to place objects in the scene, possibly with random scale or rotation.
Also allows quick replacement of one or multiple objects.
Level artists can use a collection of objects located in a specific folder and simply put them in their scene. They choose the object, click in the scene at the desired position and the object will automatically be imported as a XRef. Many objects can be imported at the same time.
Bank objects can be swapped very quickly using the "Replace" button, which works on one or multiple objects.
These objects are XRef so that any modification of the original one is transferred to those in the scene.
Spherical Harmonics LightingMaxscript
Automatically calculate the ambient lighting (direct and/or indirect) at many positions in a scene and return a XML file of lighting values. This file is then used to generate Spherical Harmonics coefficients.
Works with the VRay Renderer but can be adapted to any other renderer.
How does it work?
First, the artist puts boxes in the scene which determines the area of calculation. It can be the entire map or more specific locations.
When ran,the script generates hundreds of small spheres in the boxes (density is tweakable).
A render is launched to determine the lighting at many points on these spheres, and then calculated values are stored in the XML file.
For each sphere, 12 values are measured, corresponding to 12 vectors.
Here's the XML generated code :
<ambient_grid distance="400.0" num_x="16" num_y="2" num_z="2" m11="1.0" m12="0.0" m13="0.0" m21="0.0" m22="0.0" m23="1.0" m31="0.0" m32="-1.0" m33="0.0" m41="-3076.32" m42="381.31" m43="-1035.99" min_x="-3181.63" min_y="-272.047" min_z="0.0" max_x="3181.63" max_y="272.047" max_z="600.0" intensity_multiplier="1.0">
<normal x="0.0" y="0.0" z="1.0" />
<normal x="0.894427" y="0.0" z="0.447214" />
<normal x="0.276393" y="0.850651" z="0.447214" />
<normal x="-0.723607" y="0.525731" z="0.447214" />
<normal x="-0.723607" y="-0.525731" z="0.447214" />
<normal x="0.276393" y="-0.850651" z="0.447214" />
<normal x="0.723607" y="0.525731" z="-0.447214" />
<normal x="-0.276393" y="0.850651" z="-0.447214" />
<normal x="-0.894427" y="0.0" z="-0.447214" />
<normal x="-0.276393" y="-0.850651" z="-0.447214" />
<normal x="0.723607" y="-0.525731" z="-0.447214" />
<normal x="0.0" y="0.0" z="-1.0" />
<point x="-3000.0" y="-200.0" z="100.0">
<color r="0.0627451" g="0.0627451" b="0.0235294" />
<color r="0.0627451" g="0.0627451" b="0.00784314" />
<color r="0.0705882" g="0.054902" b="0.00784314" />
<color r="0.12549" g="0.0941176" b="0.0156863" />
<color r="0.164706" g="0.14902" b="0.0235294" />
<color r="0.141176" g="0.12549" b="0.0235294" />
<color r="0.117647" g="0.0862745" b="0.00784314" />
<color r="0.14902" g="0.101961" b="0.00784314" />
<color r="0.211765" g="0.14902" b="0.0156863" />
<color r="0.211765" g="0.156863" b="0.0235294" />
<color r="0.156863" g="0.117647" b="0.0156863" />
<color r="0.133333" g="0.0862745" b="0.00784314" />
<point x="-3000.0" y="-200.0" z="500.0">
Finally, this file is used to generated the interpolated Spherical Harmonics coefficients.
Cubemap Calculator Maxscript
Useful to quickly generate a DDS CubeMap from a specific location in the scene. Simply put a dummy node at the desired position and run the script, it will generate a ready-to-use texture by calculating the six view projections of the cubemap.
How does it work?
A camera is created in each direction and a render is launched.
The six rendered images are then combined into one...
Simply convert it into a DDS Cubemap (with Nvidia Texture Tools for example) and it's done.
Can also works with 3dsmax viewport DX Shaders.
Scene Exporter Maxscript
This script is project-specific. It does a full check of a scene, renaming and optimizing objects or materials, warning on non-compliant names, assigning lightmaps if needed and much more.
When everything has been checked, it exports the scene at the right location, removing the fastidious task of searching for path and filename.
Export Group to Texture Photoshop Jscript
Export all groups of a photoshop file to separate textures, according to their name.
All newly created textures are saved in a predefined folder to speed up export process.
The exporter automatically fills texture name by adding group name to the original filename.
By default, it also scales down psd file to half its size.
Layers to Tiles Photoshop Jscript
A little script I made. It converts all layers of a document into one-image strip sequence. Combined with the "Load Files into Stack" script from Photoshop, it becomes very easy to generate textures from a video.
Just input the number of rows & columns, and let the script do the rest!
Vertex Lighting System for Mobile Games GLSL - C#
I've been working on a cheap but efficient way to lit a mobile game in our custom game engine.
Previous experiences using baked lightmaps were really painful as level topology was in constant evolution through the project, so we decided to try a realtime ligthing solution.
The context and the result
Our previous project was using a very complex lighting pipeline, lightmaps were computed with VRay and often needed a renderfarm. Needless to say, when something went wrong or when some geometry modifications were made on the level, the entire texture needed to be rebuild. Generating one or more 2048x2048 texture per level was also pretty package size-consumpting. We needed to get rid of that for the next projects.
I spent some time with the lead lighter to define main guidelines for a new system: something really easy to understand, quick to set-up, nice-looking and cheap enough to run on several mobile devices, from old crap to high-ends. Icing on the cake: being able to switch between lightsets in realtime.
From this discussion, we decided to try to go full vertex lighting. Our levels should be fairly small, so we'd be able to put more density in geometry. On really low-end devices, realtime vertex lighting can be baked directly into vertex colors.
And by now, this is what we have achieved:
To get this result, we split our lighting system into 4 different types of light.
Ambient / Atmospheric Light
First of all, this "light" is used to define the ambient color of the entire level as well as fog color / density and eventually a per-vertex rim-lighting(all these parameters can be changed by code or in-game triggers if needed). Instead of having just ambient color for everything, 2 or 3 colors can be set to modulate the lighting according to the face's normal
Example of use:
This light is a simple directional light. It's also the only one that casts shadows over the environment (classic shadowmap). Once again, there's only one kind of this light per level, but its parameters can be animated or modified at runtime.
Several of these lights can be put in the level, as long as too many are not affecting the same mesh (we use a "light manager" to define which lights are affecting which mesh in realtime, as soon as something -light or mesh- moves).
None of these lights are casting shadows, but we can enable specular reflection (specular is calculated per-vertex and then modulated by a mask). Attenuation is defined by 3 components : Light angle incidence (NdotL), distance attenuation start and distance attenuation end.
The lights also have an "ambient factor" that simply modulates the NdotL incidence computation. Very useful to smooth the light effect and simulate global illumination.
Another setting is called "diffusemap attenuation". It's a little trick to reduce contrasts or gain more light color in some areas in the background. What it does is allowing the light to "erase" diffusemap, blending it with pure white.
Some example below:
Boxlights are linear lights confined inside an axis-aligned bounding box. They have no light incidence attenuation (NdotL) and act more like an ambient light. Two colors can be set : from base to top, according to the axis.
They are used to simulate lights emitted from a -large- localized source, like lava, or light tunnel.
Another version of the boxlight can be use to generate "foglight", it keeps the axis align gradient but replaces the two colors by a fog density gradient. Very useful to fade out wells, pits or tunnels.
Baking lights on low-end devices
Although lights are computed per vertex, the process can be overkill for low-end devices if there's too many lights affecting the same object. As framerate is more important than visual quality for these devices, we decided that all omnis and boxlights should be baked into vertex colors. Sun and ambient remain dynamic. The process of baking is done offline, in our level editor, and generates a file per lightset so that we can have more than one per environment without duplicating geometry.
Dark Aura HLSL
This is a shader I first made with the UDK Material Shader System and adapted into HLSL.
The objective was to have some sort of sticky and phosphorescent lifeform that can appear or disappear smoothly under lighting conditions. The Dark Aura density can be directly modified on objects with Vertex Paint.
«Snipers» - Water HLSL
A shader used for deep water rendering like the sea.
No translucency here but it has 3 layers of waves (one vertex displaced and two normalmapped), HDR, global and local reflexions (sky and objects) by the use of 2 differents cubemaps.
«Final Exam» - Visual EffectsParticles, Postprocess
Some of my work on the visual effects in the game: explosions, blood, lightning, fire, wind and much more...
These environments consist of different effects.
First, a shader is applied on all meshes that look up or down (Z normal up or down in world space).
All background objects materials are turned green.
Hundreds of planes are created (then merged into one or two for performance issues) for all the bubbles or slime.
Here are some of the particle effects you'll find in the game.
Cassy's Tornado : An animated mesh with skewed UVs, a little shader and some particles.
And a small video.
It's always a good thing to add small videos.
If you want to see waaaay more particle systems and visual effects, just buy the game!
«Snipers» - Flashbang EffectPostprocess
A hangover & negative afterimage effect used in «Snipers» when the player looks at a stun grenade or flashbang.
When the grenade explodes, the screen is captured, converted to negative, blurred and blended with the scene for a few seconds, giving that unpleasant visual sensation.
«Snipers» - Thermal & X-Ray ScopesPostprocess
Two features of the scopes you can unlock in «Snipers».
The first shows body heat, the second allows to see through walls or objects for a small duration.
«Snipers» - Atmospheric EffectsShaders / Particles
All kinds of atmospheric & environmental effects you'll find in «Snipers» : Lens flares, distant fog, rain, animated skyboxes, trees and fogsheets...
«Snipers» - Bloody CameraPostprocess
Compositing & Editing
Funky Lab Rat Promotional Video Editing
The Promotional Video of Hydravision's Game "Funky Lab Rat" (PSN - 2010)
Dungeon Twister Promotional Videoclip Compositing & Editing
This music video was made for the 2009 Dungeon Twister World Cup and then for promoting the videogame (PSN - 2012)
«Pirates» - Trailer (Aborted Project)Compositing & Editing
The very early trailer of "Pirates", an aborted game.
Personal ProjectFX, Compositing & Editing
A video I made just for fun many years ago (2003-2007). It may look very stupid and amateurish but it was my very first steps in FX, Compositing & Editing, so I just can't deny its existence.