The main goals of the project are self-education and experiments. The demo shows a simple scene (an object and an environment light source) and material ui that allows to edit object’s material parameters in runtime. The challenge with complex objects is that they might be composed of several unique materials. So the requirement is to be able to generate a single texture that will contain parameters for each material.
One possible solution is to provide a mask texture with N
unique rgb-colors (each color represents a single material). The demo takes such a mask texture, retrieves all the unique colors from it and generates the material property texture according to the color mask. Then the renderer gets the generated texture and uses it to draw the object. It is possible to alter material properties for any unique color in runtime.
The textures used in video are below.
| | | | | --- | --- | --- | --- |
.geo
& .tex
are SPARKi internal geometry & texture formats respectively.
- DirectX SDK
- Visul Studio 2017 (Community Edition will do)
- FBX SDK. After the installation is complete add FBX_SDK_DIR environmanet variable. It must point to the path where your fbx sdk has been installed. For example:
c:\Program Files\Autodesk\FBX\FBX SDK\2018.1.1\
- Clone the repository
- Get all the submodules (
git submodule init
,git submodule update
) - Open the solution
/msvc/SPARKi.sln
- Go to SPARKi project properties > Debugging and set Working Directory to
$(ProjectDir)..\bin\$(Configuration)\
- PBR
- FXAA