forum

The new SGL Tool (Beta) - Generate Storyboards

posted
Total Posts
61
show more
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.
ErunamoJAZZ

Peekii wrote:

I am new to storyboarding but is it worth it to use this program or just do the storyboarding manually?
lol, This is for "effects factory"( http://en.wikipedia.org/wiki/Factory_%2 ... concept%29 ). If you have not learned to do Storybards not understand what you're doing.
Learn first (using the editor), and if you ever need to do many effects together, use the SGL.
- Marco -
This is f****g awesome!
Hellgert
SGL take a long time to open,pls fix
DJNightmare
How do you add hitsound triggers? and how do add the Additive Blend Mode into the animation?
Deimos
Does anybody know, why I am unable the commands like ".flipH", ".flipV" or ".additive" in SGL Tool (Beta 1.1.002) ?
Do I have to update something?

Thanks for answers.
Damnae

Deimos wrote:

Does anybody know, why I am unable the commands like ".flipH", ".flipV" or ".additive" in SGL Tool (Beta 1.1.002) ?
Do I have to update something?

Thanks for answers.
These are in the source code but aren't available in the current downloadable version.
I've build a more recent version: http://puu.sh/8bmSK.zip, sources are here: https://github.com/Damnae/osu-sgl
Vathlauss
Neat!
Deimos

Damnae wrote:

Deimos wrote:

Does anybody know, why I am unable the commands like ".flipH", ".flipV" or ".additive" in SGL Tool (Beta 1.1.002) ?
Do I have to update something?

Thanks for answers.
These are in the source code but aren't available in the current downloadable version.
I've build a more recent version: http://puu.sh/8bmSK.zip, sources are here: https://github.com/Damnae/osu-sgl

Thank you very much.

But how I see, it's currently not possible to create some simply 3D-Rotation, I am right?
Damnae
You can do simple things that would look like 3d, but you can't load a 3d model using the sgl language yet.
And by simple I don't mean it would be simple to do, but that it would be simple shapes like a sphere or something.
ErunamoJAZZ
I think that SGL is not a good approach to a real and powerful scripting system.
SGL is good for simple users, who do not know much programming. But it is very restrictive.
I think it might be more helpful, write a library in any language that is easy, and general purpose. Thus, there would be no need to worry about a language compiler, only for the functionality to transform objects (Spliters or animations) to the language of SB.

Python or Ruby could be good candidates.
Damnae

ErunamoJAZZ wrote:

I think that SGL is not a good approach to a real and powerful scripting system.
SGL is good for simple users, who do not know much programming. But it is very restrictive.
I think it might be more helpful, write a library in any language that is easy, and general purpose. Thus, there would be no need to worry about a language compiler, only for the functionality to transform objects (Spliters or animations) to the language of SB.

Python or Ruby could be good candidates.
SGL is still programming. It's useful to get started if you don't want to install visual studio or something like that.
That "library" exists, it's the modified version of sgl I use to make storyboard in c#: https://github.com/Damnae/osu-sgl
ErunamoJAZZ

Damnae wrote:

SGL is still programming. It's useful to get started if you don't want to install visual studio or something like that.
That "library" exists, it's the modified version of sgl I use to make storyboard in c#: https://github.com/Damnae/osu-sgl
Of course. C# can be used, like you've done, and it's not a bad way.
Although my point is that: C# is not a scripting language.

This is something I thought since I made a simple SB with SGL long time ago (in this thread).
C# is an excellent object-oriented language, but it requires a whole development environment. However, a scripting language can be lighter, in the sense that it is powerful, without too many configurations.
From the day you did the epic SB in jonathan's mapset, I've been thinking to write a prototype for personal use, although I have not had the time (I've had a lot of work).
but anyway ... someday, maybe xD
Secretpipe
Looks difficult :c But I want learn
DingGGu
How to Make Midi Fighter for Osu-StoryBoard with SGL Tool easliy? (http://youtu.be/46QX2hTGwPs?t=44s)

anyone has good&nice idea?

i already have image source (i made it)
ErunamoJAZZ
this will be easy with a array or matrix var type... but sgl have not this type.
btw... you can see oficial colors in "Arcade Button LEDs" section: http://www.djtechtools.com/downloads/do ... RAKTOR.pdf

EDIT> Not have the array or matrix types, does not mean it is not possible, just you have to write more.
DJNightmare


Well, I did it...

This was caused by the creation of this
ErunamoJAZZ
code?
DJNightmare

ErunamoJAZZ wrote:

code?
Gone ;u;

Did not save QAQ
Topic Starter
MoonShade
Seeing that I don't do much about that project anymore but that there are people interested in new features, I encourage others to add missing features. I'm hereby providing some information that should help getting into the development:
  1. In order to understand how SGL works and modify the language to your needs, please read the following articles: [Link] - they use Java, but doing it in C# is really not that different. It will cover the base techniques I used to create the language and explain what Antlr is and what it does. There is also an example on how to add array support.
  2. Use Antlr Version 3.1.3 together with AntlrWorks 1.4 in order to compile antlr files. This is the latest version that supports the c#/.net 2.0 target, at least to my knowledge. You are also going to need the CSharp2 runtime for antlr.
  3. Here are two files which you're going to need in order to modify the language and generate the Parser and the TreeWalker in C# with the help of Antlr: [Link]
Xgor
The site is down :< It's much harder to work with it w/o seeing the docomentation
pandorawindy
why i cant open the user manual page .. wht is it ? Teach me how to use the SGL code ? and plz give me enable link..thx
Topic Starter
MoonShade
Sorry, I'll be looking into it ASAP.

As a temporary solution, please download this archive, in it you'll find the saved HTML pages from the user manual: http://puu.sh/bIZnK/7ffbd31258.rar
pandorawindy

MoonShade wrote:

Sorry, I'll be looking into it ASAP.

As a temporary solution, please download this archive, in it you'll find the saved HTML pages from the user manual: http://puu.sh/bIZnK/7ffbd31258.rar
thank you ! :)
YielShelion

MoonShade wrote:

Sorry, I'll be looking into it ASAP.

As a temporary solution, please download this archive, in it you'll find the saved HTML pages from the user manual: http://puu.sh/bIZnK/7ffbd31258.rar
Thanks a lot :3

Anyway can I have full class description such as : sprite.move(startTime, startTime + 3000, x, -50, x, 500)
like move, fade, scale, vector, flip, additive, because the website is down.

*EDIT*

The page "SGL Manual - 05 Create Own Functions.htm" is same as "SGL Manual - 06 Class Sprite Animation.htm" in the HTML user manual puush-ed by MoonShade.
Seems like the 6th pages is missing.
rhalp10
Nice !
Howl
Since the OP download links seem to not work, http://a.pomf.se/vifvtg.rar (the archive should have in it all the DLLs needed, in case it doesn't work tell me!)
Damnae
Or you can get an updated version there: https://github.com/Damnae/osu-sgl/releases
arviejhay
i will download this if i learn how to code lel
- Marco -
can someone reupload the user manual? ;w;
troke

marcostudios wrote:

can someone reupload the user manual? ;w;
here

MoonShade wrote:

Sorry, I'll be looking into it ASAP.

As a temporary solution, please download this archive, in it you'll find the saved HTML pages from the user manual: http://puu.sh/bIZnK/7ffbd31258.rar
AdeHaze
Wooo,, a great tool,, thanks. :)
AdeHaze

MoonShade wrote:

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 :)


Hmm,, can i ask the link?

im looking for it, but all the tool that i downloaded, didnt same as your ss.
-Atri-
Reupload link plz :( i can't download it
Damnae
-Atri-
Thanks Damnae :D
Ashasaki
Hoping It supports array too :/
Gregorian_24
That's cool program, i must say it's pretty useful for storyboard coding
Bxrdy-
This tool is amazing dude, great job with that! I think maybe a modified style or just a DevExpress theme would be cool, what do you think about?
prometheus_v
fake afffffffffffff:

1. you cant make a programming language , this is just a program that generates storyboards
2. this program is just a textbox that makes storyboard scripting easier
Raiyn

OwOwWhatsThis wrote:

fake afffffffffffff:

1. you cant make a programming language , this is just a program that generates storyboards
2. this program is just a textbox that makes storyboard scripting easier
That's kinda the point?
Jojajim
Thanks ! :D
Please sign in to reply.

New reply