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.

Newcomers DBPro Corner / Lightmap shader and fog ?

Author
Message
RonsWare
14
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 20th May 2012 12:27
Hello fellow coders.

One question.

Is it possible to use a lightmap shader in combination with fog ?

thank's for reading.

Cheers Ron.

Programming is learning
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 20th May 2012 13:18
Lightmaps can be baked into your scene from a 3D modelling program, it uses a second level for the lightmap texture and then both textures are blended together to make a real nice effect.

No shader.

Delgine's DeleD is a free modelling package that allow you to create levels with as many lights as you need. When you're ready, just click the lightmap option and save out as a dbo file and you're done.

And yes, it works with fog.

EDIT: Lightmapping takes 1 extra texture stage. DirectX and DBPro has 8 texture stages. ie for normal maps, etc. Lightmapping is just one of these stages which is blended.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
RonsWare
14
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 20th May 2012 14:52
WLGfx thank's again for the fast respons

I have made a simple level / scene with Mapscape and let it render
the lightmaps.
Export the level as a .DBO file

After that loaded it with the usual DBP instructions into the
little project.

Then i uses a lightmap shader to get it working.

After your response i did this.

I marked the lightmap shader code as a comment and i don't see any textures anymore.

With the lightmap shader working the textures are drawn also.

But i lose the fog

I am downloading Deled

Thank's

Ron

Programming is learning
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 20th May 2012 21:44
As far as I know it should work as a dbo file object with lightmapping, if not then try exporting as a .x file instead. It's been some time but I do know DeleD exports .dbo with no problems.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 20th May 2012 23:06
Quote: "I marked the lightmap shader code as a comment and i don't see any textures anymore.

With the lightmap shader working the textures are drawn also.

But i lose the fog

I am downloading Deled"

you can't use shaders and fog. You can however code the fog inside the shader. Without the shader you need to manualy tell dbpro how to blend the ligthmap and diffuse texture using SET BLEND MAPPING ON command

RonsWare
14
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 27th May 2012 17:52
Sorry for my late respons.

I have made a level with DeleD and a lightmap.
I have used the dbo export plugin.

To get the textures working i put them in de same dir as the .DBO.

Thanks Ron.

Programming is learning

Login to post a reply

Server time is: 2024-11-24 22:03:41
Your offset time is: 2024-11-24 22:03:41