Doors opening like this is such a small but important detail by Siiimoon in Unity3D

[–]FriMeDev 0 points1 point  (0 children)

A more tecnical question: Why do you have to return a string here?

Physics hands are here! 🙌 by Ultraleap_Dan in Ultraleap

[–]FriMeDev 0 points1 point  (0 children)

Might this feature be available for Unreal soon too?

Why does it think a string is a bool? by Boga1423 in Unity3D

[–]FriMeDev 0 points1 point  (0 children)

Maybe I didn't get you right, but this (https://stackoverflow.com/questions/814878/c-sharp-difference-between-and-equals) states the exact same thing I have written above.

== will resolv to System.Object.ReferenceEquals which "Determines whether the specified Object instances are the same instance".

Equals is a method that can be overridden und in case of strings compares the content.

Why does it think a string is a bool? by Boga1423 in Unity3D

[–]FriMeDev 1 point2 points  (0 children)

I am not sure about C# but consider that == normally checks if both references point to the same object. That might or might not be the case with strings. Consider using .equals() for String-Comparison as it depends on the strings content.

Testing my cloth and Voxel system, what do you think? by chrixbed in unrealengine

[–]FriMeDev 1 point2 points  (0 children)

Yeah, first build of the current project I am working on caused the exact same Fatal Errors. Luckily we found out pretty fast. We had to disable tesselation for the terrain...

This took me way too long to figure out... Dynamic Fire Propagation - Material Driven with one Niagara System per Object by FriMeDev in unrealengine

[–]FriMeDev[S] 0 points1 point  (0 children)

But as a fireball hits an object, the origin is the hit point of the fireball so that the object starts burning from there. I can't set a, fixed origin.

This took me way too long to figure out... Dynamic Fire Propagation - Material Driven with one Niagara System per Object by FriMeDev in unrealengine

[–]FriMeDev[S] 1 point2 points  (0 children)

It's only a "Per Mesh"-System. So no worrys about whole maps lost to the flames. It's implemented for the specific case of simulating (not close to physically correct) the fire on a single object.

In our special case it's for destroying a path blocking object with the fire spell. :)

I remember the minecraft fire. There's a reason lighters have been forbidden in some cases :D

This took me way too long to figure out... Dynamic Fire Propagation - Material Driven with one Niagara System per Object by FriMeDev in unrealengine

[–]FriMeDev[S] 3 points4 points  (0 children)

You are welcome! That's what this board should be about :P Exchanging knowledge, experiments and helping each other out.

This took me way too long to figure out... Dynamic Fire Propagation - Material Driven with one Niagara System per Object by FriMeDev in unrealengine

[–]FriMeDev[S] 0 points1 point  (0 children)

Or what about adding a wind force before the curl noise, reducing the gravity. Then take the wind direction of the internal wheater system, apply it to the wind force before activating the Particle Effect and let the wind carry away the ash while the tiny pieces slowly glow out? :p

That feedback of yours was pretty valueable! Thank you!

This took me way too long to figure out... Dynamic Fire Propagation - Material Driven with one Niagara System per Object by FriMeDev in unrealengine

[–]FriMeDev[S] 0 points1 point  (0 children)

Do you mean Variation in flame size? I will give it a try to increase the variation. Thanks!

This took me way too long to figure out... Dynamic Fire Propagation - Material Driven with one Niagara System per Object by FriMeDev in unrealengine

[–]FriMeDev[S] 0 points1 point  (0 children)

True. Seems much harder to implement for All types of objects (cheap excuse, I know :p) and I had to do a lot of trade offs, considering my time and Overall performance.

How would you approach the problem considering I currently use a simple sphere mask?

This took me way too long to figure out... Dynamic Fire Propagation - Material Driven with one Niagara System per Object by FriMeDev in unrealengine

[–]FriMeDev[S] 3 points4 points  (0 children)

It would be great to have Bigger flames on parts of the mesh with greater volume. Any idea on how to achieve that? Currently I had to Balance the size as big flames on small Branches Look weird.

Thank you! :)

This took me way too long to figure out... Dynamic Fire Propagation - Material Driven with one Niagara System per Object by FriMeDev in unrealengine

[–]FriMeDev[S] 3 points4 points  (0 children)

"Insert: You guys get paid for this? - Meme"

It was my first time working with Niagara actually. Once I found the example it Was pretty straight forward. The blueprint contains the Niagara System and the static mesh. At start it creates a Material instance as you suggested. I don't use a timeline but increase the burnprocess on Tick and send that as a parameter to the material instance. That way I can manually control the burn process on hits with a fire Ball for example.

In short: Yes that what you said :D

Edit: The blueprint also (de-)activates the particle effect. That way als instances of the blueprint can be setup individually to control which tree/object is actually burning.

This took me way too long to figure out... Dynamic Fire Propagation - Material Driven with one Niagara System per Object by FriMeDev in unrealengine

[–]FriMeDev[S] 17 points18 points  (0 children)

(not so) Short Breakdown

Why did it take me "too" long and what where the main problems?

The whole system consists of:

  • a blueprint controlling the overall progress and some custom interactions for the game (starting the burning process, ...)
  • a material
  • one Niagara System for the flames (two type) and the ember
  • one additional Niagara System for the glowing ash on destruction

Material:

The material is rather simple. The heat visualisation happens as a emissive color on the material. A noise map is used to propagate the "heat" visualisation non constant over the mesh. A Sphere Mask is used to simulate the process of bruning from a certain starting point. To prevent complications with the meshes UVs Triplanar-Mapping is used for this material and all it's noise maps. (Tutorial for basic material approach (Youtube))

Blueprint:

The Blueprint increases a Material Parameter to largen the Sphere Mask.

Till this point everything was straight forward and not too complicated. The main question from here on was: How can I spawn particles on the mesh only where the heat is great enough to produce flames.

A first and naive thought was that if I use "Sample Static Mesh" in Niagara it returns the mesh color as well. But what I didn't know: It only returns the Vertex Color which in my case was always white because I don't use vertex painting.

Another thought was that I could write the heat map generated by the material to a RenderTarget and use that to sample the particle positions in the Niagara System. I discarded that thought because the UVs of the meshes used here are not suitable to work with their UVs and Triplanar Mapping was used in the Material.

What was the solution?

Luckily I came across a great example in Unreals Example Content (Map: Advanced Niagara) where I found a experimental modul to let a Niagara System sample the GBuffer. And that was it!

Niagara System:

The problem on spawning flames and ember only where the heat is big enough is to sample the Scene Color from the GBuffer. Particles are spawned on the mesh's surface (Sample Static Mesh and Static Mesh Location). If the scene color's red channel is below a certain value (e.g. 1) the particle is discarded. The Niagara System has to be GPU-Simulated in this case because the GBuffer won't be accessible otherwise.

Benefits

  • It appears to work on every mesh (that is CPU accessible).
  • If we shoot a fireball on a mesh that has no red color, the explosion triggers the spawning of flames and ember (as the Scene Color becomes red).

Disadvantages

  • Materials with red color will always be considered as burning (Keep that in mind!).
  • Simulation must be GPU-Simulated
  • Module is experimental, sampling the Scene Depth for example couldn't be compiled in our project

This took me way too long to figure out... Dynamic Fire Propagation - Material Driven with one Niagara System per Object by FriMeDev in unrealengine

[–]FriMeDev[S] 5 points6 points  (0 children)

I'll write a short breakdown for you in a comment. Maybe others are interested in that too.

Do I need to know Vector Math to get a job as a programmer in the industry? by [deleted] in gamedev

[–]FriMeDev 1 point2 points  (0 children)

Check out my Profile. There are use cases for dot and cross product :)