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 / Face Painting & Am I In The Light

Author
Message
Ramus73
17
Years of Service
User Offline
Joined: 24th May 2009
Location:
Posted: 14th Oct 2014 10:30
Hi guys
I have a couple of questions that I hope one of you gents can answer.
1. Is it possible to texture a face of an object within DBP?
2. Is it possible to detect how much light an object is receiving?
Cheers
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 14th Oct 2014 15:23
Yes. Anything is possible.

1. There was a discussion on decal projection a few years ago, I wrote a demo that might interest you. (Thread | Demo Download)
2. You could check into ambient occlusion to get a crude approximation of global illumination.

I like offending people. People who get offended should be offended. -- Linus Torvalds
Ramus73
17
Years of Service
User Offline
Joined: 24th May 2009
Location:
Posted: 14th Oct 2014 15:48
Ambient Occlusion : The occlusion A_\bar p at a point \bar p on a surface with normal \hat n can be computed by integrating the visibility function over the hemisphere \Omega with respect to projected solid angle:
A_\bar p = \frac{1}{\pi} \int_{\Omega} V_{\bar p,\hat\omega} (\hat n \cdot \hat\omega ) \, \operatorname{d}\omega

......ummm I think I'll just stick with no light detection.
Thanks TC
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 14th Oct 2014 17:34
The things you asked are pretty advanced. There's no way to really make something easy that isn't easy.

If you search the forums for "ambient occlusion" you'll find loads of examples.

I like offending people. People who get offended should be offended. -- Linus Torvalds
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 15th Oct 2014 17:11
Quote: "ummm I think I'll just stick with no light detection."


If I were in your shoes Ramus73, I would not give up there; I would step back a bit and look at the big picture.

Let us know why it is you need to detect how much light is hitting an object; and whether this is necessary for your end goal.

The reason for why you need to detect how much light is hitting the object could also have an alternative solution.

What kind of lights are we dealing with? Light-map lights, shader lights? If they are lightmap lights, your light-map can reveal how much light a certain object's vertices are receiving; which could be a good start depending on what it is you are aiming to achieve.

Login to post a reply

Server time is: 2026-07-17 12:28:23
Your offset time is: 2026-07-17 12:28:23