Kitty Corp Meow Mix Forums

Help & Tutorials => Stage Tutorials => Topic started by: Mewtwo2000 on July 05, 2012, 10:06:29 AM



Title: New guide to custom shadows in stages
Post by: Mewtwo2000 on July 05, 2012, 10:06:29 AM
If you're a stager, you may want to keep reading. If you are not going to make a stage in your life, then leave xD

Well, if you're experienced with stages, you probably know how to make them so characters cast shadows on the floor. One of the possibilities is using what I called the MShadow model, just a modified (vertexed) Wifi Room model shaped as a rectangular piece of ground that made shadows visible. Well, in this tutorial, we're gonna use it, but only as a helper.

Sometimes, you may need a real custom shape. I've used vertexing on my MShadow models to make the shapes I needed, just like what I've been doing to the 2D pieces I vertexed to build some of my stages. But that's a little troublesome, specially if you're not familiar with vertexing, or if you want not to use lots of models just to make the shadows.

The ideal case would be building the shape with 3DS Max, and apply the material and shader needed to build a custom MShadow model once the mdl0 is made. But brawlbox can't do that currently. Shadow materials aren't messed up anymore, but you can't import them the way you can import any other material. There's some small difference and brawlbox crashes. Until that's fixed, I've made my own custom material by hexing. It's not that hard, but that's not what I'm gonna write here.

What we're gonna do is simpler. Go to this link:

http://www.mediafire.com/?6n7x3u9xrb2pf (http://www.mediafire.com/?6n7x3u9xrb2pf)

Use the material and shader on a custom shape made in 3dsmax. Be sure to rename the material as MShadow1 and the texture as TShadow1.

(http://i.imgur.com/Ov97U.png)

IMPORTANT. The shape(s) you make need to be singlebind. That means one bone per object (or one bone per skin, if you prefer). The model can have as many bones and objects as you want, and the different objects can use different bones as long as they only use one each. For this, all the different objects will need to use the same material. If you can't see the singlebind bone in brawlbox in all the objects that use the MShadow1 material when in mdl0 format, then you've done it wrong. You can include the shadow shapes in your stage model, they don't need to be in a separate model. And the objects not using the MShadow1 material can be multi-boned, there's no reason to worry about them.

Well, this doesn't work yet, the material I've given you isn't perfect. If it was, it would crash brawlbox as I told you before. This one doesn't. Anyway, this one is enough, cause, if you have my old MShadow model (included in the previous link) in the same modeldata, what's needed in the material to work fine is gotten from here. So, you need the custom model you make, with the custom material and shader I've given you, plus the invisible (0 size) version of the old MShadow model I've always used. Those together will let you have the exact shapes for your shadowed floors in one model.

Oh, one more thing. If you want your shadows in a different color or opacity, check these values here:

(http://i.imgur.com/R5Cbr.png)

Maybe the explanation isn't clear enough, for any doubt if you try it and don't suceed, just ask. If nobody got it to work, maybe I'm wrong with something. So, I'll be thankful to those who try it and succeed if they claim here to be successful.


Title: Re: New guide to custom shadows in stages
Post by: Dr. on July 05, 2012, 12:16:20 PM
O_O *gets hyped* *waits eagerly*
(if you need second post, I can delete this)


Title: Re: New guide to custom shadows in stages
Post by: Mewtwo2000 on July 05, 2012, 12:38:27 PM
xD

No, I don't need it, I'll fill the first one with the rest of the stuff :P



Title: Re: New guide to custom shadows in stages
Post by: Gamma Ridley on July 05, 2012, 12:55:44 PM
I know it isn't finished yet, but will you include a way to add shadows to background models? If that's even possible?


Title: Re: New guide to custom shadows in stages
Post by: Mewtwo2000 on July 05, 2012, 01:16:45 PM
Background models? You mean the stage models themselves? Well, I suppose it's obvious, but... if your stage model has been in 3dsmax, you can duplicate the ground polygons to make the shadows object, and use that object as the object for the shadows inside the stage model. You need polygons in which you use the material, if you don't have them, you can't add the shadows to that model. So, unless you port the stage back to 3dsmax to clone some parts, you can't add them to the mdl0 file. Anyway, you can always use a new model only for shadows, so you use 1 model for visuals, and a different one for shadows.

If you import or make your own stage, then it's easy to have an all in 1 model with both visuals and shadows.


Title: Re: New guide to custom shadows in stages
Post by: Gamma Ridley on July 05, 2012, 01:22:17 PM
Obvious to you maybe. :|

I meant, like, animated models in the background. Like Dialga/Palkia. Or even platforms. I know how to add shadows for playable characters and all that junk, but I just didn't know if adding a shadow model and positioning it under models in the back would work.

What you said makes perfect sense, though, so I'll try that.


Title: Re: New guide to custom shadows in stages
Post by: Mewtwo2000 on July 05, 2012, 01:30:40 PM
Oh, you mean non-player models casting shadows? No, that's not possible, sorry. Characters do cast shadows because they have some low-res version of themselves that are used for shadow casting afterwards. To make dialga to cast a moving shadow, for example, you would need to get a black and transparent version of dialga to be moved on the ground with a null vertical size.

Lensho has done that same thing in one of his pokemon stages.


Title: Re: New guide to custom shadows in stages
Post by: Gamma Ridley on July 05, 2012, 01:50:09 PM
Bah. Thought so.

Well, that sounds like a pain, but I can go ahead and give that a shot. Thanks for the help.


Title: Re: New guide to custom shadows in stages
Post by: ItalianStallion on July 05, 2012, 02:48:02 PM
Just looked through very quickly before I have to go into work.

Will most definitely look at it later.

Your guides have always helped me out, and taught me many things.

Don't ever stop making them!


Title: Re: New guide to custom shadows in stages
Post by: DSX8 on July 05, 2012, 07:06:01 PM
well now i kno how to get the shadows darker for my stages.. i've been making my own custom stage shadows for like over a month now, works like a charm but never figured out how to make them dark instead of blue xD


Title: Re: New guide to custom shadows in stages
Post by: Forte on July 10, 2012, 10:44:11 PM
Great guide you have here; it was fairly easy enough to follow and the results look great! (shown in spoilers)
(http://i48.tinypic.com/2zzj6rs.png)  (http://i49.tinypic.com/2dgrwus.png)
For awhile now I've been working on a custom stage and when it came to adding the shadows I could only manage the flat parts. With the help of this guide, creating shadows for objects such as the hilly terrain or wooden stumps (look at squirtle's shadow) shown above is now cakewalk. This will come definitely come in handy for some upcoming stages I have in mind.

Thanks Mewtwo2000 ;D
- Forte


Title: Re: New guide to custom shadows in stages
Post by: Mewtwo2000 on July 11, 2012, 03:49:07 AM
Looking really nice, thanks to you for following the guide and posting your results here ;D


Title: Re: New guide to custom shadows in stages
Post by: LegacyWolf on August 02, 2012, 07:33:15 PM
Well, I'm very impressed with your new shadow system. Looks great.

(http://img189.imageshack.us/img189/2646/shadowju.png) (http://imageshack.us/photo/my-images/189/shadowju.png/)

(http://img594.imageshack.us/img594/4343/shadow2i.png) (http://imageshack.us/photo/my-images/594/shadow2i.png/)

Hope you come up with more good stuff like this.  ;)


Title: Re: New guide to custom shadows in stages
Post by: Mewtwo2000 on August 03, 2012, 03:54:47 AM
Thanks, I'm glad this kind of stuff is still useful for people around here :3


Title: Re: New guide to custom shadows in stages
Post by: BlueBrain on April 24, 2013, 10:55:29 AM
sorry for necro posting, bust seeing this is a guide i dont think it is too bad :D

anyway, i wanna know if i got my facts straight, i have a stage built completely in 3ds max, i already have it working in game and everything, so,
i think i should go to 3ds max and duplicate all the pieces that will need shadows, which would be everthing that "has collisions", and then in BB i give all these duplicates the shadow material and apply the above mentioned edits to it?


Title: Re: New guide to custom shadows in stages
Post by: Mewtwo2000 on April 24, 2013, 04:31:47 PM
Yeah, that's it.

In some cases, having the 2 identical models in the same place may result in weird effects, so moving up like 0.05 the one for the shadows would avoid them.


Title: Re: New guide to custom shadows in stages
Post by: BlueBrain on April 24, 2013, 04:33:29 PM
ok sounds logical


Title: Re: New guide to custom shadows in stages
Post by: Wingedkoopa67 on August 17, 2013, 02:20:15 AM
Ugh, for some reason I'm having trouble with this. I can make the shadow show up, but it's just a static image of a Mario shadow. It's the texture.. What am I doing wrong? I applied the Material and the shader. And I imported the texture for the shadow (which strangely wasn't included in the tutorial). Also, I made the shadow model in 3ds MAX, if that has anything to do with it. I'm almost done with this stage, just need the shadow. :(


Title: Re: New guide to custom shadows in stages
Post by: Mewtwo2000 on August 17, 2013, 05:03:22 AM
I guess you forgot placing the additional model in the tutorial, the MShadow one.

Anyway, another way to make it work would be this:

1- In the material properties for your shadow material, click on this '...' button:

(http://i.imgur.com/TVFfUGX.png)

2- In the new window, click on 'add' and then write 'shadow' where it says 'Name':

(http://i.imgur.com/bPL3df9.png)

With this, the shadows should work. If you get any trouble making these changes, then just get the invisible shadow model in the first post and place it in the same folder as your model with shadows.



Title: Re: New guide to custom shadows in stages
Post by: Wingedkoopa67 on August 17, 2013, 05:11:56 AM
I forgot the model... That was an oversight by me. I guess that happens when you read things at 1am. Heh.. Well, I'll try this now. Thank you for the indepth reply ^.^ I'll edit this post if I have any problems.

-EDIT-
Ok, well I got the shadow to show up. Though it's so ****ed up.
(http://i.imgur.com/4TlT3OB.jpg)
I honestly have no idea why the shadow is white.
Also, that doesn't even resemble DK at all. And no, it's not because he's flat, I got the same result when trying on FD. My only guess is maybe I applied the Shadows wrong and made them to big in 3ds max? Though that still doesn't explain the white shadow.