I really need advise on certain aspects of cascade and how to get the best performance with good looking effects
This is a little example of an effect i,m using as a place holder and as training:
Its a little explosion with a flash and some base dust/smoke.
I would like to know:
1- How could i make the starting frame within the dust (a 2x2 uv animated dust texture) random? I set the starting frame as 0 as i read on the documentation about Uvs that is supposed to make them random but they still all start in the same frame and look like clones. I would want to make them random and want to know why is setting the starting frame at 0 is not working?
2- the effect itself seems very light and it uses very small textures, but if you have it attached as an impact effect for a gun, and you shoot repeatedly making the effect show many times, it ends up lagging the hell out of my machine. If you take a look at the effect in the Shader Complexity View Mode, the squares go white and only the borders are dark red which as far as i know, the white means that something is very complex. Yet the material textures i,m using seem very simple, yet there seems to be something very complex about my dust material somehow, so i would really like to know what is causing the fps drop in this little effect and how can i optimize it so as to know for the future, i,m working in a big project and cant have laggy effects so need to know this well.
3- The effect has some dirt bits flying around as an emitter with collision. Yet in game, when i set this effect to be an effect displaying when my gun’s projectile hits surfaces, the collision wont work anymore and only work when i drag and drop the effect in the map :(. I dont know if you could reproduce my issue somehow and maybe help me to find whats wrong with my collision.
4- How could i build and add a volumetric normal texture for my dust material’s normals? So besides the volumetric directional lighting, it can maybe have a normal texture that can make it look more volumetric. I,m a beginner when it comes to normals for particle sprites so any good tutorial you can point up could help me lots. At the moment my only problem with the volumetric directional lighting within the translucency menu in the sprite’s material is that the shading shifts with the movement of the camera rather than with the position of the player. So if i am looking at a smoke column far away with volumetric directional lighting, its shading shifts when you are standing still and moving the camera left and right making it change completely in terms of light shading without moving the players position making shift from lighter to darker tones quickly if you move your camera quickly as well. Its complicated to describe but dont know if this that i,m seeking will be possible.
Thank you very much!
Hope it wasnt too much
Can some please assist me with this
I got deadlines in my project and just want to make sure i know what i causing the performance issues mainly and if i could have ways around this.
Sorry if i,m new into some areas of this engine or past versions, first time around with unreal engine.
Hope you could assist me, i can send more example effects that i would like to optimize.
Hey Bruno_G -
I am working on an example that hopefully will answer a few of your questions.
Sorry about the delay, here are some quick suggestions.
1> Set your SubUVMethod to Random, and use a uniformDistribution on your SubUV module. Set the first value in the distribution list to 0 and the second to 3 (0=1 in) This will randomly choose a frame of your subUV image.
2> Check the Material Intstruction Cost in the Material editor. You are most likely using a directional lit Material, it sounds like you may need to consider using a cheaper lighting method such as non-directional or fake lighting example in our tutorials…or you need to spawn fewer particles. You can also consider lowering the lifespan, or adding Near/Medium/Far LODs to control spawn rates based on the distance to the emitter (this determines fill rate/size of your sprites on screen) Another trick I use with impact FX for weapons is to give your dust details in the emitter a chance to spawn 1 or 0 so as you fire repeatedly into a surface you have a chance to spawn far fewer sprites.
3> There is a documented bug with CPU collision right now, we are working to address it. For small debris like dirt pebbles etc. etc. I would highly recommend you consider using a GPU emitter and the SceneDepthCollision module. GPU particles evaluate much faster, and the GPU collisions are far less expensive than the CPU collisions. As a rule of thumb I typically let less than 10 CPU particles collide in any given effect…
4> Creating normals for volumetrics is very tricky. I haven’t found what I would consider the best/most accurate method as of yet, but one approach I have experimented at great length is using the internal directional light in a Maya Fluid simulation to generate the separate R, G, B channels, and then composite it all together in Photoshop. I have found using CrazyBump or Xnormal creates results that look more like a bevel/emboss filter. I have also experimented with rendering out the fluid sim with a camera down one of the axis, and then using a gradient to control the color between white/black and using that as a height map in CrazyBump/XNormal.
Another suggestion would be to enable spherical normals on your sprites, that will improve the look and make the entire system appear more as a single volume. Look under the Normals section on the required module, my guess is your effect is currently set to camera facing, switch it to Spherical or Cylindrical. Make sure your entire effect fits within the bounds of your system.
Also, try tweaking your shadowDensity settings on the material…