123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|693|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Sun with a Quad?

Sun, 18 Nov 2007, 22:24
Toaster
I am looking to do this effect:


From what I understand the way the guy did it is with a quad using additive blend. I've tried this but I dont get the same effect I was wondering if someone could help out?

So far I have this:


Thanks,
Toaster
Mon, 19 Nov 2007, 01:47
power mousey
well....I don't know.

But a few glimpses thru the code:

where is your Backbuffer and light?
your camera or Camera should be consistent of
just one...Camera or camera. First letter...


|edit| another thing I noticed while taking
a more thorough look at his code is the TurnEntity command with the Camera. Seems like x,y representations of mxs and mys are reversed. |edit|

Mon, 19 Nov 2007, 02:19
Jayenkai
Blitz doesn't care for capitalization. It's probably the lack of Backbuffer that's doing it.

-=-=-
''Load, Next List!''
Mon, 19 Nov 2007, 04:39
Toaster
hmm no doesn't matter if I add buffer = backbuffer() or if I add a light either..

Also the camera controls are fine. You have to put one negative so that you dont have an inverse camera look.

-Toaster
Mon, 19 Nov 2007, 12:42
Forklift_Fred
Looks alright to me, it probably depends on what the camera is looking at. I think you may need to add a texture to your quad though, to give it more of a graduated look and perhaps add a sun-flair somehow?

Mind you, you haven't given us your sun.png so we can't really see what you are seeing. I may be thinking along the wrong lines with the images I have tried it with

-=-=-
Come rain or shine...
Mon, 19 Nov 2007, 13:08
Toaster
Okay I worked somemore and got this:



Here's a screenshot:


I want to make it disperse more.. Look more like the picture here:


As you can see it doesn't look like a square..

Thanks,
Toaster
Mon, 19 Nov 2007, 14:35
Forklift_Fred
Like I said, you need a graduated texture. Something like this (a very rough and ready demo image). Play around with it and see what you can do



Apply it as a texture to the quad as in your first code. It's far from perfect but may be the direction to go.

-=-=-
Come rain or shine...
Mon, 19 Nov 2007, 14:45
JL235
First there are other effects going on in that image for the sun effect. However after a quick glance over your code, is this what your after? You will have to supply your own sun texture for it.


You might also want to have it slightly changing size so that it looks like it's not so static.
Mon, 19 Nov 2007, 16:21
Toaster
Thanks for the input its getting closer to looking good. Here's the direct link to the actually program that does the effect. I know its written in blitz3D and I know that the coder used a quad for the effect.
www.frecle.net/index.php?show=showcase§ion=jsl&sub=about

You can download the demo thingy from here roughly around 11 mb's:
www.frecle.net/download/jsl-preview.zip

Note I emailed the person who did this but they havent answered its to my knowledge that the author wont release the source code to anyone.

Thanks for all the help so far!
-Toaster

Mon, 19 Nov 2007, 23:24
mike_g
I think the best way to do this would be to make a greyscale bitmap similar to what fred did. Then load it into the textures alpha byte. The colour could then be applied procedurally.

IE: to make the light yellow fill the quad with rgb value FFFF00, retaining the original alpha.

To diminish or increase the glow just modify the alpha bits.

AFAIK Blitz3D does alpha blending for 3D via hardware. I posted a 2D colour blending function here, but that would be hideously slow in comparison.