Author Topic: Holy darkside Batman! SoM has shadows!!!  (Read 3088 times)

Offline dmpdesign

  • Moonlight Retiree
  • Administrator
  • Dark Slayer Destroyer
  • *****
  • Posts: 1864
    • http://swordofmoonlight.com
Re: Holy darkside Batman! SoM has shadows!!!
« Reply #10 on: October 06, 2011, 01:08:11 pm »
Correct, they are baked in when you output the map, which is why having an event that hides/shows a lamp in game doesnt actually affect the lighting.
- Todd DuFore (DMPDesign)
Site Founder

Offline HwitVlf

  • Dark Slayer Destroyer
  • ****
  • Posts: 1667
Re: Holy darkside Batman! SoM has shadows!!!
« Reply #11 on: October 06, 2011, 06:53:15 pm »
I had trouble making slope MHMs and finally found the problem was because Meta was bending the MHM quads in the opposite direction from my MSM floor quads. (see picture) If you use Meta's 'wire' tool to set the bend direction by dividing the MHM 's quad into triangles, you might fix some troubles.

SoM also had a defective MHM on the 1M slope wall pieces (fixed in the v1.2 patch) and there was a lot of bugginess in the outdoor floors because they aren't flat; they're a low pyramid shape which doesn't work well for collision. I have .5 and 1m slopes in my forest that use simple flat MHMs and haven't had problems so far.
« Last Edit: October 07, 2011, 07:08:51 pm by HwitVlf »

Offline Verdite

  • VIP
  • Dark Slayer Destroyer
  • *****
  • Posts: 1624
Re: Holy darkside Batman! SoM has shadows!!!
« Reply #12 on: October 08, 2011, 07:31:49 am »
Thanks John :)

Offline Verdite

  • VIP
  • Dark Slayer Destroyer
  • *****
  • Posts: 1624
Re: Holy darkside Batman! SoM has shadows!!!
« Reply #13 on: June 22, 2013, 10:10:40 pm »
I was looking at this topic earlier and decided to do a bit more testing with lamps. So I setup three short 4 sided wall map pieces, two beside each other and one slightly off to the right.

The light from the lamp shone through the gap in the map pieces. This might be amateur for you guys who know how lamps work, but I thought it was nice.

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Holy darkside Batman! SoM has shadows!!!
« Reply #14 on: June 23, 2013, 01:24:29 am »
Just remember that objects, doors, etc. don't play by the same rules. And don't even interact with the map lights. So that light will shine straight through a door object into the corridor on the other side of it.

This process is not well understood. It would be interesting if you could figure out if the shadows are based on the MHM or MSM files. If it's MSM you could build invisible false walls into your doorways to keep the light from leaking out. You can also just be careful about where you park your lamps.
« Last Edit: June 23, 2013, 01:28:33 am by Holy Diver »

Offline HwitVlf

  • Dark Slayer Destroyer
  • ****
  • Posts: 1667
Re: Holy darkside Batman! SoM has shadows!!!
« Reply #15 on: June 23, 2013, 04:02:59 am »
I was impressed with that too Ben. It adds a lot of immersion if used right.  If you place a lamp above a tree, it will actually shine a leaf-like shadow pattern on the ground. It's not great, but can add bit of life to a forest here and there.

Todd always said that 256 color map Piece textures looked wonky  under some circumstances, and  I finally figured the reason was that SoM uses a "pallete shift" technique to bake lamp lights into map Piece textures. If you have a lamp light by a Map Piece whose texture only has 256 colors, SoM can't make a gradual shift in shading and instead makes blotchy "shadow-puddle-rings" like you see in videos that are over-compressed.

Offline Madison Lastrega

  • Decked in Promeus
  • ***
  • Posts: 295
  • Do, or do not, there is no try...... ~yoda~
Re: Holy darkside Batman! SoM has shadows!!!
« Reply #16 on: June 23, 2013, 10:28:54 am »
Funny Thing, I was building map pieces last night and I was running into that same problem....  My problem was little water like rings that you see as you walk around.... I thought it was something I was doing wrong, I think I had a fix though, but will require a little modification on my end:-)   I have a plan and will show it off when  I get home from work later...............  ML

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Holy darkside Batman! SoM has shadows!!!
« Reply #17 on: June 23, 2013, 08:23:16 pm »
Todd always said that 256 color map Piece textures looked wonky  under some circumstances, and  I finally figured the reason was that SoM uses a "pallete shift" technique to bake lamp lights into map Piece textures. If you have a lamp light by a Map Piece whose texture only has 256 colors, SoM can't make a gradual shift in shading and instead makes blotchy "shadow-puddle-rings" like you see in videos that are over-compressed.

This isn't true. Textures are not affected by lamp lights. The lamps colour the vertices of the map tiles. Just like when you colour CPs with Meta'. If you posted screenshots I could tell you what you are experiencing. But I've never experienced such things myself. And there is no reason why an indexed texture map would appear any different in game than it does in something like MS Paint.

The SOM games do have a gamma ramp even when brightness is in the middle. You don't get that with Ex. There is a gamma extension for emulating it, but I don't think it works in DirectX 9 mode. Just due to neglect.

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Holy darkside Batman! SoM has shadows!!!
« Reply #18 on: June 23, 2013, 10:35:32 pm »
I prepared a video for anyone who wants to watch it, it shows how lighting affects enemies. My skeleton is a good example because I spent AGES ironing out the vertices when I made him. I also... Kind of :sweatdrop: tried to make it a bit interesting and added some events.

http://youtu.be/fBIhkYb_w20

Thanks for reminding me to wipe the dust off my screen. That said I don't see anywhere in the video where you showoff the shadow capabilities that are the namesake of this thread.

The way SOM's light's work it is pretty common for the middle of the lamp to be very saturated like that. But I am not sure why your objects seem to be so saturated all the way to the edge of the light.

There is a fixed range for the lights, which is why you see the skeleton half lit and half unlit. It's that way just to emulate SOM perfectly.

But there seems to be something wrong with your objects otherwise. They should appear more similar to the light on the ground around your lamps instead of supersaturated the way they do. I'm going to presume that is why you posted the video. Anyway. This seems like the wrong thread for this conversation.