Posts

Calling Python from Substance Painter

Here is a quick code snippet for calling a Python script from Substance Painter and parsing the results. The in/out is very simple, but serves as an example of using the alg.subprocess.check_output function to bridge the JS api and your own Python scripts. // This can be called from the QML UI, or elsewhere in the plugin code. function GetAllFilesInDirectory(root) { if (root == undefined) return; // I put my scripts in a relative path to keep my plugin tidy. var script_path = "Scripts/FileUtils.py"; // Gathering files var ret = "NOSTRING"; try { // The arguments are used as parameter inputs to the Python script. This requires some planning // and well communicated conventions, but works well enough. ret = alg.subprocess.check_output( [ pypath, // Absolute path to interpreter. script_path, // Relative path to the py script. "log_files_of_type", // sys.argv[1], in this case the python ...

Making A Hello World Substance Painter Plugin

Image
Substance Painter plugins use the QT Meta Language , or QML files to build their interface. From Wikipedia: It is a JSON-like declarative language for designing user interface–centric applications. Inline JavaScript code handles imperative aspects. It is part of Qt Quick, the UI creation kit developed by Nokia within the Qt framework. Using this information, we can start building a window with a button to execute our script. Visual Studio Code For this tutorial I’m going to be using Visual Studio Code , a lightweight IDE from Microsoft. It’s not the same thing as Visual Studio, but it’s a nice scripting editor that’s available on Mac, Linux and PC. Other text editors like Sublime will do the job quite well. Installing QML Syntax Highlighting By default, QML files will appear as ordinary text files in Visual Studio Code. While this won’t stop you from being able to write the plugin, adding some QML support will make reading, organizing and editing our script easier.  To do this, I’...

Egad

One line Unreal Engine 4 (mac os) Review: Doing Ue4 development on a Mac is not a great experience. Update: https://issues.unrealengine.com/issue/UE-23624 Just ran into this one... cleaning your project in XCode nukes the actual editor . Case in point.

RenderDoc

Image
Probably familiar to any TA or Engineer who deals with their graphics pipeline, RenderDoc is a tool I have found incredibly useful for debugging graphics in Unreal. Formerly a Crytek internal graphics debugging tool, it was released to the public in 2014. The tool is developed by Baldur Karlsson, and it boggles my mind that a tool this gosh-darn useful has been given to the public for free. Kudos to Baldur and to Crytek. Previously I was using NVIDIA Nsight to view and debug runtime atlased textures, and it was quite slow and somewhat unintuitive to sift through the outputs to find what I was after. RenderDoc on the other hand is not only fairly straight forward to get running, the turn around time to get meaningful output for frame-debugging is extremely rapid. For Ue4 integration I'm using Temaran's RenderDoc Ue4 plugin , which makes frame captures in game as simple as entering a command on the command line-  RenderDoc.CaptureFrame Check it out if you need to know more abou...

Substance Designer foray

Image
I'm pretty late to the whole substance craze, having spent three years in a mobile development environment where textures larger than 512x512 caused eyebrows to raise within the engineering team. But I kept hearing things about it being amazing, so I thought I'd give it a shot. Here is my attempt at a "hand painted" look, based off of similar processes I'd use in Photoshop. The texture is generated using an exported sbsar material and... well, thats it. I saw a nice example online of using a switch to swap out gradient maps in a material which allowed me to create a bunch of looks in the one material. This tool makes me happy.

A Quick Checkin- Clion, Unreal and Mac

Image
Super quick check-in. Hello world! For the last year or so, I've been working with Echtra Inc. on a great project as a Tools Engineer/Technical Artist guy. The project is using the Unreal Engine, which I like more and more every day. On Windows, C++ plus Visual Studio Pro and Visual Assist is a great combo, and I happily churn through my daily tasks without fighting the tools too much. Not so on my Mac at home. Programming in Unity on a Mac is great! Mono Develop isn't amazing, but it isn't terrible. But Unreal on a Mac. I want it to be fun, I want it to be possible, but I just can't get myself to like, let alone enjoy, XCode. On that, for anyone thinking "well, you could just use blueprints..." etc, I feel it's too much of a shackle to not be able to just dive into the guts of it. C++ or bust. So anyway, I recently adopted PyCharm at work and really enjoyed using it for my Python tools. I noticed that JetBrains also made an IDE called CLion , and they ...

Substance Painter Tutorialをやってみる⑰

Image
Substance Painter Tutorial – Fundamentals 17: Exporting textures 要点まとめ テクスチャの出力 ここまでで作成したテクスチャを仕様にあわせて出力します。 UE4やUnity5向けのプリセットやまた、自身でカスタマイズしたエクスポート形式などが組み立てられます。 使い方 ショートカット:Ctrl+Shift+E…エクスポートウィンドウが起動