Seriously!

Go Back   Seriously! Forums > Serious Sam Series > Serious Sam Classic > Serious Sam Classic Workshop > Serious Editor

Serious Editor Discuss mapping ideas & problems or show tutorials and maps.

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 03-20-2016, 11:19 AM   #1   Add To Ignore List  
Werebull
 
Jester Of Destiny's Avatar
 
Joined: Jan 2012
Location: Hungary
 
Jester Of Destiny is offline
Default Terrain Shadowmaps?

I want to make a real nice looking terrain, but I have problems with the shadowing.

I already have my heightmap and made the terrain itself. Now there need to be shadows. Direction lighting is not a good idea, since it messes with the performance. So I need a shadowmap or one of those one-texture things. But how do I make one?

Tried terragen, but I don't know how to import my tga heightmap into it. Tried screenshoting, but of course that won't do much good, when the lighting looks rubbish anyway. I've heard about using modelling tools, but I don't get along well with modeling tools.

Searched the forums, but only found confused people and 404 links. So can anyone help me with shadowmapping?
  Reply With Quote
Old 03-20-2016, 12:19 PM   #2   Add To Ignore List  
Goodbye Moonmen
 
Discy's Avatar
 
Seriously! Khnum
Joined: Jul 2003
Location: The Netherlands
 
Discy is offline
Default Re: Terrain Shadowmaps?

This is how I do it.

  • Create the terrain like you want it to be: Add models, brushes (to seperate layers, don't add it to the terrain brush yet) and generally any stuff that casts shadows.
  • Apply a white texture to the terrain. Leave second and third layers empty. You can find a white texture in TexturesMP/Detail/White.tex.
  • Select all terrain polys and unflag "fullbright", flag "directional" and "dir. ambient".
  • Create the desired sunlight with a directional light and render the shadows.
  • Now hide all the entities and brushes that are casting shadows on the terrain. Do this by pressing alt+X to hide selected entities. You can do this in groups. Press alt+A to show all hidden entities again when you're done.
  • Press NUM6 to enable in-game rendering mode, then press F5 to enable top-down view.
  • Zoom out and move until you see the full terrain. This works best if you have at least ~900 pixels in your vertical resolution.
  • Take a printscreen and paste it in Photoshop or a similar program.
  • Cut the terrain exactly out of the printscreen and resize it to the size of your terrain texture.
  • Open your terrain texture in your photo editing program and paste the shadow map you just made as the first layer.


Now you just need to rotate it and set shading mode to Overlay in Photoshop. You'll have to figure out the best values in other programs. It's also a good idea to apply a blur effect to the shadow layer, otherwise it's unrealistic.

Here's a picture of one of my terrain textures in Photoshop:
https://dl.dropboxusercontent.com/u/31840/sf/2016-03/Topmap.jpg

Then you just save it, convert it to .tex and apply it through projection mapping. Set the terrain back to fullbright and you're all set.
__________________
"Is there any better Gerüstbaufirmenvorarbeiterschlüsselanhängerfarbenwasserlöslichkeitskontrollchemiker than discy? No!" -Shrinker
[22:30] Fiendian: Discy, Finzy and Louva shall merge into a superentity known as the Lickyfonz.
"Can we just move Discy's posts to the HOF automatically already? :P" -Jetty


Ir-Kalla: Serious Sam Classic map pack in development (Ir-Kalla: Egypt Demo)

Last edited by Discy; 03-20-2016 at 12:21 PM.
  Reply With Quote
Old 03-20-2016, 01:34 PM   #3   Add To Ignore List  
Werebull
 
Jester Of Destiny's Avatar
 
Joined: Jan 2012
Location: Hungary
 
Jester Of Destiny is offline
Default Re: Terrain Shadowmaps?

Just tried it, on a blank terrain and it worked.... sort of.

Firstly, you left out the part, where I have to map out the textures onto a terrain-sized slab, just outside of playable map area. Then press M on that, select all of the terrain, the press U.

Second, it still looks awful. It looks like this.

Third, do I have to add textures to it, or does that come after?
  Reply With Quote
Old 03-20-2016, 01:46 PM   #4   Add To Ignore List  
Goodbye Moonmen
 
Discy's Avatar
 
Seriously! Khnum
Joined: Jul 2003
Location: The Netherlands
 
Discy is offline
Default Re: Terrain Shadowmaps?

Quote:
Originally Posted by Jester Of Destiny View Post
Firstly, you left out the part, where I have to map out the textures onto a terrain-sized slab, just outside of playable map area. Then press M on that, select all of the terrain, the press U.
That's called projection mapping. Since you only wanted to know about adding shadows to it I assume you know what projection mapping is, and I mention it in the last sentence of my post.

Quote:
Originally Posted by Jester Of Destiny View Post
Second, it still looks awful. It looks like this.
That's what it's supposed to look like when you render shadows. After what you accomplish in your screenshot you have to follow the steps starting with pressing NUM6 and F5.

Quote:
Originally Posted by Jester Of Destiny View Post
Third, do I have to add textures to it, or does that come after?
That's for the very last. You don't want to add the detail textures to the topmap. You render the shadows on a white surface on the terrain so you can create a texture layer out of it for Photoshop. After you have added the shadow layer to the topmap like you can see in my screenshot, you have to recreate the texture. Then apply it to the brush above the terrain. Then you add a stain texture in layer two and a detail texture in layer three, then use projection mapping to apply it to the terrain.
__________________
"Is there any better Gerüstbaufirmenvorarbeiterschlüsselanhängerfarbenwasserlöslichkeitskontrollchemiker than discy? No!" -Shrinker
[22:30] Fiendian: Discy, Finzy and Louva shall merge into a superentity known as the Lickyfonz.
"Can we just move Discy's posts to the HOF automatically already? :P" -Jetty


Ir-Kalla: Serious Sam Classic map pack in development (Ir-Kalla: Egypt Demo)
  Reply With Quote
Old 03-20-2016, 02:17 PM   #5   Add To Ignore List  
Werebull
 
Jester Of Destiny's Avatar
 
Joined: Jan 2012
Location: Hungary
 
Jester Of Destiny is offline
Default Re: Terrain Shadowmaps?

That's actually the fullbright version of. That's how it really looks.

But nevermind, I fixed it by adding even more blur. Looks buttery smooth now

Also I only said all that, so the person who'll be searching the forums can find it all in one place.
  Reply With Quote
Old 03-20-2016, 02:28 PM   #6   Add To Ignore List  
Goodbye Moonmen
 
Discy's Avatar
 
Seriously! Khnum
Joined: Jul 2003
Location: The Netherlands
 
Discy is offline
Default Re: Terrain Shadowmaps?

... you're not following all my steps. That's not the final texture. What you made with the white texture and terrain shadows has to be merged with your topmap. You can make a topmap in terragen (on a flat plane, you don't want to add shadows to a shadowed topmap), then apply the white shadow texture on it like I explained. Look in my screenshot to see the final result in Photoshop. What my tutorial does is add shadows to the topmap you already have.
__________________
"Is there any better Gerüstbaufirmenvorarbeiterschlüsselanhängerfarbenwasserlöslichkeitskontrollchemiker than discy? No!" -Shrinker
[22:30] Fiendian: Discy, Finzy and Louva shall merge into a superentity known as the Lickyfonz.
"Can we just move Discy's posts to the HOF automatically already? :P" -Jetty


Ir-Kalla: Serious Sam Classic map pack in development (Ir-Kalla: Egypt Demo)
  Reply With Quote
Old 03-20-2016, 03:09 PM   #7   Add To Ignore List  
Werebull
 
Jester Of Destiny's Avatar
 
Joined: Jan 2012
Location: Hungary
 
Jester Of Destiny is offline
Default Re: Terrain Shadowmaps?

So wait. Is the topmap the one with the graphics? Like that valley-y texture the valleys use in the game (merged with the shadowmap). Because I'm already quite fond of what I did with the preset grass textures.

Anyway, I'd like to know how to make one still. I haven't got a clue on how to use Terragen.
  Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No textures and shadowmaps Corpseflayer Serious Sam Classic 9 09-29-2002 06:17 AM
terrain Matt4life Serious Editor 2 01-09-2002 11:24 AM
Terrain?? Guilherme Serious Editor 3 12-11-2001 09:59 AM
How to precache your shadowmaps Muffler Serious Sam Classic 13 05-08-2001 12:47 PM


All times are GMT -4. The time now is 06:28 AM.