Jump to content


Photo

Volumetric Lighting - Updated to v2.0!


  • Please log in to reply
50 replies to this topic

#41 Phantom107

Phantom107

    Engineer

  • GMC Member
  • 2597 posts
  • Version:GM:Studio

Posted 20 July 2010 - 09:34 PM

The technique works only if you are looking directly at the light, which is not the case in a top-down view. But you might be able to fake it somehow, by just drawing light rays at some places.
  • 0

#42 RamboFox

RamboFox

    Tainted Fortune

  • New Member
  • 992 posts

Posted 28 July 2010 - 12:22 PM

I think it's pretty, but it's not *that* pretty. However, anyone who understand how this works can re-program a bit of the system and make it optimal for leave-rays.[/font]

All you need to do is increase the steps - mess around in the for loops and you'll find what will make it look allot more smoother (but it will lag a little bit more, of course).
  • 0

#43 THE_GAME_EDITOR

THE_GAME_EDITOR

    GMC Member

  • GMC Member
  • 798 posts
  • Version:GM8.1

Posted 28 January 2011 - 09:59 AM

I've got some resources here, and I did a little test:

Posted Image

I think it's pretty, but it's not *that* pretty. However, anyone who understand how this works can re-program a bit of the system and make it optimal for leave-rays.

haha it's not that pretty because the background color doesn't show a bright blue sky color.
Just change the color and watch. :)

Edited by THE_GAME_EDITOR, 28 January 2011 - 10:00 AM.

  • 0

#44 Phantom107

Phantom107

    Engineer

  • GMC Member
  • 2597 posts
  • Version:GM:Studio

Posted 09 December 2011 - 11:29 AM

The effect has been upgraded to version 2.0!

- It now takes into account the angle you're looking at it, smoothly fading away!
- Because of the nature of how this works, the sun gets brighter when you look directly into it.
- In this new version the game only needs 1 render of the scene instead of 2, making this a lot more efficient!
- When the sun is outside the defined borders the effect will not be computed, saving performance.


Please see the first post! :happy:
  • 0

#45 TheSnidr

TheSnidr

    That guy

  • Global Moderators
  • 2438 posts
  • Version:GM:Studio

Posted 09 December 2011 - 01:56 PM

Whoa, this is really awesome! I expected it to be rather slow, but it barely reduced the maximum fps of my game at all. Thumbs up!
A tips though, you could make it easier to implement in new projects. One such method would be to use variables instead of magical numbers.
Anyway, after trial and error I managed to implement it in my game... And I must admit, it does look really awesome! For showoff-purposes I set the effect to the extreme:
http://img822.images...ricattempt2.jpg

I can make a gm8.1 version for you if you want. Then surface fix dll won't be necessary

Edited by TheSnidr, 09 December 2011 - 02:04 PM.

  • 1

#46 Robert3DG+

Robert3DG+

    VR Games

  • GMC Member
  • 1849 posts
  • Version:GM:Studio

Posted 18 December 2011 - 10:15 AM

Nice update Guus. Much faster than before. Posted Image
  • 0

#47 orange451

orange451

    GMC Member

  • GMC Member
  • 984 posts
  • Version:GM8

Posted 18 December 2011 - 10:22 PM

I can make a gm8.1 version for you if you want. Then surface fix dll won't be necessary


Yes, please :D
  • 0

#48 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 06 June 2012 - 05:02 AM

This is absolutely stunning (sorry this is sort of a bump) but anyways, i've been experimenting with it, combining in blend modes and its got me thinking, surely when you look around, shadows cast by light rays stay in the same spot relative to the view, now i know that the view fades out as you look away however there must be some way to adjust it.

after messing around for a while (sort of trial and error) i did manage to remove the huge white highlight leaving just the shadow cast behind, i really think this could be made into something, i also rigged it up to get it to have multiple light points working at one time, if it were to be used in a game, i think u could somehow rig this to make it cast really nice shadows, so long as you only have 3 or so lights in view at one time. Anyway even without the volumetric lighting, i got some nice specular effects when combining with other blend modes.

here's some pictures of what i achieved:

Posted Image

Posted Image


Another Image
And Another Image :P!


In this image, this is the one where i thought about the idea of shadows, when combining with blend modes, the contrast of the shadows against the ground was slightly increased giving this effect:
Posted Image

with this same effect i also got the same result except without the white glow by simply changing the blend mode on the light surface to normal. anyway im not too good with surfaces however i really think there is alot of potential to make something like this into an amazing 3D shadowcasting engine similar to the CBNA lighting engine (2D) except in 3D.

Either way fantastic work! I really love this, one of the best raw GM things, and i can say that i noticed very little fps drop, i was getting almost max fps (991/1000) with room speed set to 1000. Which is fantastic :D!

Edited by michael pw, 06 June 2012 - 05:05 AM.

  • 1

#49 Phantom107

Phantom107

    Engineer

  • GMC Member
  • 2597 posts
  • Version:GM:Studio

Posted 06 June 2012 - 07:45 PM

I've looked into shadow casting with this before but unfortunately it gave no good results.

Nice job on the 3D in the screenshots though, I like it! ;)

PS: You seem to have skill, check out the GM OGRE demo I made. I haven't been able to make volumetric lighting for that yet, but I'm sure you will find the engine interesting.
  • 0

#50 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 06 June 2012 - 09:12 PM

Ah that's a shame, i still think that there could potentially be a way, especially perhaps potential for pre-rendered static shadows. I Was going to start learning GM OGRE well atleast using it over Gm for graphics however i don't have GM8 (only 8.1) which is a problem because GM Ogre doesn't work on GM8.1 anymore :/ Is there an exe download of your example? i would still like to check it out :P!I Also couldn't find any links to it on http://wiki.yoyogame..._Maker_Versions as 8 isn't considered an old version, but oh well:P!

Edited by michael pw, 06 June 2012 - 09:16 PM.

  • 0

#51 Phantom107

Phantom107

    Engineer

  • GMC Member
  • 2597 posts
  • Version:GM:Studio

Posted 06 June 2012 - 10:05 PM

I put an *.exe version on my Dropbox. File link is here: https://www.dropbox....7/OGRE Tech.zip

As for the volumetrics, they are basically a 2D effect, so I don't think it will be any help in shadow computing.

Perhaps there is a way to make this even more efficient. I was thinking of faking a skew with an array of pre-computed triangles inside a model... rotating the model slightly would fake skew, and a large distance between the array entries will make sure it doesn't distort. I'm not considering updating the example again, but maybe you can come up with something.

Edited by Phantom107, 06 June 2012 - 10:09 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users