Page 1 of 1
CSV format importer addon for Blender 3D
Posted: 20 Feb 2016, 11:10
by fazek
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.
Re: CSV format importer addon for Blender 3D
Posted: 20 Feb 2016, 11:23
by schwarzgrau
Maybe I'm not experienced enough with TVPaint, but what are CSV files? Is it connected to the multiplane camera?
Re: CSV format importer addon for Blender 3D
Posted: 20 Feb 2016, 13:32
by fazek
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.
Re: CSV format importer addon for Blender 3D
Posted: 20 Feb 2016, 13:55
by schwarzgrau
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?
Re: CSV format importer addon for Blender 3D
Posted: 20 Feb 2016, 14:30
by fazek
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.
Re: CSV format importer addon for Blender 3D
Posted: 20 Feb 2016, 14:50
by schwarzgrau
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.
Re: CSV format importer addon for Blender 3D
Posted: 20 Feb 2016, 17:11
by fazek
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...
Re: CSV format importer addon for Blender 3D
Posted: 20 Feb 2016, 17:18
by schwarzgrau
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.
Re: CSV format importer addon for Blender 3D
Posted: 20 Feb 2016, 18:21
by Svengali
Thanks for pointing out the CSV export command. It is a solution to a problem I was about to try to solve.
Sven
Re: CSV format importer addon for Blender 3D
Posted: 20 Feb 2016, 18:47
by fazek
@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?
Re: CSV format importer addon for Blender 3D
Posted: 21 Feb 2016, 11:31
by schwarzgrau
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.
Re: CSV format importer addon for Blender 3D
Posted: 21 Feb 2016, 13:19
by fazek
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.
Re: CSV format importer addon for Blender 3D
Posted: 28 Feb 2016, 14:37
by Fabrice
Nice job !
I will forward it to some of our 2D/3D users.
Re: CSV format importer addon for Blender 3D
Posted: 17 Aug 2016, 18:13
by fazek
Added support for the Folder feature of CSV 1.1 and some minor bug fixes.