forum

The new SGL Tool (Beta) - Generate Storyboards

posted
Total Posts
61
Topic Starter
MoonShade
Peppy asked me/encouraged me a long long while ago to built SGL with C# so it can be built in osu! once it is somewhat usable in a productive environment. In this time, I almost finished the project, then lost interest and had lot of other things on the go and long story short, I now want this project to move forward again.
This project is somewhat related to my old SGL, but I built everything from scratch, changed the language a lot and used other technologies to built this tool, so I think a new topic for this is needed.

What is SGL and what can I do with it?
SGL means "Storyboard Generation Language", it's a programming language which only purpose it is to produce storyboard code - both simple storyboard but also very complicated ones. What's basically better about SGL than scripting everything by hand, well, I guess you can't write thousands lines of storyboard code all by yourself now, can you? Also it's very easy to change many parameters at once if you code wisely.






Alright, where can I find it?
  1. Download (Mirror #2)
  2. User Manual
  3. Source Code
  4. List of bugs and planned improvements

Can I have some pictures?
Sure.

Please feel free to use it, improve it and copy it under the terms of GPL 3.0

And now for the important part: I need people to help improve this tool by pointing out errors, saying what they would like to see implemented. If you come across an "Unexpected Exception" or other errors apart from your coding mistakes of course, please report that in this thread or via PM! I'm thankful for any feedback from you guys! If you think you know what this tool needs which isn't already implemented or planned, please tell me!

Also, if you have a great SGL script which you think needs sharing, post/PM.
And of couse you can write here or ask via PM for any questions you might have using this tool. I hope it will be useful :)

Known Issues that hopefully will be fixed in the next release:
  1. Support for Storyboard Loops (Done)
  2. Support for Sound Samples (Done)
  3. Compiler blocks UI
  4. Several Bugs, see Bug List
Loctav
This thread and tool definitely needs more attention and more support.
Moved to General Development, stickied.
Topic Starter
MoonShade
Wow thank you Loctav, I really appreciate it <3
p3n
jemhuntr
:o this is awesome stuff <3
[Luanny]
downloading now.
Topic Starter
MoonShade
Glad you all like it. The next release will contain all storyboard functions including loops and flips, autosaving functionality and hopefully an all new GUI :)


theowest
I've included your video in the tutorial project: t/109137 If you have any other tutorials, feel free to post them in that topic.
jemhuntr
please make an option to make it high-contrast (black bg, light font) because I type better that way. (or maybe just make all the colors customizable) oh well, keep up the good job
Scarlet Devil_old_1
Have my babies
palion
very cool! I look forward to this being integrated with osu
zinckingeye
love it for those who what to make SB via coding.... + points for you...
Zexous
ErunamoJAZZ
With the help of your program can do pretty cool things, like this: https://osu.ppy.sh/s/99420
I still want to do other stuff before write some suggestions.

Thx!! ;D
MillhioreF
This program is amazing, I love it!
The only thing I'd really like to see is array support. Right now it gets pretty messy if you want to generate a whole bunch of images (e.g. snowflakes) and then call functions with them later on in the code.
Trynchen
Wow, it looks realy nice ;)
Damnae
I've just finished a storyboard using this tool : http://osu.ppy.sh/s/112399.
Expect tons of snowflakes :p

Here is the current sgf file:
SPOILER
var time_part1_start = 1085;
var time_spinner_start = 10302;
var time_spinner_end = 11140;
var time_first_object = 11811;
var time_part1_end = 24213;
var time_part2 = 25219;
var time_part2_voice_a = 42984;
var time_part2_voice_b = 43654;
var time_part3 = 46671;
var time_part4_start = 57397;
var time_part4_1 = 62760;
var time_part4_2 = 65107;
var time_part4_3 = 65442;
var time_part4_4 = 68794;
var time_part4_end = 69800;
var time_chorus_start = 70805;
var time_chorus_end = 92258;
var time_part5 = 94939;
var time_part6 = 102984;
var time_outro = 113710;
var time_end = 121755;
var time_true_end = 124436;
var time_scorescreen = 125777;

function make_title_glow(t0, t1) {
var time_title_start = t0;
var time_title_end = t1;
var time_title_a = time_title_start + (time_title_end - time_title_start) / 4.0;
var time_title_b = time_title_start + 3 * (time_title_end - time_title_start) / 4.0;

var deg_to_rad = 3.14 / 180;

var ls1 = new Sprite("ls.png", Pass, CentreLeft);
ls1.color(time_title_start, time_title_end, 17,254,176, 173,255,95);
ls1.additive(time_title_start, time_title_end);
ls1.fade(time_title_start, time_title_a, 0, 0.7);
ls1.fade(time_title_b, time_title_end, 0.7, 0);
ls1.move(time_title_start, time_title_end, 0, 142, 0 + 50, 142);
ls1.rotate(time_title_start, time_title_end, -10 * deg_to_rad, 5 * deg_to_rad);
ls1.scale(2, time_title_start, time_title_end, 1, 2);

var ls2 = new Sprite("ls.png", Pass, CentreRight);
ls2.color(time_title_start, time_title_end, 255,88,100, 255,94,55);
ls2.additive(time_title_start, time_title_end);
ls2.flipH(time_title_start, time_title_end);
ls2.flipV(time_title_start, time_title_end);
ls2.fade(time_title_start, time_title_a, 0, 1);
ls2.fade(time_title_b, time_title_end, 1, 0);
ls2.move(time_title_start, time_title_end, 640, 120, 640 - 50, 120);
ls2.rotate(time_title_start, time_title_end, -10 * deg_to_rad, 5 * deg_to_rad);
ls2.scale(2, time_title_start, time_title_end, 1, 2);
}

function make_glow(t0, duration) {
var lf = new Sprite("g.png", Foreground, Centre);

var lf_t0 = t0;
var lf_t1 = t0 + duration / 4.0;
var lf_t2 = t0 + 3 * duration / 4.0;
var lf_t3 = t0 + duration;

var screen_width = 640;
var screen_height = 480;

var offset = 100;

var lf_x = rand(offset, screen_width - offset);
var lf_y = rand(offset, screen_height - offset);

var lf_size = rand(60, 120) / 100.0;
var lf_opacity = rand(40, 70) / 100.0;

var deg_to_rad = 3.14 / 180;
var angle = rand(0, 360) * deg_to_rad;

lf.rotate(lf_t0, lf_t3, angle, angle);
lf.scale(lf_t0, lf_t3, lf_size, lf_size * 1.5);
lf.move(lf_t0, lf_t3, lf_x, lf_y, lf_x, lf_y);
lf.fade(1, lf_t0, lf_t1, 0, lf_opacity);
lf.fade(2, lf_t2, lf_t3, lf_opacity, 0);
lf.additive(lf_t0, lf_t3);

if (rand(0, 1) == 1) {
lf.flipH(lf_t0, lf_t3);
}

if (rand(0, 1) == 1) {
lf.flipV(lf_t0, lf_t3);
}

var color = rand(0, 4);
if (color == 0) {
lf.color(lf_t0, lf_t3, 17,254,176, 17,254,176);

} else if (color == 1) {
lf.color(lf_t0, lf_t3, 173,255,95, 173,255,95);

} else if (color == 2) {
lf.color(lf_t0, lf_t3, 255,88,100, 255,88,100);

} else if (color == 3) {
lf.color(lf_t0, lf_t3, 255,94,55, 255,94,55);
}
}

function make_snowflake(t0, duration, fall_speed, pop_time) {
var pop_delay = 1005; // 3 beats for this song

var pops = false;
if (pop_time > 0 && t0 + duration > pop_time) {
duration = pop_time - t0;
pops = true;
}

var lf_t0 = t0;
var lf_t1 = t0 + duration / 4.0;
var lf_t2 = t0 + 3 * duration / 4.0;
var lf_t3 = t0 + duration;

// they should never take more than one second to appear
if (lf_t1 - lf_t0 > 1000) {
lf_t1 = lf_t0 + 1000;
}

var screen_width = 640 * (1366 / 1024.0);
var screen_height = 480;
var x_offset = -((screen_width / 2) - (640 / 2));
var y_offset = - (lf_t1 - lf_t0) / 1000 * fall_speed;

var lf_x = rand(0, screen_width) + x_offset;
var lf_y = rand(0, screen_height - y_offset) + y_offset;

var lf_x_end = lf_x;
var lf_y_end = lf_y + fall_speed * duration / 1000.0;

var lf_size = rand(10, 100) / 100.0;
var lf_opacity = rand(20, 80) / 100.0;

var lf = new Sprite("star2.png", Foreground, Centre);

var abs_fall_speed = fall_speed;
if (abs_fall_speed < 0) {
abs_fall_speed = -abs_fall_speed;
}
var speed_scale_multiplier = abs_fall_speed / 200.0;
if (speed_scale_multiplier < 1) {
speed_scale_multiplier = 1;
}
var grow_factor = 1.5;

lf.scaleVec(lf_t0, lf_t3, lf_size, lf_size * speed_scale_multiplier, lf_size * grow_factor, lf_size * grow_factor * speed_scale_multiplier);
lf.move(lf_t0, lf_t3, lf_x, lf_y, lf_x_end, lf_y_end);
lf.fade(lf_t0, lf_t1, 0, lf_opacity);

if (pops) {
lf.scaleVec(pop_time, pop_time + pop_delay / 3 / 4, lf_size * grow_factor, lf_size * grow_factor * speed_scale_multiplier, lf_size * grow_factor, lf_size * grow_factor);
lf.fade(pop_time, pop_time + pop_delay / 3, lf_opacity, 1);
lf.fade(pop_time + pop_delay / 3, pop_time + pop_delay, 1, 0);
lf.additive(lf_t0, lf_t3 + pop_delay);

} else {
lf.fade(lf_t2, lf_t3, lf_opacity, 0);
lf.additive(lf_t0, lf_t3);
}
}

function make_snowflakes(t0, t1, lf_count, lf_duration, lf_minimal_duration, lf_speed, pop_time) {
for (var i = 0; i < lf_count; i++) {
var lf_t0 = rand(t0, t1 - lf_minimal_duration);
var lf_real_duration = lf_duration * rand(50, 100) / 100.0;

if (pop_time == 0 && lf_t0 + lf_duration > t1) {
lf_real_duration = t1 - lf_t0;
}

make_snowflake(lf_t0, lf_real_duration, lf_speed * rand(80, 120) / 100.0, pop_time);
}
}

function make_snowflakes_every(t0, t1, delta, pop_time) {
var lf_t0 = t0;
while (lf_t0 < t1) {
make_snowflake(lf_t0, delta * 8, 0, pop_time);
lf_t0 = lf_t0 + delta;
}
}

function make_glow_every(t0, t1, delta, max_glow_count) {
var lf_t0 = t0;
while (lf_t0 < t1) {
make_glow(lf_t0, delta * max_glow_count);
lf_t0 = lf_t0 + delta;
}
}

// --- BACKGROUND

var bg_width = 1024;
var widescreen_scale = 1366 / 1024.0;
var bg = new Sprite("bg.jpg", Background, Centre);
bg.scale(640.0 / bg_width * widescreen_scale);
bg.fade(0, time_spinner_end, 0.2, 0.2);
bg.fade(time_spinner_end, time_first_object, 0.2, 1);
bg.fade(time_first_object, time_outro, 1, 1);
bg.fade(time_outro, time_end, 1, 0.6);
bg.color(time_outro, time_end, 255, 255, 255, 221, 231, 255);
bg.fade(time_end, time_true_end, 0.6, 0.2);
bg.fade(time_true_end, time_scorescreen, 0.2, 0);

// --- TITLE

make_title_glow(time_part1_start, time_part1_start + 6000);
make_title_glow(time_part5, time_part6);

// --- SNOWFLAKES

var start_offset = 500;

// slow snowflake part
make_snowflakes(time_part1_start - start_offset, time_part1_end, 50, 10000, 1000, 30, 0);

// + spinner
make_snowflakes(time_spinner_start, time_spinner_end + 200, 400, 200, 100, 0, 0);

// fast snowflake part
make_snowflakes(time_part2, time_part3, 120, 5000, 1000, 100, 0);

// + slowdown
make_snowflakes(time_part2_voice_a, time_part2_voice_b + 400, 200, 500, 400, -140, 0);

// + faster snowflakes
make_snowflakes(time_part2_voice_b, time_part3 + 400, 500, 500, 400, -500, 0);

// denser slow snowflake part
make_snowflakes(time_part3 - start_offset, time_part4_start, 200, 10000, 1000, 30, 0);

// lots of fast snowflake part
make_snowflakes(time_part4_start - start_offset, time_part4_2, 200, 5000, 1000, 140, 0);
make_snowflakes(time_part4_1 - start_offset, time_part4_3, 100, 5000, 1000, -100, 0);
make_snowflakes(time_part4_2 - start_offset, time_part4_4, 100, 2000, 800, -200, 0);
make_snowflakes(time_part4_3 - start_offset, time_part4_end, 100, 700, 0, -350, time_part4_end);
make_snowflakes(time_part4_4 - start_offset, time_part4_end, 200, 500, 0, -500, time_part4_end);

// chorus
make_glow_every(time_chorus_start, time_chorus_end, 1005, 4);

// outro
make_snowflakes_every(time_outro, time_end, (time_end - time_outro) / (6 * 4 * 4), 0);

// end part
make_snowflakes(time_end, time_true_end, 500, 400, 300, 0, 0);
make_snowflakes(time_end, time_scorescreen, 100, 2000, 500, 0, 0);

edit: I made a second one for this map https://osu.ppy.sh/s/112781, source code is in the map's thread.
edit: and a third https://osu.ppy.sh/s/122718.
raisana
Although I never compose storyboards, this language looks like a good :)
Jafem
I am new to storyboarding but is it worth it to use this program or just do the storyboarding manually?
Kytoxid

Peekii wrote:

I am new to storyboarding but is it worth it to use this program or just do the storyboarding manually?
It's good if you want to make effects that would require a lot of effort/coordination manually, like the snow particle effects in the OP. If you want just want to SB some lyrics or an image slideshow, manually will probably be more efficient.
show more
Please sign in to reply.

New reply