Jump to content


Photo

Volumetric Lighting - Updated to v2.0!


  • Please log in to reply
47 replies to this topic

#1 Phantom107

Phantom107

    Graphics Enthusiast

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

Posted 01 May 2010 - 10:50 AM

Volumetric Lighting

Hey there 3d users of the GMC,

I've been working on something special lately, and I think it's finally ready to show off.
Proudly I present to you: Volumetric Lighting.

So what is volumentric lighting?
Wikipedia states the following: "Volumetric lighting is a technique used in 3D computer graphics to add lighting effects to a rendered scene. It allows the viewer to see beams of light shining through the environment; seeing sunbeams streaming through an open window is an example of volumetric lighting, also known as God rays."

Why is the surface fix needed and how does it work?
The surface fix by amd24 is crucial in this technique. It allows me to render to a texture, which is exactly what I'm doing. In the step event, I make a seperate render of the scene, just like in my glow example. Except this time, everything in the scene will be black, except for 1 object: the light. The light will still use it's default texture.

My idea is that by scaling this 2d rendered "light-surface", you can create beams of light. But to do so, it needs to be scaled around a focus point. This focus point is the 3d position of the light. Problem is that we need to convert that 3d point to a 2d point on the screen, in order to do the scaling. That's where Yourself's conversion scripts come into play, which I made an example of here.

Using the resulting 2d focus point, it's possible to draw the "light-surface" a number of times with various scaling, around a certain 2d point on the screen. When drawing it on top of the normal scene render, light beams will come out really nicely.

Controls in the example:
  • Move around using WASD
  • Change height with QE
  • Look around with the mouse
Brand new version (v2.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.

Posted Image

Download link: right here!
File size: 0.51 MB

Old version (v1.0):

http://img153.images...volumentric.png
http://img265.images...volumentic2.png
http://host-a.net/Ph.....ing Fixed.zip

Enjoy!

- Phantom107

Edited by Phantom107, 09 December 2011 - 11:28 AM.

  • 2

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#2 Advokara

Advokara

    GMC Member

  • New Member
  • 116 posts

Posted 01 May 2010 - 10:55 AM

FIRST POST!
... Ok I'll stop trolling now.

For an actual review
Cool! :D
I've seen some nice effects and this wins :(
  • 0

Current Project: Craftbox Version 0.5


#3 RamboFox

RamboFox

    Tainted Fortune

  • New Member
  • 992 posts

Posted 01 May 2010 - 12:43 PM

Very, very nice! It's great to see the members of the Game Maker Community open sourcing/creating examples of cleverly coded engines.

And I'm sorry about that posts that I did in your other thread *deflates* I hope you can forgive me :D
  • 0

#4 Endorel

Endorel

    GMC Member

  • Banned Users
  • 191 posts

Posted 01 May 2010 - 02:24 PM

Hahaha, UGE is coming up with something even faster and smoother (oooo I can't wait), but still, this is pretty neat!
. . . Except not exactly hard to do.

Edited by Endorel, 01 May 2010 - 02:25 PM.


#5 Phantom107

Phantom107

    Graphics Enthusiast

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

Posted 01 May 2010 - 02:28 PM

Hahaha, UGE is coming up with something even faster and smoother (oooo I can't wait)

It's just a matter of time before I figure out shader programming with OGRE. Then we'll see.

edit: In other words, you won't stand a chance if you don't use DirectX9 (or up) and GPU shaders.

Edited by Phantom107, 01 May 2010 - 02:34 PM.

  • 0

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#6 Endorel

Endorel

    GMC Member

  • Banned Users
  • 191 posts

Posted 01 May 2010 - 02:37 PM

*removed by author*
Sorry!


Edited by Endorel, 01 May 2010 - 04:12 PM.


#7 Phantom107

Phantom107

    Graphics Enthusiast

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

Posted 01 May 2010 - 02:41 PM

Don't mess up my topic, send a PM.
  • 0

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#8 Endorel

Endorel

    GMC Member

  • Banned Users
  • 191 posts

Posted 01 May 2010 - 03:32 PM

Okay sorry! That was embarrassing!

#9 Alvare

Alvare

    Allrounder

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

Posted 01 May 2010 - 04:12 PM

You pwned crysis it's graphics with full fps. :D

Edited by THE_GAME_EDITOR, 02 May 2010 - 08:57 AM.

  • 0

:heidy:


#10 Endorel

Endorel

    GMC Member

  • Banned Users
  • 191 posts

Posted 01 May 2010 - 04:16 PM

Not exactly, but we can still make some pretty neat things with properly working surfaces. I don't think anybody is going to program realtime radiosity or ambient occlusion.

#11 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17247 posts
  • Version:GM:Studio

Posted 01 May 2010 - 04:23 PM

it's perty :D

it's not perfect<you stated> as it seems the light source and the casting is not adjusted properly to the 3d
  • 0

#12 Phantom107

Phantom107

    Graphics Enthusiast

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

Posted 01 May 2010 - 10:55 PM

I don't think anybody is going to program realtime radiosity or ambient occlusion.

No need, I've got a tool to bake ambient occlusion in the texture itself. Looks great, runs fast. :D
  • 0

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#13 Endorel

Endorel

    GMC Member

  • Banned Users
  • 191 posts

Posted 01 May 2010 - 11:02 PM

What we really need is multi-textures support.

#14 Phantom107

Phantom107

    Graphics Enthusiast

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

Posted 01 May 2010 - 11:05 PM

What we really need is multi-textures support.

Use the surface fix to do it?
  • 0

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#15 slayer 64

slayer 64

    Slayer of gingers

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

Posted 02 May 2010 - 12:34 AM

wowzers!
  • 0

5y5rs3d.pngfg0UQNL.png


#16 Schyler

Schyler

    Noskcirderf Derf

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

Posted 02 May 2010 - 01:26 AM

So pretty... .__.
  • 0

#17 Newly Discovered

Newly Discovered

    Harmonious Genius

  • GMC Member
  • 2475 posts
  • Version:GM8

Posted 02 May 2010 - 05:04 AM

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

Also, what tool are you talking about for AO?

Edited by Newly Discovered, 02 May 2010 - 05:06 AM.

  • 0

poof_sig.png


#18 Alvare

Alvare

    Allrounder

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

Posted 02 May 2010 - 08:56 AM

We pwned crysis it's graphics with full fps.

You pwned it Phantom. :P
http://www.thefs.net...ee-sun-rays.jpg

Not exactly, but we can still make some pretty neat things with properly working surfaces. I don't think anybody is going to program realtime radiosity or ambient occlusion.

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.
  • 0

:heidy:


#19 Phantom107

Phantom107

    Graphics Enthusiast

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

Posted 02 May 2010 - 09:32 AM

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
------------------------------------------------------------------------------------------------------------------------------

Edited by Phantom107, 02 May 2010 - 05:24 PM.

  • 0

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#20 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 17247 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

#21 Phantom107

Phantom107

    Graphics Enthusiast

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

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#22 Desert Dog

Desert Dog

    GMC Member

  • GMC Elder
  • 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
HTML5 games for mobile:
HexDogs Bugz Burn! Captain George Golfing Block Memory

Games for Androids
*NEW* Word Dog - Published by Dangerous_Dave


Code: General Array Functions - GM-S friendly. sorting, shuffling. Includes a quicksort.
Use the quicksort to sort ds_lists 10-18 times faster than ds_list_sort()!

#23 Alvare

Alvare

    Allrounder

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

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

:heidy:


#24 Newly Discovered

Newly Discovered

    Harmonious Genius

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

poof_sig.png


#25 Alvare

Alvare

    Allrounder

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

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

:heidy:


#26 Phantom107

Phantom107

    Graphics Enthusiast

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

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#27 BattleRifle BR55

BattleRifle BR55

    Let Live

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

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
Jmds8UL.png

#28 Phantom107

Phantom107

    Graphics Enthusiast

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

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#29 BattleRifle BR55

BattleRifle BR55

    Let Live

  • GMC Member
  • 9890 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
Jmds8UL.png

#30 krele

krele

    GMC Member

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

If I helped you, you can help me back :3

Brocoola


#31 Phantom107

Phantom107

    Graphics Enthusiast

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

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#32 krele

krele

    GMC Member

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

If I helped you, you can help me back :3

Brocoola


#33 Phantom107

Phantom107

    Graphics Enthusiast

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

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#34 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


Posted Image


#35 Phantom107

Phantom107

    Graphics Enthusiast

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

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#36 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


Posted Image


#37 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
Check out my newest game Redesigned from scratch!
Posted Image
Download Mobile Suit Grunt Wars.zip W.I.P 7-26
TEST YOUR MECH PILOTING SKILLS!!!
Spoiler

#38 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


Posted Image


#39 Phantom107

Phantom107

    Graphics Enthusiast

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

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#40 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

#41 Alvare

Alvare

    Allrounder

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

:heidy:


#42 Phantom107

Phantom107

    Graphics Enthusiast

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

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#43 TheSnidr

TheSnidr

    Heavy metal viking dentist

  • Global Moderators
  • 3236 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

#44 orange451

orange451

    GMC Member

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

bC14QqN.pngNrTFeil.png


#45 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

Known as MishMash on the internet, If only my username could be changed :D?

Posted Image

Working on Sharp Edge, a 3D Level designer which exports to GMMOD and textures, with a vast toolset, and fancy GUI. ( So far, software is only going to be distributed with my game, in the future, it will be up for public use and with the ability to customise the software using the Plugin System to suite your games needs.)
Also working on 3D Multiplayer FPS Global Anarchy Denied Operations.


#46 Phantom107

Phantom107

    Graphics Enthusiast

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

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!


#47 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

Known as MishMash on the internet, If only my username could be changed :D?

Posted Image

Working on Sharp Edge, a 3D Level designer which exports to GMMOD and textures, with a vast toolset, and fancy GUI. ( So far, software is only going to be distributed with my game, in the future, it will be up for public use and with the ability to customise the software using the Plugin System to suite your games needs.)
Also working on 3D Multiplayer FPS Global Anarchy Denied Operations.


#48 Phantom107

Phantom107

    Graphics Enthusiast

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

GMCSignature.png


The most advanced GM game yet. Check out the Titan Rush GMC topic here!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users