Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better candle and torchlight #168

Open
Mooses2k opened this issue Jun 26, 2022 · 9 comments
Open

Better candle and torchlight #168

Mooses2k opened this issue Jun 26, 2022 · 9 comments

Comments

@Mooses2k
Copy link
Owner

Mooses2k commented Jun 26, 2022

Related: #374

Stewie did some work on a basic wax and candle shader and a flame that always points up

Brightness of torch and how often sputters shows how burnt down it is. Can always drop if too dark and keep new one.

@Ayomideabdulazeez
Copy link
Contributor

So have implemented the torches and added some few logics to the candle to make it somewhat realistic, but we would be needing some few particles for the fires/flames and smoke for the torch and we will would be needing shaders implemented for the candle , which entails candle wax dropping from the side and other candle related behaviors .

Here's a video of a fire particle in Godot , that is similar to what we want , you can pretty well interact with me @ayo so we can talk more on this

Anyways here's the video:
https://www.youtube.com/watch?v=8ngg6ueC_ks&t=79s

@Mooses2k
Copy link
Owner Author

PR exists for this, I'll check

@Mooses2k
Copy link
Owner Author

basics done and tweaked. Someone other than Ayo needs to do the particles and flicker effects

@Mooses2k
Copy link
Owner Author

torch and lantern flicker added, but it's quite slow and not random yet. Just a basic one using AnimationPlayer.

@Mooses2k
Copy link
Owner Author

Mooses2k commented Nov 16, 2022

  • now have burning torches
  • and drippings from torch
  • candlelight changed to da8c38 as per Kendarr, later consider others
  • apply individual candle effects to each point on floor candelabra
  • better candle flame, maybe: https://www.youtube.com/watch?v=ldTahRhLHN4
  • hand candelabra(s) logic
  • all light sources should be shadowable once their light is turned off (test fix on candelabra and candlestick, that's the only one done so far)
  • all lights to flicker immediately when on at start instead of after using first time (autoplay on load button)
  • turn material emissivity off when candle off (broken)

All that's left is:

  • better candle flame then apply new effect to all candles

"Stewie: I think some shader approach combine static masks and scrolling noise would give a nice result
Since the candle flame is pretty small on screen, we can get pretty fancy with what the shader is doing, without much of a performance impact
even raymarching it might be an option
but just deforming a static version with some noise might be enough, honestly
Alek — Yesterday at 5:27 PM
shader with emissive properties"

https://timengelke.medium.com/create-a-candle-flame-in-ue4-material-niagara-9f0df29574c6

https://www.youtube.com/watch?v=uBb1F02peto

https://www.shadertoy.com/view/Xss3DH

https://www.shadertoy.com/view/XsjBRm

https://www.shadertoy.com/view/MsSBD1

@Mooses2k Mooses2k changed the title Better candle and torchlight Better candle and torchlight and put texture on dark lantern Nov 21, 2022
@Mooses2k Mooses2k changed the title Better candle and torchlight and put texture on dark lantern Better candle and torchlight Dec 15, 2022
@Mooses2k
Copy link
Owner Author

reverted candle to original stylized Stewie mesh and made not a demo blocker =/

@Mooses2k
Copy link
Owner Author

Have two people working on better candles, one mesh shader, one particle UV

@Mooses2k
Copy link
Owner Author

Mooses2k commented May 6, 2023

One person uncontactable. Other has completed the shader code. Here it is:
!candle flame shader (Alek).zip

@Mooses2k
Copy link
Owner Author

Mooses2k commented Jun 4, 2023

Done, but still issues and todos:

  • doesn't look great from above (maybe needs UV Distortion based on view angle Y, says Alek)
  • maybe related to above, candle flames should stand upright when candle held in hand (local_coords?)
  • some pixelation on the flame (maybe fixed with viewport adjustment?)
  • still need to also apply mesh_instance to it to put it in proper layer - light can go through wall right now
  • when trying to switch away from a candelabra in mainhand, crash in func stop_light_timer_2()
  • Brightness of torch and how often sputters shows how burnt down it is. Can always drop if too dark and keep new one.
  • play around with reverse cull face for lights, see what's better
  • Lights need to randomly flicker, not animation... lerp/Tween to random?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants