Kitty Corp Meow Mix Forums

Help & Tutorials => Stage Tutorials => Topic started by: Mewtwo2000 on March 09, 2011, 06:32:05 PM



Title: Custom lighting and fogs in stages
Post by: Mewtwo2000 on March 09, 2011, 06:32:05 PM
Hi there xD

Some people are asking how to edit the lights in stages, so I'm gonna make a quick guide for this.

First of all, you need a brawlbox modset version. For example, modset 4.2. In this one, some values we're going to use are called 'Red', 'Green' and 'Blue'. In older modsets, they were called B1, B2 and B3. B4 keeps its name in every version for now.

Well. We want a custom lighting. We can do 2 things:

1- Get it from another stage, and if it fits, just use it.
2- Customize a lighting to our will.

The first one is easy, just get the scenedata[0] from a stage, extract it, and replace the scenedata[0] of your stage with it.

The second one is easy too, and more fun xD

First of all, get a lighting which is okay with all the models in your stage. There are some scenedatas with not enough light nodes to lighten all our models, and they get too lighten, too dark, or get the lights from a previously played stage. We need a good enough one. I usually use the one in Distant Planet. You can get edited versions of this in most of my stages.

Well, once you get a working lighting, you are supposed to edit it. In order to do that, you need to know which light nodes are working in your stage. So, go to scenedata[0], and find lights(NW4R). There, you will find the nodes. Select any of them. You will find that they have some editable values. The interesting ones are vec1, vec2, red, green, blue and B4.

Vec2 is the beginning point of an imaginary arrow. Vec1 is the final point of that imaginary arrow. That arrow sets the direction of the light. I usually leave vec2=(0,0,0) and only edit vec1.

Red, Green and Blue are the RGB components of the lighting. If they're equals, you will have a white lighting. The higher the values are, the stronger the light is.

B4 is working together with red, green and blue. But we don't really know how it works. The only think I know is that if B4 isn't 0, you can be troubled. You shouldn't try to edit a light node with a B4 which isn't 0. But if you do, make B4=0, and it may work.

Now, to identify the nodes working in your stage, let's think on an example. Imagine that your lights(NW4R) has only 2 nodes, light1 and light2. Well, to see if your stage uses both of them, make red=255, green=0 and blue=0 for light1, and make red=0, green=255, blue=0 for light2. Go to brawl in your stage. The red colored parts are affected by light1. The green colored parts are the ones affected by light2. If there isn't any red thing in the stage, then light1 isn't used in the stage. If there isn't any green thing in the stage, then light2 isn't used in the stage.

In our example, we're supposing the stage gets all red. No green parts. So, green (light2) isn't used. Let's make vec1=vec2=(0,0,0), red=green=blue=0. Just to know that the light isn't used.

Now, just edit vec1 (and vec2 if you want) in light1 to set the direction. And change the color/brightness by changing the red, green, blue values... And voila, you can get your ideal lighting xD

Well, this is easy, you may need some practice, but it's not hard as you see. And fogs aren't either.

Go to fogs(NW4R) and edit the nodes there. Float1 is the distance where the fog starts (it can be negative, so you're always inside the fog), and float2 is the distance where the fog is completely opaque. Red, Green and Blue are RGB. The RGB color (use any image editor to know about that) is just 3 different values from 0 to 255 that make a color together. With the red, green, blue values in any image editor like photoshop or paint, you will be able to give any color to your fog. So you only need those float1 and float2 values for the position, and the red, green, blue for the color. Easy, simple and awesome xD

This is an example of a custom fog. There's no other fog like this in brawl. The lighting is also custom, of course.

(http://img830.imageshack.us/img830/2076/al1010280106binout.jpg)

Also, to get a perfect lighting in your stage, change the directions of the shadows to fit the scene. This is done by changing the 0x2c and 0x30 offsets in the miscdata[10] file in the stage. This way you can get things like this:

(http://i56.tinypic.com/2ptz1g6.jpg)


Title: Re: Custom lighting and fogs in stages
Post by: Ricardo­ on March 09, 2011, 06:35:25 PM
So you actually made it. Time to tell I.S.  ;D


Title: Re: Custom lighting and fogs in stages
Post by: Chuckdurnham on March 09, 2011, 08:56:12 PM
Horray! This will be really handy for my Bowser Battle stage.
Im thinking heavy orange and purple lighting.


Title: Re: Custom lighting and fogs in stages
Post by: Chuckdurnham on March 09, 2011, 09:23:58 PM
oh and i dont have a light1 or 2 i have a stage 1 and 2 if thats what you meant


Title: Re: Custom lighting and fogs in stages
Post by: DAO_Ibuki on March 10, 2011, 12:12:45 AM
yay! gracias por el tuto *w*


Title: Re: Custom lighting and fogs in stages
Post by: Mewtwo2000 on March 10, 2011, 05:28:04 AM
oh and i dont have a light1 or 2 i have a stage 1 and 2 if thats what you meant

It was just an example with random names. Stage1 and Stage2 could be the names too. Also, there's usually a char1, or char2 or similar, and those are the lights for characters. But just test all of them to be sure which one is affecting each part.


Title: Re: Custom lighting and fogs in stages
Post by: Puraidou on March 10, 2011, 06:12:21 AM
This is handy, this might get some stage idea's off mine to be done xD
Yeah no inspiration and time does kill the idea's. This how ever got me some idea's ;D


Title: Re: Custom lighting and fogs in stages
Post by: CoolTrainerCore on March 10, 2011, 12:52:00 PM
¡Excelente tutorial! ¡Desde hoy te llamaré Master!

Ahora entiendo algunas cosas, como el hecho de que el juego se congelara cuando cambié el color en algunas luces de Orpheon (el valor de B4 no era 0).

Gracias por incluir lo de la dirección de las sombras. Me muero por probar todo esto en cuanto regrese de viaje. :happy:


Title: Re: Custom lighting and fogs in stages
Post by: Link40 on March 10, 2011, 01:34:22 PM
Great guide, it made me learn a few new things about lighting. Great job :)


Title: Re: Custom lighting and fogs in stages
Post by: ItalianStallion on April 17, 2011, 05:19:58 PM
Well I know my basics about RGB colors by using Irfanview and Photoshop, so this shouldn't be too hard for me to do.

Great guide man, I actually read every single word in it. I'm currently trying to give my latest stage a custom lighting, using BrawlBox Modset 4.2

Everything makes sense, it's just a matter of practice and what not.

Thanks for the guide!


Title: Re: Custom lighting and fogs in stages
Post by: Shinobu Nyan! on April 18, 2011, 07:31:23 AM
Nice guide. Easy. Simple. Idea Sparking.
I need a bit of help though. The fog data isn't showing up. The light data does but not the fog.


Title: Re: Custom lighting and fogs in stages
Post by: Mewtwo2000 on April 18, 2011, 10:14:07 AM
What you mean? There's no fog in your stage even having edited it to be there?


Title: Re: Custom lighting and fogs in stages
Post by: Shinobu Nyan! on April 18, 2011, 10:49:37 AM
I fixed it. What I ment was when trying to edit the nods they werent there.


Title: Re: Custom lighting and fogs in stages
Post by: ItalianStallion on April 20, 2011, 01:55:53 AM
Now, to identify the nodes working in your stage, let's think on an example. Imagine that your lights(NW4R) has only 2 nodes, light1 and light2. Well, to see if your stage uses both of them, make red=255, green=0 and blue=0 for light1, and make red=0, green=255, blue=0 for light2. Go to brawl in your stage. The red colored parts are affected by light1. The green colored parts are the ones affected by light2. If there isn't any red thing in the stage, then light1 isn't used in the stage. If there isn't any green thing in the stage, then light2 isn't used in the stage.


<_<_<_<_<

(http://i54.tinypic.com/2rnbs79.png)

Watermelon Temple?



Title: Re: Custom lighting and fogs in stages
Post by: Puraidou on April 20, 2011, 02:34:13 AM
<_<_<_<_<

([url]http://i54.tinypic.com/2rnbs79.png[/url])

Watermelon Temple?

HAHAHA XD
Pure win right there xD


Title: Re: Custom lighting and fogs in stages
Post by: SmasherOfHyrule on April 21, 2011, 05:12:10 PM
err... BrawlBox isn't letting me edit the values. is there a certain thing I have to do in order to edit the values? (I'm trying to edit FD's fogs)


Title: Re: Custom lighting and fogs in stages
Post by: ItalianStallion on April 21, 2011, 08:07:01 PM
Yeah, you need BrawlBox Modset 4.2

Mewtwo mentioned it in one of the first sentences on his OP.


Title: Re: Custom lighting and fogs in stages
Post by: Parvati ~ <3 on May 01, 2011, 02:03:41 PM
Thank Yeww this should help now.


Title: Re: Custom lighting and fogs in stages
Post by: xZedkiel on May 11, 2011, 07:22:26 PM
So let's say I wanted to make it look like it was night time, how would I do that?


Title: Re: Custom lighting and fogs in stages
Post by: ItalianStallion on May 11, 2011, 09:49:34 PM
So let's say I wanted to make it look like it was night time, how would I do that?

Well the highest is 255. If you have 255 for Red, Green, and Blue then it would look white. What you would have to do is make it a low number, but not too low cause then it will look black.

To give it a night time feel, make sure the blue is a little higher then the rest, so it stands out and gives it that dark blue night lighting.

Hope that helps.


Title: Re: Custom lighting and fogs in stages
Post by: BriefCasey795 on December 16, 2011, 05:58:21 PM
Cool. Are you gonna use a different way of this method for your completed FD64?


Title: Re: Custom lighting and fogs in stages
Post by: Xeblon on February 20, 2013, 07:20:37 PM
Heey Mewtoo!

how exactly does float work in fog?
u can only put in one value, so it isnt like vector in light i guess.

i mean.. is it only the Z value you put in on float?

and if that is the case... can i have different fogs on different Y-area?

sry, i have no wii nearby, so i cant test atm xD


Title: Re: Custom lighting and fogs in stages
Post by: Mewtwo2000 on February 21, 2013, 04:01:32 AM
Unless there are more kinds of fog I don't know yet, the fogs in brawl are just controlled by distance. That means that there's no coordinate, it isn't Z or Y or X, but a distance to the camera in any direction. So, when you zoom out, the fog invades all the place cause the models are at a bigger distance.

With this said, no, you can't have different areas of fog, or at least I don't know how to do it. You can always use models to simulate different fogs, that would be an option.


Title: Re: Custom lighting and fogs in stages
Post by: Legend of Jesse on April 16, 2013, 09:03:43 PM
could you briefly describe an animated lighting? (i guess that's what you would call it) but say you wanted the lighting to change from one setting to another after a certain time frame... how would that be done?


Title: Re: Custom lighting and fogs in stages
Post by: Nezha the Scout on July 14, 2013, 12:20:36 PM
Thanks, very informative!


Title: Re: Custom lighting and fogs in stages
Post by: E-scope12 on June 30, 2014, 02:53:51 PM
Mewtwo2000 I have a question. How to animate a light in a scene settings the right way?