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.

DarkBASIC Professional Discussion / Fog and bump mapping problem?

Author
Message
SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 19th Jan 2013 22:12
Hi,
Sorry, been making quite a few post recently, but really running up against a few issues with what I'm doing at the moment, and you guys are great at helping me around them
In my program, a fair few of the objects are bump-mapped (in particular, a very long flat plain, which represents a road). There's also supposed to be fog in the game, to make it mysterious and a little scary. The problem is, objects with bump mapping applied don't fade as they should when receding into the fog. I've tried manually setting them to respond to fog with set object fog, but no luck there :/
I've also been having trouble getting bump mapped objects to respond to a fair few other (mainly light related) statements, such as ambient light changes and set object light.
I was wondering if there was some kind of work-around for this, because without the bump mapping it has the visual feel of a game from 1998!
Thanks!
zeroSlave
17
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 19th Jan 2013 22:37 Edited at: 19th Jan 2013 22:40
I'm not sure, but as a quickie, you may check into SET OBJECT NORMALS ObjectNumber

If you are really wanting to get the best looks for your games using bumpmapping/normal mapping, specular, advanced lighting, etc... then you should look into shaders. They take more work, but are very powerful and can look fantastic.

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 19th Jan 2013 23:40
fog and lights can't be combined with shaders. They have to be coded inside the shader

SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 23rd Jan 2013 21:03
Ok, thanks for that! Unfortunately, SET OBJECT NORMALS made no difference :/
So what you're saying Brendy is that bump mapping and fogging don't mix? :/
Ah well... I guess my game's going for the 1998 look... I'm pretty terrible with all external .fx shaders! Finding good ones seems to be my first problem, and then knowing what to actually do with them... I can't seem to get my head around all these multiple cameras and postprocessing stuff
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 23rd Jan 2013 21:15
Quote: "So what you're saying Brendy is that bump mapping and fogging don't mix? :/"

yes

Green Gandalf, i think, made a fog shader some time ago so you can do a little search on the forum and maybe you'll find it

Login to post a reply

Server time is: 2026-07-07 12:28:31
Your offset time is: 2026-07-07 12:28:31