Automatically generate variations on a group

Post questions on how to use or achieve an effect in Inkscape.
DragonHorse
Posts: 2
Joined: Sat Sep 16, 2017 10:02 pm

Automatically generate variations on a group

Postby DragonHorse » Sat Sep 16, 2017 10:56 pm

Hi all,

I'm not sure that what I want to do is possible or not, but wonder if you can advise on it?

I have created a simple drawing consisting of a number of grouped objects (they're all on the same layer if that makes a difference) and I want to create a large number of copies with increasing blur (60 -120 images in 1% or 0.5% increments). The blur I'm talking about is the value that can be set in the 'Objects' panel expressed as a percentage.

The idea is to use the images in a simple animation like a dispersing gas cloud. I'd like to basically be able to set a number of copies to produce and the blur increment to apply for each one and get a bunch of separate SVGs (or PNGs even provided I can set the target resolution for the export as I'd need to do the same in different resolutions).

I''m guessing that it may be possible to do this with inkscape command line (which I have no experience of), and perhaps wrapping that in a script (I'm comfortable with normal shell scripts). So I'd need advice on the Inkscape command line.

I guess another option would be pure scripting and manipulating copies of the source file with sed or something similar, but I'm not familiar with SVG internals and I couldn't see anything obvious in the source file that says 'Blur = 1.5%' for example, so I'm assuming the blur in the UI is an aggregation of attributes - I'd be happy to deal with that I think, but can anyone point me in the right direction of which attributes I need to be manipulating and how they map into a blur percentage?

Thanks!

tylerdurden
Posts: 1747
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Automatically generate variations on a group

Postby tylerdurden » Sat Sep 16, 2017 11:55 pm

Check out tiled clones. Copies can be generated in the same location with changes in blur.

Create_Tiled_Clones_2017-09-16_09-39-59.png
Create_Tiled_Clones_2017-09-16_09-39-59.png (20.05 KiB) Viewed 264 times

Shift.png
Shift.png (21.86 KiB) Viewed 264 times

http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Tiles.html

Be forwarned, lots of blurred objects can slow the fastest computer down and appear to have stalled it. Working with the Inkscape window small can help there.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

DragonHorse
Posts: 2
Joined: Sat Sep 16, 2017 10:02 pm

Re: Automatically generate variations on a group

Postby DragonHorse » Sun Sep 17, 2017 10:37 pm

This is absolutely great, thanks very much for pointing it out!

It will be really useful for other things I need to do too :)

User avatar
brynn
Posts: 9539
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Automatically generate variations on a group

Postby brynn » Mon Sep 18, 2017 5:18 am

Here's a reference for the Inkscape command line tool: https://inkscape.org/en/doc/inkscape-man.html

Probably such an animation could be made with filters. Lazur has been experimenting lately, with animation and filters: viewtopic.php?f=9&t=19236&start=50

Please show us what you come up with!

Lazur
Posts: 4345
Joined: Tue Jun 14, 2016 10:38 am

Re: Automatically generate variations on a group

Postby Lazur » Mon Sep 18, 2017 5:55 am

Dispersing gas cloud animation with filters?
Oh well.
Only chrome/cromium renders smil animated svg-s, and without any consistency. The smaller size helps speeding it up/reducing the lagging, but still.
Probably it wouldn't be fluent when recorded with a screen capturer for making a gif double.
Guess it would be easier exporting png-s from separate svg-s each having one filter value altered.

Altering the blur level from 0-100% won't create a loop, wondering what exactly are you after.

Lazur
Posts: 4345
Joined: Tue Jun 14, 2016 10:38 am

Re: Automatically generate variations on a group

Postby Lazur » Mon Sep 18, 2017 7:35 am

Here goes a shot at an animated gas filter -in pack-:

SVG Image

original source

Edit:
Made another pack here.


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: No registered users and 3 guests