Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / Bump Mapping: Crying for help

Author
Message
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 4th Oct 2007 19:58
Hi guys, you know, I´ve been around here for a long time, and my team and I figured out so many things on our own - but today I give up and ask for help. I´ve read through the manual, through the tutorials, even through every single thread here that is on this topic. And if anyone feels know the need for a comment about my lack of understanding, feel free to post it...

My problem is bump (normal) mapping. it does work perfectly with some of the stock media chars and SciFi Rooms, and I managed to bump an entity, but when it comes to segments, we experience failure after failure.

Here the example:

1. I create the segment in MagicFPS, with the _d2 as standard texture, then I alter the *.fps file in order to look like this:





2. I place the normal map, with the _N addition, into the same folder as the d2 texture.

3. I make "build game" with shaderson (of course)

4. I check the folders of the built game in order to contain all the files, I sometimes even add a _D copy of the _d2 because I read somewhere this could be needed:



5. I start the built game and get this wall:



No matter how I rename the files, if I use tga or dds, it`s all the same. Only when I build the wall as entity, it is bumped, but not with the normal map created and saved to right folder, instead the games picks a _N file from another texturebank folder.

Has anyone an idea what`S going wrong?

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
SamHH
17
Years of Service
User Offline
Joined: 9th Dec 2006
Location: Vermont
Posted: 4th Oct 2007 20:16
You need to specify the bumpbone effect, try opening the segment in the segment editor and specify the shader and it should work.


Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 4th Oct 2007 20:20
The bump effect is specified in the fps file, as can be seen in the code snippet:

effect0 = effectbank\bump\bump.fx

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
SamHH
17
Years of Service
User Offline
Joined: 9th Dec 2006
Location: Vermont
Posted: 4th Oct 2007 20:22
Have you tried in the segment editor?


Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 4th Oct 2007 20:43 Edited at: 4th Oct 2007 20:44
If I try in segment editor, it shows me the same dark-greay wall as in the built game, as if the _N file didn`t exist...

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 4th Oct 2007 21:13
Delete any .dds files and use tga,I think fpsc prefers to create it's own.
I know this works for entities but with recent updates the shaders are definitely wonky on segments,but you could still try the above.

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 4th Oct 2007 21:15
I also did use tga in the beginning, no change there...

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 4th Oct 2007 21:18
http://forum.thegamecreators.com/?m=forum_view&t=104897&b=21
You could take a look at this,might help

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 4th Oct 2007 21:32
Well, the problem is that it doesn`t even try to build it with the proper files - right now I discovered the game built had only the normal, not the diffusal map inside, although the segment was set to diffusal mapping...

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 4th Oct 2007 21:47 Edited at: 4th Oct 2007 21:49
This might seem like a silly question,but have you moved the files over to the built game manually.
I'll take a quick look at this myself and see what happens,.

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 4th Oct 2007 22:06
Yes, I did, and it changed NOTHING

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
TGPEG
17
Years of Service
User Offline
Joined: 28th Dec 2006
Location: Bristol, United Kingdom
Posted: 4th Oct 2007 22:27 Edited at: 4th Oct 2007 22:27
Ertlov; Have you changed 'useeffectsonsegments=0' to '=1' in the setup.ini file? Or does that have noting to do with it?

[center]
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 4th Oct 2007 22:28
LOL

you`re joking on me, right ?

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 4th Oct 2007 22:33
Nope a quick look at it doesn't yield any results,in fact it looks worse than your results with no textures appearing,there'e far too much fiddling about with the fpe etc for me to say anything definite.
I have to go out just now but will have a look at this when I come back in,sorry I cant be of more help just now.
Maybe someone else will come along with the answers you seek.

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 4th Oct 2007 22:39 Edited at: 4th Oct 2007 22:40
I found a workaround, I built my levels with blocks made in MagicFPS, wrote my own fpe files and finally it worked...

...results soon to be seen in the showcase thread!

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
TGPEG
17
Years of Service
User Offline
Joined: 28th Dec 2006
Location: Bristol, United Kingdom
Posted: 4th Oct 2007 22:45
Quote: "LOL

you`re joking on me, right ?"


Yeah, I was. But i often find that what seem like the most complicated of problems are caused by the simplest of things...

[center]
Cheese Cake
17
Years of Service
User Offline
Joined: 11th Dec 2006
Location: At the bakery
Posted: 5th Oct 2007 00:28
Please share, i have been dying to get shaders work right for segments, of static entities.


Cheers,
Cheese Cake.


tschwarz
19
Years of Service
User Offline
Joined: 13th Feb 2005
Location: 127.0.0.1
Posted: 5th Oct 2007 01:41
looks like you are missing some entries in your .fps

textured0=,texturen0=,textures0=
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 5th Oct 2007 03:50
Quote: "My problem is bump (normal) mapping."


Bump and normal mapping are two different things.

I can't help you, I would if I could.

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 5th Oct 2007 10:34
I know that these are different things, but the bump shader works with _N normal maps...

@tschwarz, no these are usually not needed...

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 5th Oct 2007 14:01
If you open the .fx file in notepad you'll see that the shader only supports one light source.

I'm only just learning how to write shaders in DBpro, but I think this little breakdown could be of help.

Direct x 9 only supports 9 dynamic lights.
FPSC uses a virtual lights system, whereby it calculates the nearest lights to the player, and only renders the lighting effect of them (ignoring those that aren't visible).

Now, the FPSC shaders are not calculated using real lights.
The light position is passed to the shader as a vector.

meaning that in dbpro, if you make a level, add lights, and then add an entity with the bump shader it won't work, because the light positions must be passed to the shader as a vector.

Looking at the shader code in notepad, the shader only supports one light position, therefore if you have more than one light in your level, FPSC will be passing erroneous data to the shader, causing them to mess up.
It'll work fine with entities, as they are lit dynamically. But segments are pre-rendered by the light mapper (which doesn't pass vector data to the shader), and therefore causes it to mess up.

I think if you want shaders on your segments, you're either going to need to modify the shader, or make a small source mod.

fallen one
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: My imagination!
Posted: 5th Oct 2007 15:07
There is a fpsc commercial game that has bumps working on segments, I forget the name of it, E.L.E or E.L.U. something like that, Spanish developer, try asking them, if they altered the source code, perhaps they may let you have it.

Also, there is a guy working on the shaders on the boards,, I think his name is Nightshade or something on that lines, he has a bloom effect working on fpsc and is working on adding more, he had to alter the source to get them working.

Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 5th Oct 2007 15:39
Quote: "try asking them, if they altered the source code, perhaps they may let you have it."

nah, they ignore any questions on how they did anything.


Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 5th Oct 2007 16:01
Hm I share my (few) insights always as good as i can. However, I´ve switched to low poly entities replacing the segments, and the shaders work fine now.

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 5th Oct 2007 16:19 Edited at: 5th Oct 2007 16:20
Now the new process looks like this:

1. I prepare d2 and N texture, the N map is made with the GIMP plugin, using sobel 3*3 or 4pass algorithm.

2. I create the entity in MagicFPS and assign the d2 texture.

3. I kick the "tex" addittion attached to the filename by MagicFPS out of the filename AND the fpe. Then I delete the comment remark near the effect line and change the effect to bump.fx - the final file looks like that:



4. I copy the _N map into the magicFPS / Objects folder, use the entity and build my game with full shaders.

5. It`s bumping pretty ok then:



However, in motion it looks far more impressing than in a still picture...

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
fallen one
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: My imagination!
Posted: 5th Oct 2007 17:52
If you have bump maps working that a big step forward, Ive never seen them, apart from in that ELE or whatever its called, Ertlov, wouldnt mind seeing a film in action if it works, this is a first if you really have it working.

Also I notice in DX10 the have parralax working, they had a vid of it, not sure if it was in the news letter.

Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 5th Oct 2007 17:59
Same. It would be cool to see a vid.

TGPEG
17
Years of Service
User Offline
Joined: 28th Dec 2006
Location: Bristol, United Kingdom
Posted: 5th Oct 2007 22:06
I think Nighthawks mod has parralax mapping in. (or at least there was a lot of suggestions in his thread about it)

[center]
Cheese Cake
17
Years of Service
User Offline
Joined: 11th Dec 2006
Location: At the bakery
Posted: 6th Oct 2007 10:36
I have tried to apply normal maps to entities,
but i didnt had any succes.

Cheers,
Cheese Cake.


Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 6th Oct 2007 12:15 Edited at: 6th Oct 2007 12:18
I`ve found out, that for some reason bumpent.fx works better than bump. I`ve created a small video, the problem is that the effet would need a far better resolution / less compression to be seen perfectly. However, it can be seen. The first part is a metal wall, where I`ve first created an extremely distorting normal map for the surface, and than I used the simple brush tool of Gimp to paint out the "deeper" part with one single height. This looks pretty ugly but was done to ensure myself that I`m really experiencing bump mapping, and that I`m not tricked by a good texture to believe it`s bumped.
The second part is out of my Winter contest game, where I made a roughcast wall with a slight normal map attached to it. Even with the small resolution, you will be able to see that a nice 3D effect is achieved.

http://www.homegrowngames.at/bumpy.wmv

If anyone wants to try out ingame, I can send you all the entity files of such a wall...

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
Woolfman
17
Years of Service
User Offline
Joined: 19th Sep 2007
Location: Cave
Posted: 6th Oct 2007 16:27
I would love to try out one of those entity files.E-mail it to me, One with color plz thats where i've been having my problems. I've been able to see Bump and Normals but they didn't have color. (well the normals did but didn't have a texture it just showed a normal map )

THanks Woolfman
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 6th Oct 2007 21:20
I would like to see how you did this, Ertlov.

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 6th Oct 2007 21:35
I will upload all files (both textures, the fpe, x and so on...) tomorrow so everyone can try to figure out why it works - because I don`t know

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 6th Oct 2007 21:39
Sweet.

Can't wait.

Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 6th Oct 2007 21:50
Sorry for the double post...

So your walls are entities? Doesn't that affect your framerate?

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 6th Oct 2007 22:43
No, static entities don`t mess up my frame rate...

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 6th Oct 2007 23:44
Yeah, but the portal system relies on segments (at least I'm pretty sure about that), and if the walls are entities, I don't think it would work.

TGPEG
17
Years of Service
User Offline
Joined: 28th Dec 2006
Location: Bristol, United Kingdom
Posted: 6th Oct 2007 23:52 Edited at: 6th Oct 2007 23:56
Not nescassarily. (<- spelt wrong)
There is a property in the fpi of an entity that allows the portals to cut through it. Give me five minutes and I'll tell you what it is...

EDIT: No there isn't anything in the fpe, but there is in the fpi. I got this from the GPS trapdoor thing. Something to do with csgimmune=1 or a property like that in the fpi of the segment that's doing the portal cutting.

[center]
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 7th Oct 2007 02:53
Wow, that's really useful. Thanks. I'll look for it.

Nomad Soul
Moderator
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 7th Oct 2007 05:58
Ertlov

I've not had too many problems getting normal maps to work on entities in FPSC as demonstrated in my thread which rolfy pointed you towards earlier.

I've already documented the issues mentioned regarding normal mapped segments and shader file light source limitations. I think E.L.E has segment shaders working better because they have a custom bump shader .fx file applied to segments. It's not a source code edit, just a better shader.

The problem I have when incorporating normal mapping using entity walls and floors is that to make use of additional texture maps I have to set them as dynamic else they don't show up in a built level.

Then the entity will appear in the level normal mapped but falls over as soon as light sources are added as FPSC lights dynamic geometry differently to static. I've attached a video to demonstrate the problem when using the bumpent shader effect.

If you have static entities working with the bumpent shader and full lightmapping then I'd appreciate you uploading an example one with the associated files for testing.

Nice to see that they've got parallax mapping in for X10 now. I really hope that X9 shaders get some attention from TGC soon.

Thanks

Attachments

Login to view attachments
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 8th Oct 2007 13:56 Edited at: 8th Oct 2007 13:57
Here is the package including all files, just put them into a folder of your desire inside your entitybank and feel free to play around with it.

The normal map was created with a pass 4 algorithm and is not distorted heavily, just a slight height definition map that works fine for the roughcast wall.

http://www.homegrowngames.at/goodies/bumpwall.zip

One possible workaround to the messed up mapping of entities that should merge into each others is creating the whole wall of a room as a single entity.

Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
Nomad Soul
Moderator
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 9th Oct 2007 01:18
Ertlov

As I feared, FPSC only makes use of the additional normal map texture for your entity wall when the entity is made dynamic, otherwise if static only the default texture is used. This is a problem due to:

a) even when made immobile and no physics on, building an environment with dynamic entities isn't going to run as smoothly as with static.

b) lightmapping works differently on dynamic entities than with static entities which means you would have to build loads of custom geometry and position lights really carefully to look convincing.

I've had some success getting normal mapping to work on segments but again once lights are introduced into the environment, the textures are lost completely leaving black walls and floors.

You're only going to have success at this point in time by building segments with normal mapping and only using ambient lighting alone to light the environment which doesn't cut it for me.

I've attached a normal mapped segment and equivalent entity wall and floor which people can play around with in addition to your entity wall. If you make a room with the segment and don't use any lights and ensure shaders are on you'll see it works just fine but add a light into the room and it's all over.

Basically TGC needs to update the existing bump .fx shader files or add new ones which work better with segments. Otherwise keep pestering the E.L.E team to give you their bump shader which seems to work ok.

I emailed Lee a while back with the files attached and gave him a breakdown of the issues. He said he's added them to his X9 work folder to look into after X10 is released so I'm just hoping he gets around to it sooner rather than later.

If your really serious about getting bump / normal mapping into your game at an environment level, start looking into amending / creating .fx files.

Nomad

Attachments

Login to view attachments
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 9th Oct 2007 03:01
I haven't really messed around with normal mapping after my initial failure, but why don't you just duplicate the stock segments, and replace the textures?

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 9th Oct 2007 12:20
That`s it...

That`s it!

THAT`S IT!!!!

Yes, it works, no matter how many light sources, no matter how the level is designed!!!

Inspire, if I wasn`t already married, you`d get a proposal

Here`s the pic, based upon a modified detention block "TOP" (And I know that the mesh isn`t fitting to the texture, but the point is it worked):



Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 9th Oct 2007 12:51
And here with a less impressive yet more realistic mesh:



Support the efforts of Homegrown Games! Don`t let us starve!
Buy Anderson:
https://buy.metaboli.com/vnt/panier.html?partenaire=33&id_titre=354&langue_page=en
Sloan
17
Years of Service
User Offline
Joined: 6th Oct 2007
Location: this forum
Posted: 9th Oct 2007 18:28
Is this on your entity wall or is this copy still a segment?
fallen one
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: My imagination!
Posted: 9th Oct 2007 20:20
Ertlov how did you get it to work then, is it working, is this solved, has this finnaly been done in fpsc.

Cheese Cake
17
Years of Service
User Offline
Joined: 11th Dec 2006
Location: At the bakery
Posted: 9th Oct 2007 20:30
But....they are all grey?

Is this the texture or something else?


Cheers,
Cheese Cake.


Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 9th Oct 2007 22:57 Edited at: 9th Oct 2007 23:32
Quote: "That`s it...

That`s it!

THAT`S IT!!!!

Yes, it works, no matter how many light sources, no matter how the level is designed!!!"


Awesome! That is AWESOME!

I am so happy. Normal maps for everything in my map.

Quote: "Inspire, if I wasn`t already married, you`d get a proposal"


Well, if things don't work out...I'm not taken at the moment.

Quote: "But....they are all grey?

Is this the texture or something else?"


That's the texture, I assume.

By the way Ertlov, nice texture.

EDIT:

After the competition, I might make a program that will make this easier to do (instead of all of the copying, etc). I might make it now, and not release it. Don't know, just a thought.

EDIT #2:

I tried it, and it didn't work. I don't know why. For some reason, FPSC doesn't use shaders, even though my computer can run them. I have full shaders turned on, etc, but it refuses to run them, even on default stock segments. This might also be because my normal wasn't really exaggerated, but it works fine in DBPro, so I don't understand this.

fallen one
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: My imagination!
Posted: 10th Oct 2007 00:32
Well its like I always thought, shaders dont work, I didnt think copying would do it, the ones that come with tthe game dont work, so copying wont do it, they just dont work, but keep us informed, I hope you crack it, If only that ELE game would let us have their shaders or code so we could have it as well.

Login to post a reply

Server time is: 2024-11-27 07:49:38
Your offset time is: 2024-11-27 07:49:38