Creating a sun or just something that glows

Blitz3D Forums/Blitz3D Programming/Creating a sun or just something that glows

PowerPC603(Posted 2003) [#1]
Hi all,

I just wondered, how can you make some sphere to actually glow, like a likebulb or the sun?
I saw this in GTA (some lights that were hanging at the side of a stripbar).

I tried to create a sphere, with transparency at 0.15 and placing a pointlight in it, but it didn't work.

And there isn't a command, such as EntityGlow (or something like that).

Can you do such a thing, without using textures or brushes?

If this cannot be done without, how would you do it in a 3D modeling program (3DS Max for example)?

I would like to have some objects in my game that glow, but I don't know how to do it.

Can someone help me with this?


Perturbatio(Posted 2003) [#2]
Try full-bright with the EntityFX command, it won't make everything around it light up, but it is much brighter.


PowerPC603(Posted 2003) [#3]
I tried this too, but it gave me just a flat circle.

I need something, that when you drive at a highway and there an off-ramp somewhere, there are signs above the road that are lit (at night).

And there was also a pink glowing flamingo (I think) in GTA against the wall of a stripclub.

I searched my harddrive for an example, but I couldn't find anything relative.

Or when you're in a disco, there are some glowing lights in the form of letters (to indicate the toilet, the name of the disco outside, ...).

I hope that you now know what I mean.

Something that is lit brightly in the inside, but the light fades outwards.


Perturbatio(Posted 2003) [#4]
that would require a bit more work.

Perhaps having multiple copies of the entity, scale each larger, use entity alpha or an alpha'd texture.


maverick(Posted 2003) [#5]
Use a flat sprite with a PNG image with alpha of a glowing circle as the texture (photo impact is good for this) load the texture with flags 1+3 , this will give the glowing light effect i think your after


sswift(Posted 2003) [#6]
For the lights, that is called a "flare" and you need to make a sprite, and place it where the light is, but between it and the camera.

You can use entityorder to make it draw on top of the light, but then it will draw on top of everything else in the world.

So you'll want to use entityvisible and make sure other entities are set so that they block visiblity, and then you can hide the object when the entity is no longer "visible" even though it is really visible cause it's draw on top of everything else. It's "center" is no longer visible.


MSW(Posted 2003) [#7]
Look at the Castle demo in the Blitz 3D samples folder...it includes a little mario figure that can run around and such, pressing one of the CTRL keys makes him fire off a little fire ball thingy...this fireball is a sprite that is rendered useing the ADD blend mode (the source graphic for this sprite is in one of the folders)

Basicly how ADD works is instead of just coloring the rendered pixel with the particular texture color...it instead samples the background color and ADDs the texture color to it...if the texture color is full black (0,0,0) then the resulting color is the same (background color + 0 = background color...it just adds the texture color to the background color)...by playing around with not just the texture, but the entity alpha values too...you can use ADD for all sorts of effects from lens flare to smoke to magic spell casting effects


Ross C(Posted 2003) [#8]
Yeah, check out the EntityBlend mode command. I think if you use the third option, and use a sprite with your light, you can make it glow a bit more.

If you place a point light inside your light, the reason it's not lighting the lightbulb or whatever you using, is because it's lighting the inside, and not the outside :)


Not Available(Posted 2003) [#9]
Hi PowerPC603,

I've had no problems creating glowing entities such as neon signs and the like, I simply create the sign in Photoshop & use the glow filter to make a nice glowing sign on a black background - In the level I've previously designed I've placed a light of the same color approximately at the center of the sign & lightmapped (ie. glowing pink sign, pink light). I then map the sign texture onto a simple object (two triangles joined together - a billboard) with the background transparent. The net effect is a glowing sign which casts its light onto the environment, the effect is very convincing.

In summary its very easy to make flat signs and the like glow, however I've not attempted to make 3D objects glow. I've always wondered how the Farb Rauch demos (is that how you spell it - the guys behind the popular demo) have such amazing glow effects. To solve the problem, I would probably approach it in the same manner as above, except using an algorithym instead of photoshop to create the glow for the object.

ie. I've got a cup that I want glowing in my scene, branch to function that renders the cup to an image buffer (from the current camera angle), remove the cup & draw glowing edges, return and use a transparent billboard for the texture positioned appropriately. For objects that are lathed and upright, you would not need to re-call the routine as you rotated around the y axis, you would only need to re-call the routine when the geometry (not the scale) of the outline changes from your point of view. (I think checking whether you needed to recalc a glowmap would be the most difficult task). Now in saying all this - unfortunately Blitz3D doesn't have all the advanced locked buffer goodness of Blitz+, so you'd probably have to write the function as a c++ .dll for speed. Now here is where the gotcha is... apparently you can't (or nobody has worked out how to) access Blitz3D image buffers via dll. :(

The crazy thing is - I believe Blitz+ would have the power to create these glow-maps in real-time. (Based on my work with locked buffers in B+ the performance really is amazing).

Now I suppose I'm not the first to say this, but if Mark could only add the locked buffer functions of B+ to B3D then many great cool things would be possible...

-R

p.s. man... what a ramble of a post...


PowerPC603(Posted 2003) [#10]
I will try that, SirRicho.

Especially for the roadsigns, and some things against the walls.

The only problem right now is that I don't have Photoshop (or anything like it).
I only have the Windows Paint program (for now).

So I cannot test it right away.