Normal Maps / Depth Maps - Testers Needed! V1.0

Normal Maps / Depth Maps - Testers Needed! V1.0

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Normal Maps / Depth Maps - Testers Needed! V1.0

Post by Argh »

Image
Image
Download Here.

This is a playable demo of normalmaps and depthmaps in Spring, using GLSL. It isn't a game, it's tech demo.

This has two GLSL shader implementations based on failure to compile, which, depending on whether you have nicer hardware than mine, you'll see one or the other. I don't have a switcher built yet, and probably won't bother, since this is just a tech demo.

The first is Kloot's code, as intended. The second, which just does normalmaps, and lacks self-shadows (I keep meaning to write a new shader just for that task, but I've been a little short on time) is my cut-down version, which is still a lot prettier than Spring's default ARB shader.

99% of the hard work and mental perspiration on this project was Kloot's. As you folks probably know, I did some early work on this topic, but Kloot got Spring working correctly with the features, and I've been waiting until P.U.R.E. calmed down a bit to finally get it in front of people. Since that doesn't seem to be happening and I'm still really busy... I decided that today I'd quit procrastinating and release this test for people to evaluate, and proceed from there.

I want testing results from folks. Screenshots and infologs- if it works, show us that it's working, and please let me know what hardware. If it breaks terribly, please let me know that, too, with infologs and screens.

This is a pretty important feature for Spring, in terms of looks, so the more testing that can be done, the better it'll get, and the better it gets, the better Spring games can look. Please help test this.
Last edited by Argh on 07 Jul 2009, 01:10, edited 9 times in total.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Normal Maps / Depth Maps - Testers Needed!

Post by FLOZi »

Crashes on load, hardware info in the infolog:

http://pastebin.ca/1482419
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps / Depth Maps - Testers Needed!

Post by Argh »

Hrmm. Great start :roll:

Try unzipping it to SDD, and deleting my lighting Gadget, just to make sure that that isn't the problem.

Trying to think if anything else could possibly causing it to just plain crash... I just tested with fresh ArchiveCache, and it's not a dependency issue or something silly like that, it still works just fine. Weird. I guess that's why we're testing ;)
Sheekel
Posts: 1391
Joined: 19 Apr 2005, 19:23

Re: Normal Maps / Depth Maps - Testers Needed!

Post by Sheekel »

8800GT, works fine here:

Image
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Normal Maps / Depth Maps - Testers Needed!

Post by Das Bruce »

8800GT, crashes after countdown.
zipped - http://pastebin.com/m68b8c67f
sdd - http://pastebin.com/m4c4ca3ac
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Normal Maps / Depth Maps - Testers Needed!

Post by FLOZi »

Problem was with running it through spring.exe, works fine through the lobby (was crashing after countdown/beofre comm spawn like bruce)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps / Depth Maps - Testers Needed!

Post by Argh »

Bizarre.

So... it fails on countdown, but doesn't fail if you just go through the Lobby?

WTF? That's just plain weird. Probably isn't the Gadget's fault, then. Probably.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Normal Maps / Depth Maps - Testers Needed!

Post by imbaczek »

ati 4850, most recent drivers

[code][ 0] GLSL Light Shader FailedVertex shader failed to compile with the following errors:
ERROR: 0:6: '-' : wrong operand types no operation '-' exists that takes a left-hand operand of type '3-component vector of float' and a right operand of type '4-component vector of float' (or there is no acceptable conversion)
ERROR: compilation errors. No code generated.

[ 0] Loaded gadget: GLSL Lighting <glsl_lighting.lua>
[ 0] [unit_normalmap_shader:Initialize] shader1 compilation failed
[ 0] Fragment shader failed to compile with the following errors:
WARNING: 0:26: '' : Built-in funtion 'Transpose' is not supported in implicit GLSL version number 110
ERROR: 0:33: '=' : assigning non-constant to 'const float'
ERROR: 0:85: 'assign' : cannot convert from 'const float' to '3-component vector of float'
ERROR: compilation errors. No code generated.

[ 0] [unit_normalmap_shader:Initialize] shader2 compilation failed
[ 0] Fragment shader failed to compile with the following errors:
WARNING: 0:28: '' : Built-in funtion 'Transpose' is not supported in implicit GLSL version number 110
ERROR: 0:62: 'assign' : cannot convert from 'const float' to '3-component vector of float'
ERROR: compilation errors. No code generated.

[ 0] Loaded gadget: unit_normalmap_shader_tst.lua <unit_normalmap_shader_gadget_sur.lua>
[/code]


remove most consts, ati doesn't like them.

link to png, because i'm lazy: http://imgur.com/QRxwK.png
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps / Depth Maps - Testers Needed!

Post by Argh »

I'll see about fixing that in my lighting shader immediately.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Normal Maps / Depth Maps - Testers Needed!

Post by FLOZi »

Image
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps / Depth Maps - Testers Needed!

Post by Argh »

Version 2. Tried to fix the lighting shader by addressing the "inherent conversion" bug by making the operation explicit. Please re-download and test, imbazcek, I'd like to know if the lighting works on ATi finally.

Put the lighting shader in and active. I'll go look at Kloot's GLSL next.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Normal Maps / Depth Maps - Testers Needed!

Post by knorke »

it works on geforce 2 but of course without fancy gfx.
at least it doesnt crash.
titsonachessboard.jpg
titsonachessboard.jpg (164.37 KiB) Viewed 6061 times
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Normal Maps / Depth Maps - Testers Needed!

Post by thesleepless »

Code: Select all

Loaded gadget:  unit_normalmap_shader_tst.lua  <unit_normalmap_shader_gadget_sur.lua>                                                                                               
gf1 = LuaRules/Gadgets/glsl_lighting.lua                                                                                                                                            
gf1 = LuaRules/Gadgets/unit_normalmap_shader_gadget_sur.lua                                                                                                                         
gf2 = LuaRules/Gadgets/glsl_lighting.lua                                                                                                                                            
gf2 = LuaRules/Gadgets/unit_normalmap_shader_gadget_sur.lua                                                                                                                         
GLSL Light Shader Failed                                                                                                                                                            
Loaded gadget:  GLSL Lighting       <glsl_lighting.lua>                                                                                                                             
[unit_normalmap_shader:Initialize] no shader support                                                                                                                                
error = 2, LuaRules/draw.lua, error = 2, LuaGadgets/gadgets.lua, [string "LuaRules/Gadgets/unit_normalmap_shader_gadg..."]:601: attempt to call upvalue 'glDeleteShader' (a nil value)                                                                                                                                                    
SDL: 1.2.13
GL: 2.1.2 NVIDIA 173.14.19
GL: NVIDIA Corporation
GL: GeForce 6200/AGP/SSE2/3DNOW!
GLEW: 1.5.1

it claims "no shader support" but my card does have support for GLSL shaders and i've seen it do normal maps.

it doesn't crash however which is nice
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps / Depth Maps - Testers Needed!

Post by Argh »

It looks like it compiled the GLSL for the lighting shader. Can you test whether that works, with the latest build? I'll see about removing that upvalue.
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Normal Maps / Depth Maps - Testers Needed!

Post by thesleepless »

seems it's a problem with gl.CreateShader not existing in spring, so i don't think it's actually a problem with your code.

sorry, would probably help if i enabled LuaShaders support in settings =p

looks great!

(although way too slow for my hardware)
Last edited by thesleepless on 03 Jul 2009, 03:09, edited 1 time in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps / Depth Maps - Testers Needed!

Post by Argh »

Have you enabled LuaShaders in SpringSettings?

Also... version 3 is up... I added disco lighting, for lulz.

Let's see... any ATi users seeing my lights now? Pretty please, you stupid drivers?

Maybe somebody who couldn't see normalmaps can now (fixed yet-another "implicit conversion" bug in the normalmap shader)?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps / Depth Maps - Testers Needed! V0.3

Post by Argh »

(although way too slow for my hardware)
Really? How bad?

Those are high-poly spheres (about 8000 triangles for the both of them), so this is somewhat of a stress test anyhow.
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Normal Maps / Depth Maps - Testers Needed! V0.3

Post by thesleepless »

with the unit off screen i get ~60fps, with it on screen i get ~30fps
with 14 of them i get ~12fps

so could be worse i guess. normal maps means you can get away with a lower polycount so for a game with a small amount of units it could be okay.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps / Depth Maps - Testers Needed! V0.3

Post by Argh »

14 of them is 96K triangles per pass. That's really not that terrible. Typical scene in P.U.R.E. is maybe half that.
User avatar
overkill
Posts: 500
Joined: 02 Sep 2006, 01:15

Re: Normal Maps / Depth Maps - Testers Needed! V0.3

Post by overkill »

Ok, so i decided to give this a whirl. Seems to work ok performance wise. Got playable fps with 100 of them on screen, and my card is low end (9500gt)

I think they look pretty decent, nothing amazing. but normal map support like this will be cool.

pics:

Image

Image

Image
Post Reply

Return to “Game Development”