Jump to content


Photo

Volumetric Lighting - Updated to v2.0!


  • Please log in to reply
50 replies to this topic

#31 BattleRifle BR55

BattleRifle BR55

    Let Live

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

Posted 03 May 2010 - 10:41 AM

I replaced the non-fixed version with an EXE-version. Here you go:

http://host-a.net/Ph...ic Lighting.zip

That was so much better in motion! It was enough to convince me to start translating it into GM7 to see how it will work in my FPS.
  • 0

#32 krele

krele

    GMC Member

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

Posted 10 July 2010 - 10:56 AM

Epic win!

This is revolutionary! And here I thought crysis was amazing because of god-rays! You really show us the way GM can be awesome aswell ;)

My machine runs this on whoopin' 360 fps ;D
  • 0

#33 Phantom107

Phantom107

    Graphics Enthusiast

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

Posted 10 July 2010 - 12:13 PM

Thanks everyone. :D

My machine runs this on whoopin' 360 fps ;D

Potentially it can go even faster, since I found out a way to do this effect using only 1 render of the scene. If enough people are using this/would want this, I'll make an example with that.
  • 0

#34 krele

krele

    GMC Member

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

Posted 11 July 2010 - 11:21 AM

Brilliant!

Now... Would this work if you place trees instead of boxes? So the rays go through leaves? 'Cause that would be epic =)

Nice work!
  • 0

#35 Phantom107

Phantom107

    Graphics Enthusiast

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

Posted 11 July 2010 - 12:35 PM

Brilliant!

Now... Would this work if you place trees instead of boxes? So the rays go through leaves? 'Cause that would be epic =)

Nice work!

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.

  • 0

#36 Dylan93

Dylan93

    GMC Member

  • GMC Member
  • 867 posts
  • Version:GM8

Posted 12 July 2010 - 07:57 PM


Brilliant!

Now... Would this work if you place trees instead of boxes? So the rays go through leaves? 'Cause that would be epic =)

Nice work!

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.


Gotta love that effect :D

btw why is your Aero off ?
  • 0

#37 Phantom107

Phantom107

    Graphics Enthusiast

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

Posted 12 July 2010 - 08:37 PM

btw why is your Aero off ?

Because for my desktop, I got Vista Basic 64-bit OEM. I didn't want to pay 100 just to have Aero. That's already half another GTX 275.
  • 0

#38 Dylan93

Dylan93

    GMC Member

  • GMC Member
  • 867 posts
  • Version:GM8

Posted 12 July 2010 - 09:10 PM


btw why is your Aero off ?

Because for my desktop, I got Vista Basic 64-bit OEM. I didn't want to pay 100 just to have Aero. That's already half another GTX 275.


Oooh right :), I got my Win 7 Pro (x64) from my school (IT).
  • 0

#39 ydawg314

ydawg314

    GMC Member

  • New Member
  • 901 posts
  • Version:Unknown

Posted 20 July 2010 - 04:17 PM

Could you possibly make a 2d version. I am making a top down shooter and I would love to use this effect to render light rays shinning through trees or buildings but I have no idea how.

Is there a way to do this with 2d graphics? or should I start using 3d shapes

Edited by ydawg314, 20 July 2010 - 04:23 PM.

  • 0

#40 Dylan93

Dylan93

    GMC Member

  • GMC Member
  • 867 posts
  • Version:GM8

Posted 20 July 2010 - 09:27 PM

Could you possibly make a 2d version. I am making a top down shooter and I would love to use this effect to render light rays shinning through trees or buildings but I have no idea how.

Is there a way to do this with 2d graphics? or should I start using 3d shapes


How would you do THIS in a topdown shooter ...
I can see this in a platformer but not a topdown shooter.
  • 0

#41 Phantom107

Phantom107

    Graphics Enthusiast

  • GMC Member
  • 2667 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 Alvare

Alvare

    Allrounder

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

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

    Graphics Enthusiast

  • GMC Member
  • 2667 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
  • 3024 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+

    Designer

  • GMC Member
  • 1925 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
  • 1102 posts
  • Version:GM8.1

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

    Graphics Enthusiast

  • GMC Member
  • 2667 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

    Graphics Enthusiast

  • GMC Member
  • 2667 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