OpenGL Volumetric Lighting

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Because you have to recompile your application with the new headers. Due to class changes this would otherwise lead to inconsistent pointers, which will usually crash.
doqkhanh
Posts: 158
Joined: Sat Mar 01, 2008 3:14 am
Location: Tokyo, Japan
Contact:

Post by doqkhanh »

hybrid wrote:Because you have to recompile your application with the new headers. Due to class changes this would otherwise lead to inconsistent pointers, which will usually crash.
Wow, thank you very much.
doqkhanh
Posts: 158
Joined: Sat Mar 01, 2008 3:14 am
Location: Tokyo, Japan
Contact:

Post by doqkhanh »

hybrid wrote:Because you have to recompile your application with the new headers. Due to class changes this would otherwise lead to inconsistent pointers, which will usually crash.
:shock: To Hyprid, I don't understand what is happening. Everything seems alright, but there isn't any volume lighting effect in my Program which is running with DirectX9, whether or not with realtime shadows.

Texture loaded ok!
Application running ok with newest version from source control.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Did you check the necessary steps for a volumetric light? It's described in example 8.
doqkhanh
Posts: 158
Joined: Sat Mar 01, 2008 3:14 am
Location: Tokyo, Japan
Contact:

Post by doqkhanh »

hybrid wrote:Did you check the necessary steps for a volumetric light? It's described in example 8.
Hi Hybrid, I cannot see any "necessary steps" in example 8, just a notice about automatic shadow effect in top of example 8 page.

Is there any Hardware requirement for this effect?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Did you check the version in SVN (the code, not html)? This feature is only available in SVN. No hardware requirement besides a not too old version of OpenGL (in case you use OpenGL for rendering).
doqkhanh
Posts: 158
Joined: Sat Mar 01, 2008 3:14 am
Location: Tokyo, Japan
Contact:

Post by doqkhanh »

hybrid wrote:Did you check the version in SVN (the code, not html)? This feature is only available in SVN. No hardware requirement besides a not too old version of OpenGL (in case you use OpenGL for rendering).
Thank you so much Hybrid, I am missing interface file for VolumetricLighting code. The instruction in this topic missing that interface.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I don't exactly understand what you're saying, but here's the code from example 8

Code: Select all

        //volumetric lighting
        scene::ISceneNode * n = smgr->addVolumeLightSceneNode(NULL, -1,
                                                        32, //Sub Divid U
                                                        32, //Sub Divid V
                                                        video::SColor(0, 180, 180, 180), //foot colour
                                                        video::SColor(0, 0, 0, 0) //tail colour
                                                        );

        if (n) {
                n->setScale(core::vector3df(56.0f, 56.0f, 56.0f));
                n->setPosition(core::vector3df(-120,60,40));
                video::SMaterial& mat = n->getMaterial(0);
                mat.setTexture(0, smgr->getVideoDriver()->getTexture("../../media/lightFalloff.png"));
        }
doqkhanh
Posts: 158
Joined: Sat Mar 01, 2008 3:14 am
Location: Tokyo, Japan
Contact:

Post by doqkhanh »

Hi, my demo with DirectX 9 has a error with Volumetric Lighting.
Please check this topic:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=26611
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

nice you are our hero.:D
iZigoo
Posts: 53
Joined: Fri Feb 23, 2007 1:32 pm

Post by iZigoo »

Hey,

this is great ! I hope to see more soon.
Are there any news about this ?

Is there a new version ?

Cu iZigoo
-------------------------------------------------------
iZigoo - The open 3D internet

iZigoo Homepage
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

[old-news] It got into the SVN :wink: [/old-news]
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
tukaram
Posts: 17
Joined: Mon May 12, 2008 12:50 am

Post by tukaram »

Hi,
Can this volumetric lighting be made to a cone shape spotlight?
I am ending up with like a laser sword light if I extend its shape... :(

Thanks..
Post Reply