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 / Lightmaps + bump mapping?

Author
Message
wattywatts
15
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 23rd Mar 2013 17:57
Just playing mass effect and realized the shadows are not all real time. I see pre rendered light maps on the environments, real time shadows cast by characters, and bump mapping on all objects. However, as far as I'm aware with any bump shader I've seen it's not possible to use lightmaps as well. Does anyone have any info on this?
I was thinking maybe if I can find a shader that supports light+bump maps I could then cast character shadows on an invisible plain just above the floor with a separate shader.

http://mattsmith.carbonmade.com/
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 25th Mar 2013 07:09
I don't see why that can't be possible. Give me a few hours and let me try something. *digs up Fallout's shadow shader tutorial"

TheComet

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 25th Mar 2013 11:28 Edited at: 25th Mar 2013 11:29
Three questions:

1) Does your lightmap use the same UV coordinates as the diffuse texture?

2) If not, is your modelling program capable of outputting two UV coordinates per vertex? If that's not possible, I can write a short function which will create such an object out of two existing objects (the diffuse object and the light-mapped object), which can be used in the shader.

3) Bump-mapping without normal mapping? Or are you speaking of parallax mapping, which is a combination of normal and bump mapping?

On that note, what is the difference between "bump-mapping" and "height-mapping" anyway?

TheComet

wattywatts
15
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 25th Mar 2013 12:25
Well that was fast!
1. I believe so, I'm using darklights for lightmaps, I can upload a model if it would help.
3. I must be speaking of parallax mapping in that case, as I've always used the terms bump and normal mapping interchangeably.

The only real difference I can think of between a bump/normal map and height map is that height maps are shades of grey, but I could be wrong even on that point.

Many thanks for your help, if you can get this working it will be awesome!

http://mattsmith.carbonmade.com/
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 25th Mar 2013 13:37
Could you upload a very simple scene so I have something accurate to work with? Just a plain for the ground, a cylinder in the centre, a simple texture (diffuse, normal, bump) - and a few colourful lights here and there will do. Or something more complex if you want. Whatever works.

TheComet

wattywatts
15
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 25th Mar 2013 16:10
Here you go, let me know if you have any problems with it. It was exported with darklights.

http://mattsmith.carbonmade.com/

Attachments

Login to view attachments
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Mar 2013 12:15
An update. I can get the normal mapping working just fine, the shadows are working too, but I have no idea how to get the light map onto the object, because I don't know how the UV coordinates are stored.

*goes back to shader programming*

TheComet

Login to post a reply

Server time is: 2025-05-17 12:54:33
Your offset time is: 2025-05-17 12:54:33