LensFlareSceneNode

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
koller202
Posts: 143
Joined: Tue May 08, 2007 4:53 am
Location: Thailand

Post by koller202 »

thank you gammaray

i see this

Image

it wrong ?

Code: Select all

	ab = new CLensFlareSceneNode(smgr->getRootSceneNode(),smgr,666,core::vector3df(0,0,0));
//	ab->setMaterialTexture(0, driver->getTexture("flares.jpg")); 
	ab->getMaterial(1).Textures[0] = driver->getTexture("flares.jpg");
________
Bmw e9 history
Last edited by koller202 on Thu Feb 17, 2011 1:16 am, edited 1 time in total.
gammaray
Posts: 23
Joined: Wed Jun 28, 2006 9:38 pm

Post by gammaray »

Try to disable automatic culling on the node
koller202
Posts: 143
Joined: Tue May 08, 2007 4:53 am
Location: Thailand

Post by koller202 »

sorry gammaray it same problem

Code: Select all

  AutomaticCullingState = EAC_OFF  ;
________
Website host
Last edited by koller202 on Thu Feb 17, 2011 1:16 am, edited 1 time in total.
gammaray
Posts: 23
Joined: Wed Jun 28, 2006 9:38 pm

Post by gammaray »

What driver are you using? I've tested the node with OpenGL, maybe that's the issue

Image

This is how it looks on my rig
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Wow what is that other effect? It's like some sort of motion blur.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
gammaray
Posts: 23
Joined: Wed Jun 28, 2006 9:38 pm

Post by gammaray »

It's TGM's radial blur shader:) Plus some bloom. The radial blur works perfectly for 'high velocity movement' effect. I'll post more screenies after I implement a bit more features.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

Cool. How's the performance?
gammaray
Posts: 23
Joined: Wed Jun 28, 2006 9:38 pm

Post by gammaray »

This is going 'slightly' off topic:) With bloom and radial blur post-processing I get around 160-180 FPS (Gainward GF7600GS GoldenSample)
G3LO
Posts: 16
Joined: Mon Aug 20, 2007 10:37 am
Location: Poland

Post by G3LO »

I had problem just like koller202 (1.3.1 SkinnedMesh)
I think there is error inside CLensFlareSceneNode.cpp.
It is written:

Code: Select all

int nframes = material.Textures[0]->getOriginalSize().Width / material.Textures[0]->getOriginalSize().Height;
printf ("%d", nframes) // prints 8
when i change to

Code: Select all

int nframes = 5;
it is ok, but it`s specific for texture provided with source.
Anyway, shouldn`t this value be evaluated just once - not once per render wasting processor time?
h4ck d4 5y5t3m
gammaray
Posts: 23
Joined: Wed Jun 28, 2006 9:38 pm

Post by gammaray »

To get some things clear: I didn't create the algorithm used in this node (as stated earlier, I've found the source on the forum), it's merely a rewrite in order to get this working with irr1.3.1. I didn't change 'the vital parts' of the code, simply because I hadn't any problems with it (tested on a couple of systems without errors).

As for the texture problems: the node seems to be working fine with a specific texture pattern. For example if you want a flare with 5 elements, you'd need a texture with all the elements for it. Now given an element size of 128x128 pixels, the texture would have the size of (5*128)X128 pixels. The algorithm used here simply cuts the bigger tex into smaller parts based on the original height of the texture, that's all.

Oh before I forget: I remember seeing a similar lens flare node code on the forum, but that one used a texture array instead of a single tex.

Hope this helps:)

EDIT: You guys using intel videocards? I ran the code on an laptop with an integrated intel GPU and there seem to be problems with textures - the card seems not to render textures bigger than 1024x1024 properly with irrlicht + opengl.

P.S.: @G3LO - a tak w ogóle to pozdrawiam:)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The texture size limitation is vendor driver specific (or even a hardware limitation), so it's basically just to be recognized by Irrlicht somehow. I'd have thought that the texture is not loaded at all.
Using a texture array is not as good as a larger texture, from the performance aspects, but of course it would be better in case of problems with the old code :wink:
koller202
Posts: 143
Joined: Tue May 08, 2007 4:53 am
Location: Thailand

Post by koller202 »

thank you everyone it very cool !
________
Marijuana Test
Last edited by koller202 on Thu Feb 17, 2011 1:16 am, edited 1 time in total.
torleif
Posts: 188
Joined: Mon Jun 30, 2008 4:53 am

Post by torleif »

I fixed camera flare for irrlicht 1.4.1 and added some comments and a small read me.


You can download the camera flare for irrlicht here (ZIP, 16.0 KB)

Update: now includes more comments and a function that makes it easy to align with skyboxes!
detvog
Posts: 19
Joined: Sun Mar 02, 2008 8:49 am

Hello.

Post by detvog »

Hi, iam new in irrlicht.
Can anyone help me to make this files as a part of irrlicht.dll ?

How must i do do bind this files in the dll source.




sorry for my bad english. :cry:
Post Reply