Jump to content


Photo

Volumetric Lighting - Updated to v2.0!


  • Please log in to reply
50 replies to this topic

#21 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 02 May 2010 - 07:12 PM

Looks great Phantom! Another gorgeous effect added to my library! pretty fps
Next up?

I think I'll make the heat haze next. I think that users with fire in their games will really like it.

I might take requests if I find them really interesting.

Also, what tool are you talking about for AO?

Check this out!

This program is straight up amazing. Besides nice AO, it's also capable of making normal maps and height maps which are useable in GM OGRE, but unfortunately not in GM-D3D.

Everything is possible. :D
Nvidia say's: Ambient occlusion adds realism to scenes by reducing the intensity of ambient light on surfaces blocked by surrounding objects.

I think it would be possible.
It's just a surface after all.

Sorry, but not in real-time. For this we would need access to the depth buffer, which compares pixel depth. I don't think there is any way to fake that using a surface.

edit: Here's an example of the generated ambient occlusion: http://img219.images...ntocclusion.png

edit 2:
------------------------------------------------------------------------------------------------------------------------------
I just noticed I made a bit of a mistake in the example. I accidentally put view_hview[0] on 800 instead of 600. That made the 3d-to-2d conversion go a bit off so the focus point wasn't very accurate. But that's fixed now. I changed the value and re-uploaded. The focus point is accurate now and the effect is as it should be.

If you have downloaded it already just change view_hview[0] in the room editor from 800 to 600. That should fix it.

Here's the fixed version anyway:
http://host-a.net/Ph.....ing Fixed.zip
------------------------------------------------------------------------------------------------------------------------------


Nice tool. You could convert vertices based d3d model to .obj. Well, people can use my tool for thatthen go to this tool. Great stuff

And your fix solves the problem I was trying to explain.
  • 0

#22 Phantom107

Phantom107

    Engineer

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

Posted 02 May 2010 - 07:21 PM

You could convert vertices based d3d model to .obj. Well, people can use my tool for that then go to this tool. Great stuff

Yes, I'm actually using GMModelFix to convert my OBJ model to d3d for my next example. Along with Ambient Occlusion. Stay tuned. :D
  • 0

#23 Desert Dog

Desert Dog

    GMC Member

  • Global Moderators
  • 6409 posts
  • Version:Unknown

Posted 02 May 2010 - 10:34 PM

Here's the fixed version anyway:

Do you want to remove the original download link in the first post then? I downloaded it, before reading the red.... :S :P

This effect's pretty cool looking, alright. Can't wait to see what else you come up with. :D
  • 0

#24 Robert3DG+

Robert3DG+

    VR Games

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

Posted 03 May 2010 - 04:32 AM

Can't wait!

You can always count on Phantom107 to release some badass opensource stuff!
  • 0

#25 THE_GAME_EDITOR

THE_GAME_EDITOR

    GMC Member

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

Posted 03 May 2010 - 07:19 AM

Sorry, but not in real-time. For this we would need access to the depth buffer, which compares pixel depth. I don't think there is any way to fake that using a surface.

edit: Here's an example of the generated ambient occlusion: http://img219.images...ntocclusion.png

Please, could you tell me what depth buffer is? :blink:
I can't find a simple explaination on internet. :D

..which compares pixel depth.. with what?
  • 0

#26 Newly Discovered

Newly Discovered

    Harmonious Genius

  • New Member
  • 2467 posts
  • Version:GM8

Posted 03 May 2010 - 09:23 AM

a depth buffer is like drawing everything white and setting a black fog, resulting in black and white and shown an obvious depth difference.
you'd then compare pixels to find similar depths, then apply a darkness?? to the AO surface??
comparing pixels like this in realtime with surfaces would be tremendously slow. pixel shaders are a ton faster as they retrieve pixel info directly from GPU? instead of having to render to a surface using an already slow game maker...

Edited by Newly Discovered, 03 May 2010 - 09:27 AM.

  • 0

#27 THE_GAME_EDITOR

THE_GAME_EDITOR

    GMC Member

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

Posted 03 May 2010 - 09:37 AM

a depth buffer is like drawing everything white and setting a black fog, resulting in black and white and shown an obvious depth difference.
you'd then compare pixels to find similar depths, then apply a darkness?? to the AO surface??
comparing pixels like this in realtime with surfaces would be tremendously slow. pixel shaders are a ton faster as they retrieve pixel info directly from GPU? instead of having to render to a surface using an already slow game maker...

Okay..

slow game maker

Yeah talking about slow gamemaker.. gamemaker doesn't react at the moment. :blink:
I just mirrored the sprite. That's all.
  • 0

#28 Phantom107

Phantom107

    Engineer

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

Posted 03 May 2010 - 10:09 AM

a depth buffer is like drawing everything white and setting a black fog, resulting in black and white and shown an obvious depth difference.
you'd then compare pixels to find similar depths, then apply a darkness?? to the AO surface??
comparing pixels like this in realtime with surfaces would be tremendously slow. pixel shaders are a ton faster as they retrieve pixel info directly from GPU? instead of having to render to a surface using an already slow game maker...

Because it will be so slow, I have used the pre-rendering tool (xNormal) to just bake the Ambient Occlusion to a fixed texture. That way it will barely cost anything extra to run in GM, but still give a great sense of visual enhancement. I know it isn't realtime, but you will be pleased with the results.
  • 0

#29 BattleRifle BR55

BattleRifle BR55

    Moo

  • GMC Member
  • 8246 posts
  • Version:GM7

Posted 03 May 2010 - 10:27 AM

Great, yet another thing I can't (easily) try out from one of my favourite members here :blink:

Any chance we could get an .exe? (From anyone, at least?)
  • 0

#30 Phantom107

Phantom107

    Engineer

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

Posted 03 May 2010 - 10:34 AM

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

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

#31 BattleRifle BR55

BattleRifle BR55

    Moo

  • GMC Member
  • 8246 posts
  • Version:GM7

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
  • 525 posts

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

    Engineer

  • GMC Member
  • 2593 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
  • 525 posts

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

    Engineer

  • GMC Member
  • 2593 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
  • 866 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

    Engineer

  • GMC Member
  • 2593 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
  • 866 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
  • 866 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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users