campfire

this is my attempt to create a campfire, i think it is quite good, anyway any suggestion to improve the performance or better method to do it?
thx
here is the link to .blend file

no critics or suggestions? so i assume i have created the ultimate campfire… P

You are using too many lamps if you were to place multiple campfires. (or even actual lighting in the scene )

The shadows don’t shake as one would expect.

Smoke could be animated?

Not written in English?
Normally you only do that when you are programming with children.

there are 4 spot lamp and one point lamp added every time the flame plane is added, when one flame is deleted to be replaced by another one the point lamp ends too, so there are 5 lamp each frame (fire plane is added every 4 frames and ends after 2 frames so not properly each frame).
shadows seems to shake quite good to me, the problem is the light from the point lamp added with flame that lights the shadow from the spots light, but unfortunately point lamp doesnt have shadow.
if you can give me some suggestion to fix number of lamp and shadow, i will appreciate.
what do you mean with “Smoke could be animated?”
there are same property where you can change smoke, fire and particle size and velocity.
and really don’t understand this “Normally you only do that when you are programming with children”
the real problem i think is the animations of smoke and particles of fire, if i put for example 4 or 5 campifere the animation jumps to high %

there are 4 spot lamp and one point lamp added every time the flame plane is added, when one flame is deleted to be replaced by another one the point lamp ends too, so there are 5 lamp each frame (fire plane is added every 4 frames and ends after 2 frames so not properly each frame).

Way to much lights. adding/removing/ending lamps does not work. it will only set the energy to zero but the lamp still gets rendered.

Do you now that 8 lights are the limit for the whole scene/level/world? so having 5 for 1 campfire is overkill. 5 for 1 campfire is already overkill, one light source is more then enough.

what do you mean with “Smoke could be animated?”

my guess here is that he means like scrolling UV or a sprite.

really don’t understand this “Normally you only do that when you are programming with children”

it’s a strange thing but i guess he means the scripting language, normally if you share anything to the world you would like to keep it in English, so that everyone can read it.

Looking at your blend, it looks nice as a whole, but my opinion the fire goes to fast (didn’t try the properties yet)
What you can do is remove all lights and use 1, you can also use the halo/billboard setting so the flame/smoke planes are always facing the camera, this way you trick the player but still looks the same.

hum, 8 lights limit for all the scene??
how can i create 360° shadow with one lamp?
smoke are two planes with little different texture and size i have animated by simply scaling them with animation
you can decrease fire velocity changing the property named “vfiamma”
all the textured planes (fire, smoke and particle) already using billboard

http://puu.sh/qAdps/810b46840e.jpg

This could work as the campfire given a nice stone ring around it, wouldn’t also illuminate full 180 degrees.

By shaking i meant shaking.
Your shadows flicker by intensity but not by position.

Animated sprite for smoke was what I meant by that.
Don’t even need to use actual animations, do it in shader/python.

The only time someone used non English programming around my country was when it was a introductory for 10y olds.
Otherwise I feel that it is a common/good practice to program only in English.
Easier to write as you don’t have to reinvent words, easier to ask help etc.

i tried using a spot like in your screenshot, but seems doesnt work well because there isnt shadow on the floor so i decided to use 4 spot

In that case 2(my setup +flipped) is still better than 4.
And it should be easier to lod.

Do you now that 8 lights are the limit for the whole scene/level/world?
No, not true. I can get way more lamps in a level. It depends on your GPU.

I guess ya right; always test! :smiley:

You can get a sheet ton of point lights, true.


But for shadow spot lights it limits out for me at around 16.


(beyond that it starts t glitch out as maybe seen here already)

No, not true. I can get way more lamps in a level. It depends on your GPU

back in the day when you added more then 8 lights the it starts to turn off lights (adding 9th it will turn of the first).
these days you can add more, indeed. but what is the point, you share a game, that only you can play due to people got no in game lighting. Do not expect people to have a better setup that yours :wink: (most people have worse, i am sure of that).

And thats why i said 8 lights max, if you want more lights there is an easy solution, build a light manager that places lights at the closest light sources (or grab one from the resource section).

@Cotax
Yeah I remember hearing that back in the day. Up until last year, I didn’t have a PC that would support GLSL. So when I got my new gaming lappy, I tested.

@everyone

I have a game where I created a section of curved tunnel, with 3 point lamps, and one spot, and some fake lighting grouped. I linked it from another blend, then group instanced 20 sections to create a large round tunnel system. So thats 3 point lights X 20, and 20 spots during game play. I used thetimsters enemy thugs on his project FPS,(sorry Tim, I’m just testing) 6 of them at once before the FPS drops to 45, along with my First Person shooter, which kinda heavy also.
The game plays at 60 FPS, without a hitch. Spawning 2 enemies at a time. :slight_smile:
My Graphing are Nvidia GeForce GTX 965.

That said, I would still fake or bake lighting whereever I could. :slight_smile:

It all depends on what you want to achieve.

If the fire is the focus. Shaking shadows and multiple lamps can be fine. The effort is huge, but this is what you want to show. If the focus is the camp. One light with baked shadows and flickering insensitivity can be good enough as the focus is not on the fire, but the overall scene. The effort on the fire is much less allowing to spend it on other things (e.g. talking characters).