Jump to content

Making a realistic living fire lightning effect


chicolitto
 Share

Recommended Posts

Hello all,

 

I started the developpement of my game and I thinking about my torches.

 

I've a particles emitter for my fire and a point light on it... great but a bit dead for a fire light.

 

 

Can someone tell me how to do realistic living fire lightning effect ?

 

 

Should I code a script to randomly change the brightness of the light ? or is there a more performance-friend solution ?

 

 

Thanks a lot

 

 

Lionel

Link to comment
Share on other sites

Here is the script I attach to the lights to flicker. Just copied it from the old LE 2 firepit.

 

function Script:Start()
self.color = self.entity:GetColor()
self.fluctuation = 1.0
self.smoothedFluctuation = 1.0
end

function Script:Draw()
self.fluctuation = self.fluctuation + Math:Random(-100, 100) / 500.0 * Time:GetSpeed()
self.fluctuation = Math:Min(1.8, self.fluctuation)
self.fluctuation = Math:Max(0.75, self.fluctuation)
self.smoothedFluctuation = Math:Curve(self.fluctuation, self.smoothedFluctuation, 5.0 / Time:GetSpeed())

self.entity:SetColor(1.0 * self.smoothedFluctuation, 0.6 * self.smoothedFluctuation, 0.25 * self.smoothedFluctuation, 1)
end

Link to comment
Share on other sites

I made a fire and then attached a light to it and used the script that makes the light randomly flicker. Looks awesome but then again I cant script so. . . . . Thats how I do it!

 

Here are my prefabs that might work for you. If not, then maybe some one else can use them. Free for all. Not that its some great ting here but I believe in helping and sharing when and where I can!

 

https://www.dropbox.com/sh/7a7klomo75wprx0/AAADdm6BIDJ9b3HOr48p224xa?dl=0

Asus sabertooth 990FX, AMD FX 9590 , Windows 7 Home Premium 64 Bit, 4 HDD's Western Digital Caviar Black set in Raid 0, 16 GB Crucial Ballistix Elite, Asus Radeon R9 270 X 4GB, Corsair CM750M,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...