CSV format importer addon for Blender 3D

Post Reply
fazek
Posts: 24
Joined: 07 Feb 2016, 14:54

CSV format importer addon for Blender 3D

Post by fazek » 20 Feb 2016, 11:10

I've created a Blender 3D addon to import the CSV export format of TVPaint. Good for compositing in the 3D environment of Blender. It is a very early version, so I appreciate any bug reports and suggestions. You can download it from this page:

(30 AUG 2016) https://developer.blender.org/F347916

Installation:

It requires some experience with Blender. Blender's addons are Python scripts. On the web page, click on the Download File at the right side. Copy the downloaded script into Blender's scripts/addons/ directory on your computer. Start Blender, open the User Preferences... window from the File menu, then at the Add-ons tab, find the Import-Export: Import CSV animation addon, and switch it on with the checkbox. Use the Save User Settings button if you want to keep this permanently.

Then you can find the TVPaint CSV animation option in the File->Import menu. I recommend to use Texture or Material viewport shading modes in the 3D editor to see the pictures instead of rectangles.

Important: Blender is working in a physically correct linear color space instead of sRGB. Even if the blending mode for a layer is supported by Blender, the partially transparent colors will look different.
Last edited by fazek on 03 Sep 2016, 15:28, edited 7 times in total.

User avatar
schwarzgrau
Posts: 985
Joined: 23 Jan 2012, 22:08
Location: Offenbach / Germany
Contact:

Re: CSV format importer addon for Blender 3D

Post by schwarzgrau » 20 Feb 2016, 11:23

Maybe I'm not experienced enough with TVPaint, but what are CSV files? Is it connected to the multiplane camera?
Mac OS X 10.11.6 / TVP 11.0.6 PRO / Cintiq 22HD
Mac OS X 10.11.6 / TVP 11.0.6 PRO / Cintiq Companion 2
SCHWARZGRAU.COM

fazek
Posts: 24
Joined: 07 Feb 2016, 14:54

Re: CSV format importer addon for Blender 3D

Post by fazek » 20 Feb 2016, 13:32

It's actually a multi layered export format of TVPaint. You can export your animation into this file format, it's similar to a .mov file or a .jpg sequence, for example. But the layers are not merged together, and your drawings are saved only once, not for all occurences on the timeline again and again. An exposure sheet tells the place of the drawings in the scene.

To select this format, click on the Clip: layers structure tab in your Export footage window. TVPaint creates a simple text file with ,csv extension for the exposure sheet - actually it is a spreadsheet format, so you can load it to Excel for example - and also creates .png files for the drawings into a folder. This combination is ideal for exporting layered animation into other programs. Perhaps it's also good to edit the drawings in other programs (like Photoshop) and importing everything back into TVPaint - now I'm working on that too.

User avatar
schwarzgrau
Posts: 985
Joined: 23 Jan 2012, 22:08
Location: Offenbach / Germany
Contact:

Re: CSV format importer addon for Blender 3D

Post by schwarzgrau » 20 Feb 2016, 13:55

Wow, I don't even know something like this exists in TVPaint. However, thank you for the blender script, even if I wonder why blender. For compositing with the Node editor?
Mac OS X 10.11.6 / TVP 11.0.6 PRO / Cintiq 22HD
Mac OS X 10.11.6 / TVP 11.0.6 PRO / Cintiq Companion 2
SCHWARZGRAU.COM

fazek
Posts: 24
Joined: 07 Feb 2016, 14:54

Re: CSV format importer addon for Blender 3D

Post by fazek » 20 Feb 2016, 14:30

Yes, Blender has a great Compositing nodes part. But that's not the only reason, for example, it uses linear colour space, so the transparent colours and the blurs are calculated better. And the 3D stage itself. Multiplane camera movements, 3D background elements, etc. I'm not a big fan of 3D CGI myself, but sometimes it is a good tool for traditional animation too.

PS: I know sometimes it's a pain to work with Blender. But it's free, and after all, it's a very good 3D program.

User avatar
schwarzgrau
Posts: 985
Joined: 23 Jan 2012, 22:08
Location: Offenbach / Germany
Contact:

Re: CSV format importer addon for Blender 3D

Post by schwarzgrau » 20 Feb 2016, 14:50

No, I'm a blender user myself and I'm using some 3D along with my drawings (only flat shaded stuff). And I'm using blender sometimes to figure out a complex perspective. But my workflow is draw something in TVPaint, model something in blender and composit it in After Effects, using Element 3D. But for a lot of cases it would be pretty useful to put the TVPaint layers straight to Blender, even if I still don't exactly know how it works (as flat planes?), but I'll guess I should just try it.
Mac OS X 10.11.6 / TVP 11.0.6 PRO / Cintiq 22HD
Mac OS X 10.11.6 / TVP 11.0.6 PRO / Cintiq Companion 2
SCHWARZGRAU.COM

fazek
Posts: 24
Joined: 07 Feb 2016, 14:54

Re: CSV format importer addon for Blender 3D

Post by fazek » 20 Feb 2016, 17:11

I don't know too much about After Effects, I'm not using it. But maybe something similar could work in After Effects too. I've made a quick search and it has some kind of javascript language. There are projects on the web for importing CSV files into After Effects, but what I found is like mass text importing (probably subtitles), and motion capture data. CSV is really universal...

User avatar
schwarzgrau
Posts: 985
Joined: 23 Jan 2012, 22:08
Location: Offenbach / Germany
Contact:

Re: CSV format importer addon for Blender 3D

Post by schwarzgrau » 20 Feb 2016, 17:18

There is a script made by MadsJul, which exports all visible layers into PNG sequences. Another Javascript for After Effects imports them there. It's incredible handy, but maybe it could be improved by using CSV.
Mac OS X 10.11.6 / TVP 11.0.6 PRO / Cintiq 22HD
Mac OS X 10.11.6 / TVP 11.0.6 PRO / Cintiq Companion 2
SCHWARZGRAU.COM

Svengali
Posts: 1069
Joined: 28 Dec 2006, 10:08
Contact:

Re: CSV format importer addon for Blender 3D

Post by Svengali » 20 Feb 2016, 18:21

Thanks for pointing out the CSV export command. It is a solution to a problem I was about to try to solve. :D

Sven
Desktop: tvp Pro 11.0.6-64bit, Win8.1 - 24GB ram -2TB HHD - 256GB SSD - intuos4 - d.ver.6.3.15-3
Android Tablet: release 11, Samsung Galaxy Note10.1 - 32GB internal - microSD 32GB

fazek
Posts: 24
Joined: 07 Feb 2016, 14:54

Re: CSV format importer addon for Blender 3D

Post by fazek » 20 Feb 2016, 18:47

@schwarzgrau, thanks for the link, it's very interesting. From the code, it seems MadsJul's solution exports frame-by-frame image sequences, ie. every frame is a new picture, even if they are all the same. I think After Effects can load a layer only this way. it's a common thing for video editors. A very robust solution. But the CSV format is different. Perhaps it could be possible only if the program splits a single TVPaint layer into many After Effects layers, one for each pictures. So maybe it's not a good idea, but who knows?

User avatar
schwarzgrau
Posts: 985
Joined: 23 Jan 2012, 22:08
Location: Offenbach / Germany
Contact:

Re: CSV format importer addon for Blender 3D

Post by schwarzgrau » 21 Feb 2016, 11:31

No, Mads script exports only the "heads", not every frame. The file-name of this head is it's frame number, so the After Effects Script knows where to put this frame.
Mac OS X 10.11.6 / TVP 11.0.6 PRO / Cintiq 22HD
Mac OS X 10.11.6 / TVP 11.0.6 PRO / Cintiq Companion 2
SCHWARZGRAU.COM

fazek
Posts: 24
Joined: 07 Feb 2016, 14:54

Re: CSV format importer addon for Blender 3D

Post by fazek » 21 Feb 2016, 13:19

Ah okay. I understand it now. It's the same as CSV then. There is something called "CompItem" in After Effects and it contains a set of layers inside. I guess every layer contains one of the "head" pictures, with in and out points on the timeline. This could be exactly the same for the CSV importer. Later perhaps I can make an After Effects script too.

User avatar
Fabrice
Posts: 9467
Joined: 17 Jul 2007, 15:00
Contact:

Re: CSV format importer addon for Blender 3D

Post by Fabrice » 28 Feb 2016, 14:37

Nice job !
I will forward it to some of our 2D/3D users.
Fabrice Debarge, Product Manager, TVPaint Team

fazek
Posts: 24
Joined: 07 Feb 2016, 14:54

Re: CSV format importer addon for Blender 3D

Post by fazek » 17 Aug 2016, 18:13

Added support for the Folder feature of CSV 1.1 and some minor bug fixes.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests