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 / Volumetric Lighting

Author
Message
Arius Myst
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 22nd Aug 2003 17:26
Is it possible to create dynamic, volumetric lighting. Like below:



Or do i need to actually code the functions myself??
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 22nd Aug 2003 17:40
Proably if you used some sort of shader, but no, not using built in commands.

There's no place like 127.0.0.1

There are 10 people in this world, those who understand binary and those who don't.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 22nd Aug 2003 17:44
I think you could do it if you were prepared to get really low level (memblocks / meshes). Personally I just cheat and use plains to give the impression of such lighting. And occassionally memblocks can be used to simulate lighting (make the verticies brighter nearer the source of the light)

Arius Myst
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 22nd Aug 2003 17:44
ahh thnx, lol like ur sig btw

¥öü ®å§Ë tHË ß|å�Ë, ¥öü måkË tHË ÇHåñgË, ¥öü ®Ëå®åñgË mË tî|| î'm §åñË
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd Aug 2003 22:49
you could fake it... pretty simple to fake too.
first you need to make 4 planes, 3 of which are a set distance from the window & billboarded the fourth is a camera overlay - you then render using black&white colours for the models no lighting no ambience etc...
take the back buffer of that to get the original windows light template.
Then another to get the main character imposed...
finally do a mask subtraction of the first layer from the second.

now rendering using only these templates and you pixel overlay with the lights colour - finally do a depth blur between the first and last templates and put it on the overlay and render the scene behind it normally.

pretty simple, but not processor friendly and you'd need good understanding on camera movement and the back/frontbuffers.

personally though i think if you have to ask how to achieve something graphically, then generally your not ready to achieve it.

Arius Myst
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 23rd Aug 2003 16:55
Why?

DbPro's help sucks. So of course i'm going to ask questions about things not mentioned in the help file. I don't think asking questions means you aren't ready to do something. Otherwise why are people here??

Your doing good tho Raven, you managed to complete 95% of the thread without trying to insult my intelligence.

¥öü ®å§Ë tHË ß|å�Ë, ¥öü måkË tHË ÇHåñgË, ¥öü ®Ëå®åñgË mË tî|| î'm §åñË
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 23rd Aug 2003 21:48
advanced 3D effects have nothing to do with DarkBASIC Professional, they're oblivious to languages - they're all upto YOUR skill as a programmer to think of a way to achieve what you want.

sorry but when your ready to achieve Volumetrics effects you won't have to ask us on howto achieve it.
and who is to say that the method i have described is the best for your game? would it even fit into what your trying to create? would it be fast enough for the system your aiming for?
i've explained how i would do it, but do you even understand why what i suggest would work?

Arius Myst
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 24th Aug 2003 16:07
Sorry i didn't mean to come at you like that. I was stoned an in a foul mood. I think i understand the concept of what your saying. I know things like that are oblivious to languages(I can actually code in several, just new to dbpro). But then particle systems an such are all in built to dbpro so advanced lighting effects could have been too.

¥öü ®å§Ë tHË ß|å�Ë, ¥öü måkË tHË ÇHåñgË, ¥öü ®Ëå®åñgË mË tî|| î'm §åñË
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 24th Aug 2003 19:50
http://www.cgshaders.org/shaders/show.php?id=49



That pixel shader could be what you're looking for?

There's no place like 127.0.0.1

There are 10 people in this world, those who understand binary and those who don't.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 24th Aug 2003 23:51
hey dave have you actually got any of those example to work off the bat?

... no matter which card i've used i've always had to crack open the source and totally rewrite them for DirectX9 just to get the sources on CgShader.org to work.
I really wish I understood enough about OpenGL to be able to figure out why they all just disconnect.

David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 25th Aug 2003 00:15
hey dave have you actually got any of those example to work off the bat?

no although I've just about got that simple one that came with the FX mini browser working, nice metallic glare on my objects

Raven, do you think you could translate any for us? You're our only hope when it comes to pixel shaders!

There's no place like 127.0.0.1

There are 10 people in this world, those who understand binary and those who don't.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 25th Aug 2003 00:40
i suppose i could... you know i've tried everything i know to get that SoftShadows example to actually work short of contacting the creator and asking for the source.

(although last time i did that, it did no sodding good because the creators source was a true mess and wasn't compatible with MSDEV because OpenGL programmers who use Dev-C and Codewarrior are so bloody lazy)

that aside, i suppose i could help out with a few HLSL/Cg shaders - but ya'll will have to really talk to me more through email cause i've got alot of work to do here plus i start my new job tommorrow, so my social time is down to less than zero

-- --

hopefully i'll have my domain up soon, and the website ... gonna have a few tutorials and free shaders for creating shaders in Max/Maya/Softimage & using them in OpenGL/DirectX/DarkBASIC Professional.

plus i'll be retailing shaders, i'm still not entirely sure how i can protect them from people who want to pirate them but i'm sure i'll think of something %)

besides i kinda get the impression that some other guys around here know more about shaders than me, Neo for example seems to trumpet up everytime they're mentioned - i've not seen any work from him yet working (even from examples he's nicked) but as he seems to know everything about them perhaps you can ask him until i return

David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 25th Aug 2003 00:44 Edited at: 25th Aug 2003 00:46
OK thanks I've added you to my msn contacts list so if we get any time maybe we can talk.

There's no place like 127.0.0.1

There are 10 people in this world, those who understand binary and those who don't.
Neophyte
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 25th Aug 2003 07:22
@Raven

"Neo for example seems to trumpet up everytime they're mentioned "

Hardly.

"i've not seen any work from him yet working (even from examples he's nicked"

I could say the same of you.

"but as he seems to know everything about them perhaps you can ask him until i return "

I suppose I could pitch in and lend a hand. There seems to be a lot of questions regarding them lately.

Login to post a reply

Server time is: 2026-07-23 00:17:34
Your offset time is: 2026-07-23 00:17:34