Jump to content


Photo

Shadows in BFME 2


  • Please log in to reply
3 replies to this topic

#1 morgoth946

morgoth946

    title available

  • Hosted
  • 630 posts
  • Location:Mallorca

Posted 08 July 2006 - 02:27 PM

Well, we know that EA improved the SAGE engine for BFME 2, including new shaders and lighting possibilities (shadows and highlights).
Also in bfme 2 they have put a veery ugly pixelated shadows, now I'll teach you how to change it.

1. How can I put shadows on my units and buildings?

1.a. If you're making a unit:
-In W3D Export settings, don't change anything.
- The mesh must not have a multimaterial.
-In the inis, look at geometry, there must be something like this:
Shadow				= SHADOW_DECAL
	ShadowSizeX			= 20
	ShadowSizeY			= 20
	ShadowTexture		= ShadowI

SHADOW_DECAL will draw a black circle on the ground in the medium and lower graphic settings. You can change its size and the texture if you want.(Look at ShadowSize and ShadowTexture).
If you've the highest graphic settings, it will draw a more realistic shadow (the super pixelated ones!).
If the mesh has got a multimaterial you won't see the shadow, take care of that.

1.b. If you're making buildings or big units(like mumakils)
-In W3D export settings you have to mark "Shadw"
- The mesh must not have a multimaterial.(again)
-In the inis, look at geometry, there must be something like this:
Shadow				= SHADOW_VOLUME

SHADOW_VOLUME will render a realistic shadow in the medium or lower graphic settings. In the highest will draw the same, well, it will draw the damn pixelated shadows. Be careful with the multimaterials, don't use them.


2. I hate those pixelated shadows!!! How can I change it?

You can't smooth them, but you can increase the max number of squares in a shadow map(IN THE HIGHEST SETTINGS!!)
For that, go to environment.ini (in data/ini folder) and at the end of the file you'll see this:

; Setup information for shadow maps, overridable in map.ini
ShadowMap
	MapSize = 1024	; size of the shadow map texture. Default is 1024
	MaxViewDistance = 1500.0	; maximum distance from camera that shadows will be cast, in world units
	MinShadowedTerrainHeight = 0.0; miminum height that units/buildings that cast shadows can be on.
								; Usually the mimimum height of the terrain (e.g 0), but sometimes action takes place only higher up,
								; and no shadow caster needs to be down there.
End

To increase the number of squares, change the value of the MapSize (for example, I put 4096)
Don't forget: It may cause lag.

You can change it with map.ini too. In some maps perhaps you won't see the difference because the creator changed the MapSize in map.ini.

That's how it looks:
Posted Image

And the same map without the "4096":
http://vnmedia.ign.c...me/58711312.jpg




Well, that's my first tutorial :p If you don't understand anything tell me.

Edited by morgoth946, 08 July 2006 - 02:29 PM.

The Four Ages, the new english Website:

Posted Image

Posted Image

#2 cahik_

cahik_

    Sage engine ruler

  • Project Team
  • 1,896 posts
  • Location:Czech Republic
  • Projects:Rhovanion Alliance
  •  T3A Team Chamber Member and Crazy animator

Posted 08 July 2006 - 02:47 PM

very good tutorial, quite usefull :p

Posted Image

Posted Image
Posted Image


#3 ched

ched

    .

  • Undead
  • 4,431 posts
  • Location:Angers (France)
  • Projects:Rhovanion Alliance
  •  T3A Team Chamber Member
  • Division:BFME
  • Job:Previous Division Leader

Posted 08 July 2006 - 03:03 PM

ah, good that you came round fixing those shadows by other ways than reprogramming the engine :p

excellent stuff my friend.
Software is like sex; it's better when it's free ~Linus Torvald

#4 Kelso

Kelso

    BFME Admin

  • Project Team
  • 1,467 posts
  • Projects:Rise of Rome, Rise of Rome 2
  •  AWD and T3A Team Chamber Leader
  • Division:BFME
  • Job:Designer: Rise of Rome 1 and 2

Posted 08 July 2006 - 04:02 PM

Just a note, you don't have to have the Shadow export option checked in order for the game to render a volumetric shadow on it. For some reason, BFME1 was the only game that forced you to do that.
Posted Image
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users