- Home /
How can i increase FPS, Water4 Advanced Prefab
Hi Guys, So im try to set up an ocean type map and ive been using the water4 advanced prefab, generously given by unity. I have essentially tiled these prefabs so theres like 3x3 of them. Problem is on full screen it absolutly kills the frame rate down to about 40 fps, which is alright i suppose but i will be adding other things obviously; so is there anything i could try to help bring up the frame rate?
I have added fog, which does help, but not tremendously. Any other ideas would be great. thx
http://postimg.org/image/9ohpeh271/ (image of game)
Also any other approaches to making an ocean type map would be helpful.
Answer by Hexer · Jun 28, 2015 at 07:20 PM
I have thinking about rendering the ocean tiles on raycast. I have not tried this out yet. But this seems the proper way they do it.
What if you can make a raycast that behaves like a sphere, where everything inside that sphere is affected by the raycast. When it is affected it renders the tiles. If not disable the render.
This should also increase your framerate significantly.
I have found this interesting answer : http://answers.unity3d.com/questions/60702/raycast-to-all-directions.html
You can use Physics.OverlapSphere to get all the objects that are on the desired radius, than Transform.TransformPoint on the enemy position to get the direction vector.answered
May 04, 2011 at 01:37 AM by Henrique Vilela 348 ● 34 ● 30 ● 38
EDIT : I have realized you can also do this with just a sphere collider and some scripts using the OnTriggerEnter in combination with the .enabled()==false in the script and a slight edit in the Physics Matrix.
Answer by ByteVault · Jun 28, 2015 at 07:44 PM
keep your triangles, vertices and drawcalls as low as possible
Static Batching, use if the object will not move, rotate or scale in the game. You should choose static batching as it will require less power.
Reduce the far distance of the camera and add some fog, so the far plane cut isn't visible. Simplify your trees, lower the quality settings and LODs.
Disable shadows, bake light.
I would also suggest you look in to this asset/project: http://scrawkblog.com/2013/02/24/ocean-renderer-for-unity/
Might interest you.
(I do realise that you don't have much on the map as of right now, Graphics card?)
Cheers!
Your answer
![](https://koobas.hobune.stream/wayback/20220613201504im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Grass + lighting? 0 Answers
How to add strobe lights? 0 Answers
Should I use dual or single camera for fps game? 1 Answer
Night-vision/thermal possible? 5 Answers
FPS Tutorial Help 1 Answer