God Rays - Light Rays and other effects with irrlicht?
God Rays - Light Rays and other effects with irrlicht?
Well currently i use a particle system for the tail of a rocket propulsion, and i must say it is somehow ok aslong as it stands still, but as soon as it moves, turns it starts to flicker.
what i am basicly searching for are some God -Ray like effect for this and also later on also for some other parts of my project.
if you may want to have a look at this video of a game named copperhead http://www.youtube.com/watch?v=ueN1Z4Dq ... re=related
and watch the propulsions, ot looks like a straight tail, like a kind of a god ray.
here is annother video that shows such god rays
http://www.youtube.com/watch?v=Iy0hHsC1 ... re=related
(made with ogre)
from the last video i found a nearby similar looking example with sourcecode, why does Ogre has many similar classes and structure like Irllicht?
Anyway, i asked myself if there are some Irrlicht specific sourcecodes for uses like this, some other lightning effects that might be interresting too, some book especcialy about that?
any kind of help would be realy nice.
what i am basicly searching for are some God -Ray like effect for this and also later on also for some other parts of my project.
if you may want to have a look at this video of a game named copperhead http://www.youtube.com/watch?v=ueN1Z4Dq ... re=related
and watch the propulsions, ot looks like a straight tail, like a kind of a god ray.
here is annother video that shows such god rays
http://www.youtube.com/watch?v=Iy0hHsC1 ... re=related
(made with ogre)
from the last video i found a nearby similar looking example with sourcecode, why does Ogre has many similar classes and structure like Irllicht?
Anyway, i asked myself if there are some Irrlicht specific sourcecodes for uses like this, some other lightning effects that might be interresting too, some book especcialy about that?
any kind of help would be realy nice.
It's called volumetric Lighting and there are a many resources out there.
Two ways off the top of my head to approach this: I'd just use a shadow bake on the shadow layer of a level and use meshes to make the "god rays". Or a pixel/vertex shader.
There's no inbuilt shader for this, and irrlicht only has a few inbuilt shaders.
Two ways off the top of my head to approach this: I'd just use a shadow bake on the shadow layer of a level and use meshes to make the "god rays". Or a pixel/vertex shader.
There's no inbuilt shader for this, and irrlicht only has a few inbuilt shaders.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Irrlicht does have a volumetric light scene node. The documentation is here:
http://irrlicht.sourceforge.net/docu/cl ... _node.html there should be a sample on how to use it in the special FX tutorial.
http://irrlicht.sourceforge.net/docu/cl ... _node.html there should be a sample on how to use it in the special FX tutorial.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
yes i found it in api...
My first steps:
As you can see i need to play arround a little bit, i dident worked with irrlicht for a few month, so my own project is a little bit strange to me aswell as irrlicht code/api itself.
The code above is not realy satisfing yet i can´t see diferences with Material texture and surely i should read a little bit more.
In my current project i also use a modified billboard (aka CBeamNode) that would maybe also an option.
I will try both with animated texture (after i found out how it works for the volumetricLightNode).
One more question, i also found thisone:
But it doesent show up anything, google even did not found an example...
is there something wrong with the code?
Thanks for pointing in the right direction.
My first steps:
Code: Select all
//!Test VolueLightNode
scene::IVolumeLightSceneNode* vlight = smgr->addVolumeLightSceneNode (0,
-1,
32,
32,
video::SColor(51, 0, 230, 180),
video::SColor(0, 0, 0, 0),
core::vector3df(0, 5, 0),
core::vector3df(0, 0, 0),
core::vector3df(0.5f, 10.0f, 0.5f)
);
vlight->setMaterialFlag(video::EMF_LIGHTING, false);
//vlight->setScale(core::vector3df(-1,-1,-1));
vlight->setMaterialTexture( 0, txturevolume );
//vlight->setMaterialFlag(EMF_LIGHTING, false);
//!vlight->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
//!vlight->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
//!vlight->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
vlight->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
vlight->setMaterialFlag(EMF_BACK_FACE_CULLING, false);
vlight->setMaterialFlag(EMF_FRONT_FACE_CULLING, false);
//vlight->setPosition(core::vector3df(0.628f,0.965f,2.4f));
//! end volumetric light
The code above is not realy satisfing yet i can´t see diferences with Material texture and surely i should read a little bit more.
In my current project i also use a modified billboard (aka CBeamNode) that would maybe also an option.
I will try both with animated texture (after i found out how it works for the volumetricLightNode).
One more question, i also found thisone:
Code: Select all
//!test VolumeLightMesh
scene::IAnimatedMesh* vlightm = smgr->addVolumeLightMesh ( "../../media/apotext3.obj",
32,
32,
video::SColor(51, 0, 230, 180),
video::SColor(0, 0, 0, 0)
);
is there something wrong with the code?
Thanks for pointing in the right direction.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Yeah, you just added a volume light mesh in the last one. You need to add a scene node using that mesh.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
you talk about this : http://www.youtube.com/watch?v=W84gFvTVRb4 example 7 ?hybrid wrote:Check example 7 for an example how the volume light can look like (in case it's used as a light)
btw. it compiles for me but the sreen stays black, i need to check that but wanted to ask you if you realy mean this because in the video i dont seethe light you mean.
@3DModelerMan well i need to play arrount a little bit more, especially with animated texture, in the current version its just a lightbeam.
i´ll be back with better results i hope.
EDIT: i did not find yet if there is a way to use a sexture along the tail just at the "bottom" of the head... wether i will rewrite some classes or combine it with a plane or a üarticle system.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Sorry, I meant example 8. The video you find at the same location you linked to is old, though. There's not yet the volume light. But you can see an image here: http://irrlicht.sourceforge.net/docu/example008.html
ha, TIL3DModelerMan wrote:Irrlicht does have a volumetric light scene node. The documentation is here:
http://irrlicht.sourceforge.net/docu/cl ... _node.html there should be a sample on how to use it in the special FX tutorial.
well ok, there i see volumetric light.
The problem is still that it has no buildin options to have a animated texture along the tail axis so that there is just a not realy controllable texture that slowly fades out, for the desired rocket propulsion tail that would be real hard to use, i will still try to play arround with it a bit.
i walked through watching a few special fx from games wich i liked and realized that allmost every of those effects is made with billboards or modified billboards and textues partly made with after effects or similar, i will also have a look in this direction.
The problem is still that it has no buildin options to have a animated texture along the tail axis so that there is just a not realy controllable texture that slowly fades out, for the desired rocket propulsion tail that would be real hard to use, i will still try to play arround with it a bit.
i walked through watching a few special fx from games wich i liked and realized that allmost every of those effects is made with billboards or modified billboards and textues partly made with after effects or similar, i will also have a look in this direction.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
You can scroll the texture coordinates each update step with the material layer: SMaterialLayer TextureLayer [MATERIAL_MAX_TEXTURES] and then use the void irr::video::SMaterialLayer::setTextureMatrix ( const core::matrix4 & mat ) function to animate the texture.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar