105mm prime lensflare effect package

Posted By: HeelX

105mm prime lensflare effect package - 04/14/07 14:04

Hello guys,
hello girls,

I saw today on my todo-list for my private project the task "lens flare effect". Oh my god. Okay.. I searched the internet and did'nt really found any good graphics for that and the GS template artwork is really.. ugly. So I decided to make my own.

So, herewith I contribute a bunch of lensflare effect sprite that bases upon a real 105mm camera lens flare. Here is a preview picture:



If you would like to see it in "action" (sounds silly ..), watch this video

You can download the ZIP from here.

The ZIP file contains all 21 (!) lensflare sprites as DDS files, a pivot.txt and a license.txt. The pivot chart explains how the sprites are related to the sun. Estimate 0 as sun position and 1 as the lens flare which is in the opposite corner. The negative pivot values mean that the sprites are placed in the opposite direction (that are those sprites in the preview pic, that are placed in the upper left corner behind the sun).

The ZIP contains no code (since I wrote it in liteC, there wont be much use for the majority here), you have to use/make your own. If you don't know how to deal with the pivot values, read the GS template code. I did'nt used it, but as far as I know, the same "method" is used there. Though, I dont use view entities.

NOTICE: before you say "yay, I've got a cool lensflare effect now".. read the license.txt. It is free of charge and you are even allowed to use it commercially, but this is card-ware. So, please read the license.txt.

Cheers, enjoy and have a great day.
Christian
Posted By: chaotic_dragon

Re: 105mm prime lensflare effect package - 04/14/07 14:11

nice work ill be usin em in my game ok..

thanks, chris
Posted By: broozar

Re: 105mm prime lensflare effect package - 04/14/07 19:51

2 thoughts:
would be awesome if you could fade the sprites according to the camera angle, atm i keep my self asking where the flares've gone after they left the picture borders.
is the sunsprite included as well? your lensflares look a little too "round" and too "sharp". i remember the flares in ss2 for example,

http://www.3dchips.net/test/hard/grafik/truform/TI500SeriousSam2c.jpg
http://www.ixbt.com/video2/images/tech_ss2/ss2_flare_2.jpg

furthermore, i'd love to have more "sprites in sprites", atm it looks like they were aligned on an invisible wire. sorry for beefing your work, but to be honest, atm it's just one of many lensflares, not the top behrenberg quality i'm used to see
Posted By: HeelX

Re: 105mm prime lensflare effect package - 04/15/07 00:42

Thanks for your comment. Further effects programming is intended, but not yet (this will be adressed later with some other scheduled things) - I just wanted to have the basic behaviour in my framework.

The Serious Sam lensflare is exactly the way I did'nt wanted it to be: way too blurry (and did you noticed that the flare is beneath the gun model? ). Well, maybe I'll add some blur to some sprites.. but thats all. What did you meant with "sprites in sprites"? I dont get it.

And yes, the sun sprite is included in the image (the skybox contains a pre-baked sun as well, but it doesnt include anamorphic lightning which can only be achieved by non-rotating sprites.

BTW: I tried it with an uniform scale of 2 on all sprites, looks a bit better.. well.

Posted By: chaotic_dragon

Re: 105mm prime lensflare effect package - 04/15/07 01:03

looking great mate
Posted By: Germanunkol

Re: 105mm prime lensflare effect package - 04/15/07 08:53

I believe with "sprites in sprites" he meant that sprites should overlap more, because they don't in your first screen, but they do in your second one. Good job, I think this second shot is way better, I like it.
Posted By: broozar

Re: 105mm prime lensflare effect package - 04/15/07 11:12

yes, as germanunkol said, the "sprite in sprite" was meant to be "overlapping". 2nd shot is great! just as i wanted it to be. now, if they're fading according to the camera angle, it'd be perfect!
Posted By: xXxGuitar511

Re: 105mm prime lensflare effect package - 04/15/07 11:18

You have their screen-coordinates, just use those for fading depending on how close it is to the edge of the screen?

Or maybe camera angle might be better...
Posted By: frazzle

Re: 105mm prime lensflare effect package - 04/15/07 17:19

HeelX is the man
This looks quite nice indeed, nice photoshopping

Cheers

Frazzle
Posted By: HeelX

Re: 105mm prime lensflare effect package - 04/15/07 19:04

It isnt photoshopped, I dont own PS its A6 magic ^^
Posted By: rvL_eXile

Re: 105mm prime lensflare effect package - 04/15/07 19:55

Maybe Gimp? or its really Magic ... Tell me about this Magic i want the same results on my Games

cYa Sebastian
Posted By: HeelX

Re: 105mm prime lensflare effect package - 04/15/07 20:14

Gimp is crap when it comes to lensflares.

I used a original photo and made my own inward and outward faded circles. The sprite for the sun is a generated lensflare. The pivot data has been extracted by calculating the distance between the sun center and the very last flare compared to the length between the sun center and the flare that I calculate the pivot percentage for.
Posted By: TWO

Re: 105mm prime lensflare effect package - 04/15/07 20:15

I think frazzle meant your sunflare-makeing-process with photoshop.

Nice looking thing
Posted By: Grafton

Re: 105mm prime lensflare effect package - 04/16/07 16:03

Thanks HeelX! Are you using the sun flare script from the wiki in this pix?
Posted By: aztec

Re: 105mm prime lensflare effect package - 04/16/07 16:27

I also think that ley look realy cool
Posted By: HeelX

Re: 105mm prime lensflare effect package - 04/16/07 16:54

Quote:

Thanks HeelX! Are you using the sun flare script from the wiki in this pix?




No. As I said, I have written my own liteC code for this, basing on very custom made libs for my liteC framework. If you like to use the sprites, write it yourself or customize one of the template scripts. Since it uses up to 21 images, it could be exhausting to do that.. so, I advice you to practice coding by writing your own technique.
Posted By: Grafton

Re: 105mm prime lensflare effect package - 04/16/07 22:00

Quote:

If you like to use the sprites, write it yourself or customize one of the template scripts. Since it uses up to 21 images, it could be exhausting to do that.. so, I advice you to practice coding by writing your own technique.




I have long had my own and need no other, although my flare sprites are not
as nice as these! Thanks!

I was wondering only because I have not seen the wiki example in action. I use
only five flare sprites in mine, not including the sun, and I slightly
tint three of the sprites each a different color.

Thanks again!
Posted By: frazzle

Re: 105mm prime lensflare effect package - 04/17/07 18:58

Quote:

I think frazzle meant your sunflare-makeing-process with photoshop.





^^ Yes that was what I meant ^^
I know I expressed it abit "weird"

Cheers

Frazzle
Posted By: PHeMoX

Re: 105mm prime lensflare effect package - 04/17/07 23:36

Very nice, thanks HeelX.

I like the first picture a lot, it reminds me off those Snowboard trick-movie-lens flares, it would fit perfectly on a mountain with a lot of snow.

Cheers
Posted By: AlexDeloy

Re: 105mm prime lensflare effect package - 05/17/08 00:24

Sorry to dig out this thread but I can't get no sleep and just found these pretty lensflares in this old thread.

Thanks a lot HeelX
as soon as I find a really good postcard I'll send it smile

If anyone still needs some lite-C code for the lensflares take my quick & dirty, nightly hacked-in lines below:

Code:

// define 21 lensflares
// abused the pan value for the pivot value

ENTITY* lensflare_01 = {
	type = "lens_01.DDS";
	layer = 2;
	view = camera;
	pan = -0.139;
}

// lensflares 02 - 20 
// (...)

ENTITY* lensflare_21 = {
	type = "lens_21.DDS";
	layer = 2;
	view = camera;
	pan = 1;
}


// place a lensflare on the sun position and correct the position according to the pivot value

function lensPlace(ENTITY* lens) {
	VECTOR* temp = vector(0,0,0);
	vec_set(temp,sun_pos);

	if (vec_to_screen(temp,camera) != NULL) { // sun is visible 
		lens.flags2 |= VISIBLE;

		temp.x = temp.x + 2 * lens.pan * ((screen_size.x / 2) - temp.x);
		temp.y = temp.y + 2 * lens.pan * ((screen_size.y / 2) - temp.y);
		temp.z = 2000; // 2000 quants to depth
		vec_set(lens.x,temp);
		rel_for_screen(lens.x,camera); // lens flare to sun position
	} else { // sun not visible 
		lens.flags2 &= ~(VISIBLE);
	}
}

// at least start the action somewhere

function lensflare_starter() {
	
	// values for my test level

	sun_angle.pan = 193;
	sun_angle.tilt = 10;
	
	while(1) {
		lensPlace(lensflare_01);
		// lensflare 02 - 20
		// (...)
		lensPlace(lensflare_21);
		wait(1);
	}



Posted By: HeelX

Re: 105mm prime lensflare effect package - 05/17/08 08:07

Hi! Looks cool with that planet smile Though, I think, your panels are not centered, isnt it?
Posted By: AlexDeloy

Re: 105mm prime lensflare effect package - 05/17/08 08:59

*fixed* It was late yesterday... smile
Posted By: MMike

Re: 105mm prime lensflare effect package - 05/18/08 19:13

hum and if you had 200 suns? you would need 200 entities.. i think thats not the best way to do lens.

On my project i have an automate sistem that will create unlimited lens flares smooth like real Flare occusion and glow, and glare, and streak effect.
Posted By: Uhrwerk

Re: 105mm prime lensflare effect package - 05/20/08 15:28

Then share it. :P
Posted By: Hitsch

Re: 105mm prime lensflare effect package - 02/05/09 14:03

Can someone contribute a working lite-c script for a lens flare?
I'm trying to get this to work in a space scene but I had no luck so far.
Thx
Posted By: Xarthor

Re: 105mm prime lensflare effect package - 02/05/09 16:33

Maybe you could take a look at this post in this very thread:
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=123982#Post207002
Posted By: Hitsch

Re: 105mm prime lensflare effect package - 02/05/09 19:00

So I did. But there's no code in the file from the first post.

So as I said, I can't get it to work and I think others would appreciate it too, if there were a working, easy to use script.

The one from the template doesn't work for me either, and others have pointed that out already.
Posted By: Xarthor

Re: 105mm prime lensflare effect package - 02/05/09 20:41

@Hitsch: I meant the post #207002 by AlexDeloy.
Just click that link I posted, it will take you right to that post!
Posted By: Hitsch

Re: 105mm prime lensflare effect package - 02/06/09 16:08

Finally, it works. I've tried AlexDeloy's Code for a long time and it just didn't show any flares.

I have now found out that it doesn't work when ShadeC is activated at the same time. I guess it has something to do with the layers.

Thanks for the script and the flares!
Posted By: Nikozu86

Re: 105mm prime lensflare effect package - 02/17/09 13:04

German:
HILFE!!
Mit der A7.01 hatte ich keine Schwierigkeiten mit den Lensflare-scripts aus den Templates.
Aber seid ich auf a7.10 aufgerüstet habe werden die Lens Flares nicht mehr dargestellt...
Egal ob mit oder ohne Sky - cube -dome ect...
Was ist da passiert??

ENGLISH:
HELP!!
I didn`t have any troubles with the Lens Flares in the older a7.01 Version. But, since i updated to a7.10 (or higher) the LensFlares are gone, even with or without any sky- entities... what`s happen??

Cheers,
N.
Posted By: Blade280891

Re: 105mm prime lensflare effect package - 02/17/09 15:44

Try the newest update
Posted By: Nikozu86

Re: 105mm prime lensflare effect package - 02/17/09 19:43

Thanks, for the reply.

Which new Version??
I`ve got A7.66.4 right now.

The newest Engine-Version 7.7?

Or some script-version?
I don`t know anything obout some lensflare-scripts, only the one of the templates and even this dosn`t work. :-(
Posted By: Blade280891

Re: 105mm prime lensflare effect package - 02/17/09 19:45

The newest engine version, as you said you only had 7.10


Try recompiling the whole project and see if it works then.
Posted By: Nikozu86

Re: 105mm prime lensflare effect package - 02/18/09 18:18

i said "7.10 (or above)"

now i`ve got trouble to download the new A7.70 :-(
got still 7.66.4.

I recompiled it, the lensFlare.c (or the older .wdl) dosn`t work, i don`t see any lens flares.
I Tried it with the old A7.01 and there it works without problems!
Something musst be happened between the versions, maybe some function-names has been changed or something.
Posted By: Ch40zzC0d3r

Re: 105mm prime lensflare effect package - 11/21/11 05:58

Any chance to get another download for this?
Would be really great =)
Posted By: HeelX

Re: 105mm prime lensflare effect package - 11/21/11 09:33

I'll see if I find it somewhere here smile
Posted By: Ch40zzC0d3r

Re: 105mm prime lensflare effect package - 11/21/11 14:43

Thx laugh
© 2024 lite-C Forums