Max map size for shadows

Max map size for shadows

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Max map size for shadows

Post by aGorm »

Yo,

Was just building a map, when I suddenly remebered somthing about map width and shaodws not working with long maps...

I been chating with Forb, he rekons its like 34 or 36 wide they stop working (and this is how big my maps width is). He was unsure though as to wether it was an ATi card problem, A global problem, or if it had been fixed...

So questions two fold... anyone know what width it stops at, and two

Is anyone intrested in fixing it??

PS: I know someones bound to go "its in teh new map format" but I dont care if it is... It would be nice to have it in both formats!! Especialy as were keeping them both!

aGorm
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14657
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

Something I jsut recently found out btw... the shadow map is 1/8 the texture map as well.
User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Post by aGorm »

If thats the case then why the hell would it conk out on wide maps?? Not like its goona run out of texture room...

aGorm
User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Post by aGorm »

OIT!!!


Can someone who can read code or understand why the hell shadows do this reply...

PLEASE?!?! :(

aGorm
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

Its becaulse when the map get >32 the shading texture for it becomes >2048 which many cards doesnt support.
User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Post by aGorm »

Ahh.. so its the older nvida and the ati cards that it dont work on right?? is there any way around it?? (OMG its SJ, you the man...)

It occers to me why cant the map just be stretched over the whole map?? Or is that just crasy talk?? (ok so the shadows would not look so good, but it would mean even older cards could run shadows, because you could force your card to always use a smaller texture, IE a half size one, a quarter size one... ect..., and switch to a lower res one if map dictated due to it being long.)

(ps i have no idea if what im saying is even remotly feasable...)

(oh and will shadows work on newer hardware which can handle said larger textures, or did you code the limit in to be safe??)

(ps im sure my 6800 can do more than 2048...)

aGorm
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

Whya re there shadows calculated for the entire map when we should onyl ahve them calculated for what we're looking at?
User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Post by aGorm »

(I think because they were added quickly... thats why there so hungry to...)

aGorm
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Whya re there shadows calculated for the entire map when we should onyl ahve them calculated for what we're looking at?
How do you know they're calculated for the parts you don't see?
;)
The invisible other parts are able to cast shadows too, so they must also be used when generating shadows.
However spring uses nonlinear shadowmaps, so distant parts have a lower shadowmap resolution as nearby parts. Quite complex and clever really, and about the best thing you can do without using pregenerated lighting solutions.
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

They're calculated for the entire map, and its done twice each time when it only needs doing once IIRC
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

That's just plain wrong
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

SJ was the oen who said ti and sicne he said it in the mailing list the fps on shadows has not improved, therefore I assumed that the situation had not changed and waited for more posts on the mailing list to notify me of the change, hwoever it seems they never came.
Yeha
Posts: 96
Joined: 13 Aug 2004, 19:12

Post by Yeha »

Shading texture and shadow map is not the same thing.
Shading texture is whats become to large for the graphic card.
Mugslugs
Posts: 89
Joined: 23 Aug 2005, 00:08

Post by Mugslugs »

in other words cards do this because the maximum texture size of all dx9 cards is 2048 so any greater than that it will screw up unless you tile the texture to multiple x by x textures.
User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Post by aGorm »

Well... is that possble ??

aGorm
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Post by Comp1337 »

Mug, how come i have shadows on epic then?

Havent seen you in a while Yeha.. Hey!
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Post by Cheesecan »

Comp1337 wrote:Mug, how come i have shadows on epic then?

Havent seen you in a while Yeha.. Hey!
Cuz you have a high-end Nvidia card. ;)
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

Comp1337 wrote:Mug, how come i have shadows on epic then?

Havent seen you in a while Yeha.. Hey!
my X800 GTO2


inverts the shadows for me on Epic... So shaded places become non-shaded. And Non-shaded places become shaded :-)

Looks funky!
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

DX9 specify that graphic card must handle 2048*2048 texture.
As it's the most used 3d API, I don't think we must blame ATI who follow the rules.
Wait for DX10 card, they will have to handle 8192*8192 texture.
(I'm not keen of DirectX, but a bit of unification is a good thing ihmo. With this point of view, directX is a good thing)
User avatar
Slamoid
Posts: 237
Joined: 25 Jan 2005, 19:23

Post by Slamoid »

Seems to me that it's time for multi-mode shadow solutions, just like we have with the water.

Why not have the faded-round style shadows as a software-rendered backup? Just cast one down from every unit, size depending on yardmap size, switchable with the hardware shadows in the Config program. It's simple, VERY cheap (2 alpha-blended poly per unit more), and will work on ALL vid cards. May not be the best graphics like the shadows we have now, but it's certainly better than the nothing I used to play with.
Post Reply

Return to “Engine”

cron