Stumble this tool and I start to make 3D characters almost immediately as a 2D game developer
After finish developing one game you immediately think about your next one. You want to grab the things you learned, and start building an even more awesome game. You may start looking for new graphics, music, and tools to get inspired by what the next big thing can sound and look like.
For me, an indie developer, while browsing for tools and graphics I stumbled across 3D animation software I have never seen before, iClone. Then a new door opened.
A quick tour on YouTube showed me that iClone had a lot of potentials and got some fellow software companions. You could quickly create 3D characters and then animate them in iClone. The first thought was that “Well, this is great if you are making a 3D game”. But as a 2D game developer, you need all kind of graphics. Splash screens, UI, cut scenes, avatars, loading screens…
How many times have you just created a splash screen that only states the name of your game? Why not spice it up with a character and some props?
“Yes, but it will take forever to create the 3D models,” I thought. Nope. Most stuff can be found in their Marketplace and if you are after high-quality stuff, they got a separate Content Store for that. Character, props, animations… all there, ready to be adapted for your game. Why not add a talking avatar to your next game? Did I mention they got motion caption solutions?
Now I got a good tool, how do I turn it into my use and get things done?
When I first started to experiment with this tool. I noticed that some things were a bit cumbersome to do. I wanted my workflow to be “this way” but the software worked “that way”. So instead of just falling in line, I needed to charm iClone to follow my lead instead.
At the time iClone had just gone open with its Python API, and you could now create scripts and plug-ins with Python. So when working on a project I may go: “I wish I could do it that way instead… wait, I can”. Plug-ins allow you to smooth out your workflow, and be more productive.
Sure it might take some time to create plug-ins, but in the end, things start to work, as you want them to work. And why not sell the plug-ins to get some well-needed funds for your next project? The 3D branch is not an indie $9 market. You can sell a plug-in for $67 or even more.
(iClone’s Python Open API allows developers to extend iClone’s functionalities by themselves.)
Python for my first time, this is how it gets started
Even if I never coded in Python before, you can quickly get into it as it is well established. When you get stuck you simply Google it. But you should start where you always start, the “Hello world” sample. There are several samples provided that you can learn from.
When working with Python you should use an IDE. Notepad++ works, but without debugging capabilities you are left in the dark if something crash. Auto-complete can save the day if you are looking for a function. I use Visual Studio code. A free IDE that can handle Python quite well. This is my quick and dirty guide to get started:
Control panel>System>Advanced>Environment variables
Add E:\Program Files\Reallusion\iClone 7\Bin64 to windows PATH (System variables – bottom box)
In bin64 in iClone folder
Copy iClonepy.exe to python.exe
Restart PC
Install Visual Studio Code
Open and click extensions
Install:
Python
Python for VSCode
MagicPython
Bookmarks
Help>Restart to update
File>open folder (Working folder need to be a folder outside the environment ex c:\py\my_plug-in and not in E:\Program Files\Reallusion\iClone 7\Bin64)
File>Preferences>Settings> select Workspace and click {} to edit file
Search for python.pythonPath
Enter C:\Program Files\Reallusion\iClone 7\Bin64\python.exe
If it is empty you can add:
{
“python.pythonPath”: “C:\\Program Files\\Reallusion\\iClone 7\\Bin64\\python.exe”
}
Restart visual studio code
Ctrl+Shift+P > select interpreter
Select the iClone one
Install pip in iClone environment via E:\Program Files\Reallusion\iClone 7\Bin64\scripts\Python\get-pip.py
Run to install ptvsd in iClone:
cd E:\Program Files\Reallusion\iClone 7\Bin64\
iClonepy -m pip install ptvsd
Add first in main.py:
import ptvsd
ptvsd.enable_attach(address=(“localhost”, 5678), redirect_output=True)
# Pause until remote debugger is online
ptvsd.wait_for_attach()
Add breakpoint in VSC and run the code in iClone
On first debug run you need to add a new configuration. Just select add.
Then edit the config file and add:
{
“name”: “Python: Attach”,
“type”: “python”,
“request”: “attach”,
“port”: 5678,
“host”: “localhost”
},
This will setup the environment to use Visual Studio code as your Python IDE, and be able to step run your script, line by line in iClone. You can see what happens and catch nasty bugs.
After the first week of started with iClone, I created my first iClone plug-in with Python
When I first started with iClone, I wanted to do some animations. I bought some in the content store and started to experiment. When working with animations you work with clips. These clips can then be changed in any way you want. You start with a simple jump animation and end up with an acrobatic one.
Anyhow, I noticed the clips can’t be resized manually. They will automatically get resized if you add keyframes. This was not the workflow I wanted. I wanted to plan for the future and place the clips where I wanted, between the frames I planned to animate. So I needed a plug-in that would allow me to change the clip length manually.
Before I started I needed to get some Python flesh on my bones. I decided to go through one of the samples (). I broke apart the sample into parts and made functions and built classes with those parts. As iClone use Pyside2 you could create the UI in a separate app (Qt Designer).
After the first week, I had enough base materials to create my first plug-in, the Motion Clip Sizer. It was small and simple, just like a “Hello world” project should be.
It turns out I’m creating my own tools for my future game project
Learning new things has always been something I really enjoy. So I started to break apart more of the sample projects. Each new part made the coding simpler and faster, as I unified mostly everything. Instead of a chunk of code to create a dialog, I could now simply make a single call. My code library started to grow and modules were created to sort the functions.
To get some ideas about what to do next. I went to the forum to check if there were some features people missed from iClone. I noticed that to joint corrective morphs was on the table. As there was a small sample of how to do that. I broke it apart and expanded it. Soon a new plug-in was born, the Morph Linker.
Development continued and I quickly noticed that coding plug-ins is a great way to get things done. You created your own tools that allowed you to build something great. For example, instead of spending hours to get a good camera movement or animation with manual key-framing, why not spend hours making a plug-in, the Move That Camera? So in the future, you can now make the cumbersome work go away and focus on the project itself instead.
Now other developers want to buy my tool and I’m generating new income
iClone’s Python API is growing and opens up more parts of iClone. The plan is to keep up with the new features and try to use them in new and more advanced plug-ins. That will help me develop my games and generate some income.
Even before I released my first plug-in, I did get messages from other iCloners that wanted to buy it. As it is a complete new market I thought about the price. Used to indie market prices I asked for a whopping $19. Got a $10 in the tip so my first plug-in went for $29. Not that bad I thought. I already earned more than some of my games ever had. And I only spent two weeks on that plug-in. After the first plug-in, I started to release more of my plug-ins in Reallusion Plug-in Marketplace to gain more income.
I also received a $700 USD fund by joining Reallusion’s Plug-in Incubation Program. So you could say this is a new kind of market, for us indie developers.
If your plan is to just create plug-ins for iClone, you need iClone itself. If you plan to create stuff for your game, like me, you need the pipeline bundle. This includes iClone, Character Creator Pipeline and 3DXchange Pipeline. iClone is for creating your animations. While Character Creator is for creating characters and morph targets. 3DXchange bring everything together, so you can export your models to your game.
The content from the store often got two different licenses: iContent and Export. An export license is the one you want if you plan on using them in your game.
If you create a useful plug-in, you will get money from Reallusion’s Plug-in Incubation Program for your trouble. And you end up with great new tools, that can push your game to the next level, for free.
Massive thanks to Andreas “The-any-Key” Mustola
Freelance coder specializing in multiplayer and online features.
You must be logged in to post a comment.