Jump to content
Lyla

Parallax Shadowing

Recommended Posts

My apologizes if this is in the wrong area - I was having trouble finding where to post this and a couple people suggested here, so here goes ---

 

I've learned parallax mapping pretty well, it's not like it's super hard or tricky for me to understand. The only part I'm really hung up on is shadows. I've only ever got one shadow to even look decent and it was after spending fifteen (15) minutes using path to selection methods and feathered circle selections. Suffice it to say, I'm not super good at it, but I imagine there must be an easier way or better technique than I am using now. I'd be inclined to try Khas Awesome Lighting Effects, but I've heard that he doesn't visit anymore and it's only for commercial-free games .... even if it does exactly what I think I'm looking for.

 

I haven't seen any tutorials on parallax shadowing in particular, just a lot of normal parallaxing mapping methods and lots of suggestions to use lighting scripts that never take walls into consideration. So, can anyone assist me? Please? ^.^

Share this post


Link to post
Share on other sites

Unless I'm mistaken, his blog says you can use it for commercial projects as well.. Though the scripts weren't updated to show that (it'd probably be too much to have to reupload everything over a simple edit).

 

http://arcthunder.blogspot.ca/p/terms-of-use.html

 

Did you try what I suggested in your status update?

Share this post


Link to post
Share on other sites

I'm not entirely sure what you had meant by copying a tile and making it darker or whatever ... I'm not understanding how that creates realistic lighting, so no - sorry. I just didn't get it. :P

 

Update: Apparently I can't use his script either ... unless I'm not understanding how it works, it seems like his script overrides tint screen and it makes my scenes end up looking VERY bad.  =(

Edited by Lydyn

Share this post


Link to post
Share on other sites

If you understand how to do parallax mapping then it should be fairly easy to do what I was suggesting. I'm by no means an expert (I only just learned recently), but I'll put a bit more detail into explaining:

 

 

 

Firstly you need to define where your light sources are. A window, lamp, candle or anything that emits some form of light no matter how much can affect the placement of your shadow.

 

1. Pick a tile you want to turn into a shadow. For sake of example I'll use an RTP piano tile. Make sure the layer already has an alpha channel (transparent layer) so you can see anything behind it.

1_zpsorwpzww1.png

 

2. Remove shadows.

2_zpst5se84yh.png

 

3.

Copy the edited tile

Create a new layer with an alpha channel (transparent layer)

Paste the edited tile into that layer

 

Make that new layer black (hue 0, saturation 0, lightness -100) then slide the opacity to whatever suits your fancy. I used 65-ish opacity, it should look something like this:

3_zpstlkkzba1.png

 

4. Move the layer to the opposite of whichever side your light is coming from.

4_zpsrxq5axbj.png

 

5. Add a blur effect and move the shadow layer below the main layer.

5_zpshfgfldg0.png

6. If you want to go a step further you can angle the shadows. Just make sure the shadow is lined up properly. I have the right foot of the piano touching the shadow while the left one is angled up a bit.

6_zpsect0sdjg.png

 

 

 

 

Edit: I wouldn't bother with tint screen, there's a scripted event you can use to make a map dark.

 

 
s = $game_map.effect_surface
s.change_color(120,0,0,0,200)

Erase Event

 

I'm assuming you can modify it to your needs, but it works quite well with the light sources provided in the script.

 

Edit 2: Alternatively you can just use a parallax image as a map overlay shadow if you really need to, it gives you some freedom to edit with more detail.

Edited by CVincent

Share this post


Link to post
Share on other sites

Hm... not entirely what I was looking for, but those are some helpful tips. Mainly because I'm trying to do things like having angled light come through a window in the morning and stuff like that ... but the windows are on the sides of the wall, so there's nothing to actually copy. Maybe I'm going too much into this, but ... *shrug*

 

As for that call script, it doesn't seem to work when you transfer a player. I have a black intro map then the player is moved to the library - but it instantly appeared untinted, even though it was tinted before the transfer (even if I tint using that script call).

Share this post


Link to post
Share on other sites

Try this:

 

(Go to Advanced -> Script)

 

s = $game_map.effect_surface
s.change_color(120,0,0,0,200)
 
Then in a new line (Go to Character)
 
Erase Event
 
That was probably my mistake, Erase Event is not actually in the text you add into the script call.
 

Share this post


Link to post
Share on other sites

Huh? Oh, no I got that, haha. I'm saying using that script call that you pasted above is not working as stated above (black map -> tint screen to -255,-255,-255 -> Library is left untinted still).

 

Also, that looks amazing, but it doesn't exactly explain or help me figure out how to do all that?  Haha... that's exactly what I'd want, but... *shrug* Maybe I'm not artsy enough to do shadows by myself... =(  Which is sad, because I only have so much budget.

Share this post


Link to post
Share on other sites

After like a solid two hours of testing things different ideas.. I think I finally figured a good method out. I'm using GIMP, so keep that in mind, this may be a different process if you're using another program.

 

1. Create a layer above your other layers and make it black with roughly 65 opacity. This will darken the map.

2. Create a layer mask ON your new shadow layer and select the "layer's alpha channel" option.

3. Copy/paste the window tile onto your regular window, then flip your new one 180 degrees.

4. Adjust the layer mask using the Perspective Tool, and then apply Invert to the layer mask (or vice-versa).

 

Sorry if it didn't make a ton of sense, I'm super tired but wanted to figure this out. I saved a picture to hopefully show off what I mean to explain a little better, it's far from polished since I threw it together very briefly.

 

ApartmentTest_zpsshlzlefo.png

Edited by CVincent

Share this post


Link to post
Share on other sites

I tried following what you did, but I couldn't follow some of the instructions, since I'm not familiar with layer masks or even what they do ... I did seem to get to the point of creating a nice effect like you have on the picture though, without inverting the layer mask (that part just confuzzled me anyways). I can then use use selections on editing the layer mask though to adjust it around stuff.

 

So here's the next question (I'm sure you'll answer tomorrow - you sound tired!) ... how would I go about doing overhead lights? I plan, like most modern homes/stores/locations, to have lights that come from the ceiling, not a lamp or such. I did a poor job by using the circle selection tool, but I don't think it does the realism justice. Any tips on that?

 

P.S. - Love the map!

Share this post


Link to post
Share on other sites

 

 

I tried following what you did, but I couldn't follow some of the instructions, since I'm not familiar with layer masks or even what they do ... I did seem to get to the point of creating a nice effect like you have on the picture though, without inverting the layer mask (that part just confuzzled me anyways). I can then use use selections on editing the layer mask though to adjust it around stuff.

 

You should be able to right click any layer and have an option that says "Add Layer Mask". These essentially add an extra layer that contains the same properties as the one they're linked to, they can also be flattened with that layer after you're done editing it. This saves you from having two conflicting layers and allows you to edit specific details (like the lighting) much easier. After you select layer mask a second preview box should pop up next to the normal one, just click it and it will allow you to use that layer mask as if it were a regular layer.

 

Hopefully this cleared things up a bit.

 

 

 

 

So here's the next question (I'm sure you'll answer tomorrow - you sound tired!) ... how would I go about doing overhead lights? I plan, like most modern homes/stores/locations, to have lights that come from the ceiling, not a lamp or such. I did a poor job by using the circle selection tool, but I don't think it does the realism justice. Any tips on that?

 

Personally I'm using Khas' Awesome Light Effects, so I'm more tempted to create custom light images and use them instead of making them a parallax layer.. If you wanted to though, you could simply erase from the shadow layer based on the shape of the lights you're trying to make. It's sort of like reversed layering.. But that's a really really simple way to do it.

 

Or you could just do layer masking if you figure out an easy way to do it. It's well worth practicing.

 

 

 

 

P.S. - Love the map!

 

Thank you. :3 It's far from done, I'm using it to test indoor parallax mapping.. And thanks to your original question I now have a new way of handling natural lighting.

Share this post


Link to post
Share on other sites

Personally I'm using Khas' Awesome Light Effects, so I'm more tempted to create custom light images and use them instead of making them a parallax layer.. If you wanted to though, you could simply erase from the shadow layer based on the shape of the lights you're trying to make. It's sort of like reversed layering.. But that's a really really simple way to do it.

 

Or you could just do layer masking if you figure out an easy way to do it. It's well worth practicing.

 

 

Hm, I got the rest and you're very welcome about helping you out. However, like I said - I have a huge issue with that script.... I think I'll post in the scripting section, since this is getting away from mapping - unless someone else chimes in with some brilliant advice!~

Share this post


Link to post
Share on other sites

Hit me up on skype later and I'll try to help you a little bit with your mapping issues. I'm beginning work on my own game right now and don't have time but I should be able to help tonight (CST.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×