Need help applying shaders to level geometry

Posted By: themuzikman

Need help applying shaders to level geometry - 09/08/12 03:00

Hello all,

first post in years. I used to be on here many years ago as "danthaman015" or "deftoolsys07" and other names, back in the A5/A6 days. It has been about 5 years ago since I touched 3DGamestudio and as a result I feel like I am starting all over again, even though I used to know all of the ins-and-outs of 3DGS.

I just bought A8 and want to start getting back into game designing, and very soon I will have some nice contributions.

To my question:

I am trying to apply a normal mapping shader on my level geometry. I have followed all steps but there is no normal map on the surface when I run the level as far as I can see. Models work just fine with the normal map material, however level geometry doesn't...

I have two textures in my WAD file, let's say tile1.bmp and tile1_n.bmp and I have them in the same WAD file. I apply the tile1.bmp texture to the walls and assign the mtl_Bump material to them from the mtlFX.c file...

What am I doing wrong??

I have A8 Commercial 8.30

Thank you very much in advance!
Posted By: Superku

Re: Need help applying shaders to level geometry - 09/08/12 03:18

Are the walls in range of a dynamic light (except the sun)?
You can press F11 twice to check the effect of normal maps on level geometry.
Posted By: painkiller

Re: Need help applying shaders to level geometry - 09/08/12 10:26

are you using external textures in a folder for your blocks or do you use a .wad file? If you are using a folder, then the normal map won't be detected and you'll need to use a .wad, at least from my experience
Posted By: themuzikman

Re: Need help applying shaders to level geometry - 09/08/12 21:58

@Superku: When I do that, I can see the effects of the normal maps on the models, but the level geometry is just flat.

@painkiller: I'm using the textures in a Wad file... with the "_n" at the end of the normal map texture file name.. So in my WAD, let's say I have two textures in it, one is the regular texture, the other is the normal map. I applied the regular texture to the level geometry and set the mtl_Bump material on it. So it should apply the normal map automatically right?
Posted By: Dveyee

Re: Need help applying shaders to level geometry - 09/09/12 00:44

Sounds like you're doing it right. I've found that mtl_bump isn't an obvious difference all the time from using no shader at all. Perhaps check the normal map?

Otherwise, mtl_specBump gives a nice reflection which may be the effect you're looking for.
Posted By: themuzikman

Re: Need help applying shaders to level geometry - 09/09/12 20:33

I appreciate the responses...

mtl_specBump does the same thing. (Or nothing, really)

Same with all of the other shaders. I've tried a bunch of different ones but none have any effect on the geometry at all... Very weird...
Posted By: alibaba

Re: Need help applying shaders to level geometry - 09/09/12 20:36

Maybe you havent set the "shaded" flag on the blocks
Posted By: themuzikman

Re: Need help applying shaders to level geometry - 09/10/12 05:12

Shaded is checked on all of the surfaces...
Posted By: themuzikman

Re: Need help applying shaders to level geometry - 09/11/12 20:30

Does anyone have a small level with some shaders on the level geometry that I can check out? Like a sample? Or if not can anyone make one real quick for me, just a hollow cube with some normal mapping on the walls. That way I can see if it works for me and play with it from there.

Thanks
Posted By: Dveyee

Re: Need help applying shaders to level geometry - 09/11/12 22:11

Could you share the images you are using? I might be able to take a look at it if I have time or perhaps someone else can look at it.
Posted By: GameScore

Re: Need help applying shaders to level geometry - 09/12/12 05:33

look at aum 95, there is the massive shader collection
a lot of examples
aum online

download
Posted By: themuzikman

Re: Need help applying shaders to level geometry - 09/13/12 01:14

Here's a link to the texture files:

http://imageshack.us/g/689/tile1y.png/

And the shaders from AUM 95 don't seem to be working correctly when I run the test levels that come with them... the shader viewer from the main 3DGS download page for example, does work.

Edit: I got the shaders from the AUM 95 examples to work, but I'll need to see if they work in my own level now...
Posted By: themuzikman

Re: Need help applying shaders to level geometry - 09/21/12 00:58

Anyone else have any ideas of what's going on here? Why it's not working for me?

All of the help is much appreciated.
Posted By: Superku

Re: Need help applying shaders to level geometry - 09/21/12 13:56

Upload a small test scene and I will have a look at it.
Posted By: themuzikman

Re: Need help applying shaders to level geometry - 09/21/12 16:09

Alright here it is:
http://www.sendspace.com/file/on4157

Should be everything in there, including the WAD file...

Thanks Superku. I see you're still around, I remember your name from years ago.
Posted By: themuzikman

Re: Need help applying shaders to level geometry - 09/21/12 16:10

Oh and can you tell me how to get the grass to work properly? I thought you check the Overlay flag, is that not right? Or is it because the background is green rather than black? It's been way too long since I've worked with 3DGS lol
Posted By: Superku

Re: Need help applying shaders to level geometry - 09/21/12 16:22

Well I need to have the wmp, not the wmb. wink
And what do you mean with grass, models that consist of flat planes with an alpha texture on it? If so, check out the "ImprovedOverlay" effect:
http://opserver.de/wiki/index.php?title=Shaders

Btw. welcome back! wink
Posted By: themuzikman

Re: Need help applying shaders to level geometry - 09/21/12 16:52

http://www.sendspace.com/file/u28vm8

Theres the WMP.


And I've got a waving grass shader on one of the models, and it works as far as making the grass wave, but the green background is still there. You'll see when you open it up..

Thanks man!
Posted By: Superku

Re: Need help applying shaders to level geometry - 09/21/12 18:01

The grass has a 24bit texture and thus no alpha channel. I suggest you export the texture and add an alpha channel in the paiting program of your choice (you can try to use d3d_autotransparency but this won't give you the best results).

The level is still missing your code file and the rest of the textures, so it's a little difficult to reconstruct your problem. I can see that you have checked the detail flag of the block on the ground, IMO you shouldn't use this flag it all. When I press F11 twice in the engine there is a small effect of bumpmapping visible, but it seems a little flawed. Additionally, the two default bumpmapping shaders only support a maximum of three dynamic lights (that includes the sun light) so you already have too many dynamic lights there.

I will try to set up an example for you tonight, but I have to say I don't really have much experience with normal maps as I only use them for a few special effects such as water, heat haze and the like.
Posted By: Superku

Re: Need help applying shaders to level geometry - 09/21/12 19:53

Update: I've had a problem with my shader experiment too until I checked "Use Tesselation" in my build settings. The problem was that the light was in the center of the room/ floor cube. In the vertex shader of the block none of all 4 relevant vertices was even close to the dynamic light source (in contrast to the floor center), but the pixels in the middle of the cube only got the interpolated small light values from the corner vertices. Thus it helps to activate tesselation resp. decrease the value under "Tesselate shaded". (I was using block geometry, mtl_specBump and 2 dynamic lights, no sunlight (in map properties and sun_light = 0; in script)).
Posted By: themuzikman

Re: Need help applying shaders to level geometry - 10/05/12 14:25

Alright, just an update. Hadn't opened WED in a week probably, and all of a sudden it's working. I never did anything differently, it just started working all of a sudden, however I'm still having a few minor problems, like the walls and ground don't match, they don't flow together if you know what I mean. Plus I'll get a little dialog box in-game saying it can't find one of the normal maps (even though it is in the folder and it obviously finds it because it's working now.)

Here's a picture of the error message:


I'll post some screens and more updates as they happen...

Thanks for your help!
Posted By: themuzikman

Re: Need help applying shaders to level geometry - 10/05/12 14:58

And now that I think about it, possibly building the level using "Build Simple Map" may have done the trick... I just opened another level that wasn't working right, and after doing that it worked. And every time I've compiled the level after that, it's worked.

Does that sound like that may have been my problem? That I didn't compile using "Build Simple Map"?
© 2024 lite-C Forums