Stage Workshop

Started by LegacyWolf, February 02, 2013, 09:03:10 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

@DSX8 - Yessir! I plan on handing things to you after I struggle for a while.  I want to learn the engine so that I can be self sufficient. Plus its fun to struggle some times and its been interesting to learn.  I plan on trying to put together a Maya stage guide for noobs when i finish this project.  Basically every wall that i hit and couldn't find answers to online should be documented somewhere.

Theres another problem that im having right now where when someone gets hit by the sweet spot of an attack and there is that bright flash on screen it causes all of my UVs to get distorted for a frame or two.  It was strange because i played four matches against my roommates and none of them even noticed it, but it was glaringly obvious to me.

@Eternal Yoshi, thanks for the writeup.  I'll give that a shot.  I need to make both semi transparent objects (clouds) and also hard masked items (tres).  What do I need to do differently between these two, or can I just use the same shader that you provided?

For Semi transparent objects, you have to make the first number 100 instead of 128, and you need to set the option EnableBlend(It's below the green box) to true in the material.

There's a slightly different Material that you have to use as well.

Quote from: LlamaJuice on February 02, 2014, 07:43:01 PM
@DSX8 - Yessir! I plan on handing things to you after I struggle for a while.  I want to learn the engine so that I can be self sufficient. Plus its fun to struggle some times and its been interesting to learn.  I plan on trying to put together a Maya stage guide for noobs when i finish this project.  Basically every wall that i hit and couldn't find answers to online should be documented somewhere.

Theres another problem that im having right now where when someone gets hit by the sweet spot of an attack and there is that bright flash on screen it causes all of my UVs to get distorted for a frame or two.  It was strange because i played four matches against my roommates and none of them even noticed it, but it was glaringly obvious to me.

@Eternal Yoshi, thanks for the writeup.  I'll give that a shot.  I need to make both semi transparent objects (clouds) and also hard masked items (tres).  What do I need to do differently between these two, or can I just use the same shader that you provided?
sure thing, i can wait for it!
https://privateladyescorts.com - Free Local Dating - No Selfie - Anonymous Casual Dating -   Video Chat Private Lady

I've started my second stage import but I'm unsure how i would get the lighting to resemble the original version from Defiance. I heard that vertex painting might help in some aspects but as for the main lighting I'm lacking some direction as of where to go from here.
Original:
Sorry but you are not allowed to view spoiler contents.

My progress:
Sorry but you are not allowed to view spoiler contents.

February 02, 2014, 11:55:26 PM #409 Last Edit: February 02, 2014, 11:58:08 PM by Syvkal
That looks pretty damn beautiful Kiro! And if you manage to get the lighting working O.o

Here's my current project:

Sorry but you are not allowed to view spoiler contents.

Quote from: Syvkal on February 02, 2014, 11:55:26 PM
That looks pretty damn beautiful Kiro! And if you manage to get the lighting working O.o

Here's my current project:

Sorry but you are not allowed to view spoiler contents.

Nice! :D
"Atone for my sins? I don't have any sins to atone for nor have I forced such a meaningless concept on anyone." -Archer
[spoiler]
Quote from: WarioMANX on May 02, 2014, 07:33:43 PM
Best color, most stars, and least amount of power. The good life.
Quote from: LC the Immolator on November 07, 2014, 03:57:35 PMLearning sucks, yeah, but it's from learning that you can eventually create masterpieces.

February 03, 2014, 01:22:45 PM #411 Last Edit: February 03, 2014, 01:38:54 PM by Mewtwo2000
Quote from: Eternal Yoshi on February 02, 2014, 12:16:53 PM
Hmm...

First off in order to do transparency, you need the texture to be transparent (as in a checkered background in photoshop/gimp, not a black background) and to save it as a .png.

When you get it in there, you need to make the format either CMPR or RGBA8(For semi transparency)

Also for materials that have textures you want transparent, you need to edit the highlighted part of the material that the clouds/whatever you want transparent use.

Also right click the Mdl0 block and make a new Shader for the transparent parts to use. Here's an example of a Shader ready for transparency usage.

http://www.mediafire.com/download/bwv1862u8nn1do6/ShaderTrans


A few notes here:

PNG is fine, but it kills the color information in the fully transparent pixels. Well, at least for me, not sure if it happens in all cases. Anyway, there's cases in which those invisible pixels are transparent black pixels, and they're visible in-game because of the blur used in the materials. If you import a TGA texture with an alpha channel instead, you can have fully transparent pixels with colors other than black, which makes the borders look better.

CMPR only has hard transparency (pixels are visible or not visible, not middle terms). RGBA8 is the best for semitransparency, but the image files in this format are too big. Sometimes the quality doesn't need to be that good and RGB5A3 is another option for semitransparency. RGB5A3 can also be used for hard transparency materials in case CMPR compresses too much the textures and look bad. And there's also the CI8, but materials need to know that there's a palette in this case.

About the shader, there's no real need to use a new shader specifically for the transparent materials. If the light properties are the same, transparent and not transparent materials can share the same shader. If the one generated by brawlbox automatically doesn't work, disable the alpha in the first color channel in the material:



You may need different shaders if you're using materials that use lighting together with materials that don't use it. For example, you may be interested on having a sky that's not affected by lighting. That could use a different shader that doesn't have the 'RasterColor' in its stages, and whose ColorScale is smaller. Depending on the vertex colors you're using if any, you'd need MultiplyBy2 or MultiplyBy1 instead of the standard MultiplyBy4. The MultiplyBy4 comes because the lighting in stages have small color values (something like 120,120,120 overall), and that color is multiplied by the color in the stage model, usually (128,128,128). This means that you get something like an overall (60,60,60) in the model. To look fine, the model should have values around white (255,255,255), that's why the shader gets that (60,60,60) and multiplies it by 4, so the model in this case would get colors around (240,240,240).

If you make the material not to use the stage lighting, you'll have that (128,128,128) alone. The shader in this case needs to multiply only by 2, to get an exact (255,255,255).

Also, if instead of a standard (128,128,128) you're using vertex colors, and your brightest color is white (255,255,255), then your shader doesn't need to multiply by anything, so your shader should have the MultiplyBy1.



So, in short, you don't really need different shaders for different transparency options, materials can share the same shader. It's when you combine lighting-affected with lighting-unaffected models that you may need different shaders.

The better option for stages is vertex-coloring, so you don't need a complex and specific lighting set to obtain nice colors. You can emulate the casting of shadows and other stuff that the brawl lighting will never do. If you vertex-paint your model, use a shader for that. If you're using parts without coloring, you can either paint them white and keep the same shader, or paint them grey and use a MultiplyBy2 shader. For materials affected by lighting, you'll need (128,128,128) as the vertex colors and the MultiplyBy4 shader. You can also have vertex colors plus stage lighting, but you have to remember that stage lighting will darken those vertex colors and you'll probably still need the MultiplyBy4 one.
SW FC: SW-5958-4724-5095
Wii FC: 1247-2259-6207
Twitch: http://twitch.tv/mewtwo2000
Visit my stage thread here


Stage light and fog tutorial
Stage shadows tutorial

You're insane dude, I appreciate it.

I was having limited success with Yoshi's writeup (Stuff kinda worked, but... i eventually just went through a bunch of brawl stages, looked at all the shaders/materials used in similar situations that I'd need and tried to replicate them.
It's not perfect, but it gets the job done for now. (Example of not perfect, the clouds don't dim with the lighting changes in my stage)

Anyhow, I played with the lighting a lot today.  I wanted to try to figure out how I could make a day/night cycle in the game and I think I came pretty close.  I was running into a wall of errors when trying to add animated fog to the mix, where it seems like the fog item would just constantly get corrupted.  Set a value in a fog item... have it work.  make any tweak at all and it'll just show solid black across the whole stage aside from the characters.  Was not cool.

In the process, I got tired of going through the flows of injecting my maps into a virtual SD card to use in Dolphin... so I made a macro using AutoHotKey that lets me click one button to go from saving in brawlbox to loading my map in about three seconds.  It's pretty glorious, expecially for stuff like this, where I can't see my changes until I launch the game.

I'm too happy with myself to spoiler this one.  You'll all just have to suffer.
Venus Lighthouse (Golden Sun) custom stage for Super Smash Bros. WIP 02

I still have to do player shadows, the effect of the tower splitting apart, and if the day/night cycle thing is working... I might try to push the effect further.  (Add lights to the town at night, make the small pyramids on my tower into some sort of lanterns or something that'd light up at night) not too sure yet.

Has anyone else done a day/night cycle?  I'm guessing someone has, but I just hadn't ever seen one in brawl that animates as the stage progresses.  (That being said, my knowledge of the contents of the Brawl Vault is pretty limited.)

Quote from: LlamaJuice on February 03, 2014, 06:04:46 PM
You're insane dude, I appreciate it.

I was having limited success with Yoshi's writeup (Stuff kinda worked, but... i eventually just went through a bunch of brawl stages, looked at all the shaders/materials used in similar situations that I'd need and tried to replicate them.
It's not perfect, but it gets the job done for now. (Example of not perfect, the clouds don't dim with the lighting changes in my stage)

Anyhow, I played with the lighting a lot today.  I wanted to try to figure out how I could make a day/night cycle in the game and I think I came pretty close.  I was running into a wall of errors when trying to add animated fog to the mix, where it seems like the fog item would just constantly get corrupted.  Set a value in a fog item... have it work.  make any tweak at all and it'll just show solid black across the whole stage aside from the characters.  Was not cool.

In the process, I got tired of going through the flows of injecting my maps into a virtual SD card to use in Dolphin... so I made a macro using AutoHotKey that lets me click one button to go from saving in brawlbox to loading my map in about three seconds.  It's pretty glorious, expecially for stuff like this, where I can't see my changes until I launch the game.

I'm too happy with myself to spoiler this one.  You'll all just have to suffer.
Venus Lighthouse (Golden Sun) custom stage for Super Smash Bros. WIP 02

I still have to do player shadows, the effect of the tower splitting apart, and if the day/night cycle thing is working... I might try to push the effect further.  (Add lights to the town at night, make the small pyramids on my tower into some sort of lanterns or something that'd light up at night) not too sure yet.

Has anyone else done a day/night cycle?  I'm guessing someone has, but I just hadn't ever seen one in brawl that animates as the stage progresses.  (That being said, my knowledge of the contents of the Brawl Vault is pretty limited.)
I feel there's too many clouds in the background, but that's just my opinion.
NNID: Cha0sKnight     3DS FC: 4768-7680-2509

Holy crap that stage looks beautiful, especially in-game!
I wasn't sure how the actual stage layout would affect gameplay, but it looks like it really flows well - kind of like a more manageable version of Peach's Castle :P

Quote from: LlamaJuice on February 03, 2014, 06:04:46 PM

Has anyone else done a day/night cycle?  I'm guessing someone has, but I just hadn't ever seen one in brawl that animates as the stage progresses.  (That being said, my knowledge of the contents of the Brawl Vault is pretty limited.)

Well, I have one, but it's not in the vault yet:

[Project M] - Gerudo Valley: Red Team Vs Peach

I got another, it's not a day-night cycle, but it's also a stage with changing lighting. This one can be found in the vault:

[SSBB hack] - All SM64 Bowser stages (smaller, tilting and looped)
SW FC: SW-5958-4724-5095
Wii FC: 1247-2259-6207
Twitch: http://twitch.tv/mewtwo2000
Visit my stage thread here


Stage light and fog tutorial
Stage shadows tutorial

Thank you M22K, for a superior look into this and for offering better help.

Llama. That looks [censored]ing beautiful.

I gotta play Golden Sun, but I want to finish up Tales of Vesperia first.
[white]: SW-2632-7270-6724[/white]


Thanks for all the love everyone :P

@Chaos_Knight: I agree, I intend on animating them to slowly pan to the left, loop it with the day/night cycle to have the clouds only really thick during the bright blue part of the day.  Thanks for the feedback sir!

Mewtwo2000, how did you accomplish that day-night transition in Geurdo Valley?  I'm assuming your job of it is more clean than mine.

I have my one scn0 that has a 10,000 frame animation that loops.  Every 2,000 frames hitting the next main point of the day cycle.  (Morning, noon, evening, dusk, midnight.)

Also, in my stage there's a weird issue where when someone gets hit with a smash attack at high percentages it kills all of my UVs for a frame or two, does anyone know why this would be happening?  It's been happening before I got any of the transparency or lighting or anything to work too, so I don't think it was something I broke in a shader.

You can see it happening at the 2:25 point in my video when Samus dsmashes me and again at 2:30 when I fsmash her.  All of the meshes I imported do that at the same time, players aren't effected.  Does anyone have any idea as to why this might happen?

Very cool so far! And yes, from what I understand, the latest versions of BrawlBox have a habit of corrupting the Lighting/Fog if you edit them. This is why the lighting in Bowser's Keep isn't as perfect as I'd like it to be. I'm looking forward to seeing the stage split!
Click for my stuff: