2015年8月28日金曜日

Drone Space Defense Game Development(English)

Hello! Recently, the Drone Space Defense development team have been separated after the Sillicon Valley Demonstration, so now also I'm going to taking part in game development!
Drone Space Defense Monitor Version 2D Prototype
Realtime 3D Mapping from Drone Camera in Facebook HeadQuarters


A.R. Drone PS3 Teleoperation from Computer

Before, I made the Drone Space Defense Main prototype(game) ,realtime 3d mapping system using ROS, image tracking drones with OpenCV, websocket server coding with node.js,  drone ps3 teleoperation server setup, drone image streaming mjpeg server setup, drone simulator setup for the Drone Space Defense development.

  
Currently I'm developing game in Unity Game Engine. I start working on game development, and this is my 12th day of game development.
Unity Ball Game Tutorial

Unity Survival Game Tutorial
Built Unity Survival Game in Unity Web Player

1-5th day:  I did the 2 Video Unity Tutorial, and the Web Unity tutorial using C#.

               Also, I studied multithread programming and asynchronous programming in C#.
 
6th day : I started working on Oculus Rift. Unfortunately, I'm using Windows 10, and Oculus Rift didn't work on windows10 because of GPU version, so I had to downgrade the Operating System
.
Cool image Processing assets of Unity. Unfortunately the asset dll crashes with oculus dll so I couldn't do Oculus integration.
Image Processing(Canny Edge) with OpenCvSharp. It can use C++/C like programming style.
Working on WebCamTexture and Oculus Rift.

Prototype/Mockup of Drone Space Defense Oculus Rift Version.
7th day : I started working on VR game development. I searched some useful asset in Unity, gathering information in Unity, and finding some useful image processing tool in C# for 12 hours.
And in the last 12 hours, I made the prototype of the Drone Space Defense Oculus Rift Version. I had little time to sleep this day, because tomorrow night I am going to do a booth in Oculus Rift Festival in Japan.
Booth of Drone Space Defense at Unreal Engine Japan Oculus Festival 2015
8th day : In noon, I went to the G-tune& AMD Japan OcuFes 2015 Summer and enjoyed Virtural Reality Applications. In night, I did a booth in the Unreal Engine Japan Oculus Festival 2015 with my new prototype(oculus supported) and the 2d monitor version prototype of Drone Space Defense. 2 prototypes.

Leap Motion arrived!

Gaming Set(actually, drone is added to the full game set)
I think this is great VR application using Leap Motion! VR Planetarium
9th day : Leap Motion arrived. I did some setups of leap motion and playing with leap motion. I feel great potential of Drone Space Defense using leap motion.
UnityChan, Japanese Otaku City and Oculus Rift




10-12th day : I had a report in the Unreal Engine booth that my Oculus Rift Prototype will get motion sick . I searched what causes the motion sick of Oculus Rift, and it was the delay. Looks like Oculus Rift prefers more than 75 fps.Solving my prototype motion sickness was not so hard, because I have few objects in that protype. But I want to get the skill to solve this problem generally. This time I used Unity-chan animation character and ZENRIN japanese otaku city assets which both have enormous amount of polygon and meshes, texture. I checked the Unity reference to do optimization.
1. I did all checks in Unity Optimization Build Options. I got around 20 FPS.
2. I used bake lights, baked skyboxes, forward light rendering, 0 light pixeling. The FPS seems to be unchanged.
Working on Occulusion Culling of Japanese Otaku City

3. I tried to do Occulusion Culling of Japanese Otaku city, but it crushed of RAM error because it was too heavy to process. I stopped using Japanese Otaku city and used some other object groups.
4. I did Occulusion Culling, but the FPS didn't seem to be changed.
5. I set the target frame rate of Unity to 75 FPS. But this didn't work too.
Profiling my game performance.
6. I started using Unity Profiler and Unity Frame debugger. I found that more than 1000 drawcall are used. I searched about drawcalls and look more carefully of the Unity Profiler. Shadow was the biggest overhead.
Cutting 600 drawcalls by using baked lightmaps.
7. I found that lightmap setting was auto and I changed to manual mode and bake it. I could cut 600 drawcalls.
Mesh skin baking unityChan, pocket query chan, and terrain. Their overall drawcall is below 10.
8. Next time the character object skin rendering was the biggest drawcall(about 400) and overhead. I used mesh baker unity asset to combine meshes and textures and made their overall draw call below 10.
Great FPS.
9. This time CPU FPS was way bigger than 75 FPS and GPU is over than 50 FPS. The display GPU synchronization  is the overhead of the profiler so this overhead doesn't happen in real problem.  Now the biggest overhead is opaque rendering(10ms) and the main problem is oculus screen blurring getting motion sick. This problem can be solved using tracking camera of oculus.
Why baked Japanese Otaku city is taking drawcalls?
10. I solved this scene optimization and changed the terrain asset to Gigantic Mesh Japanese Otaku City and did a baking. This time I succeed in Occulusion Culling. The FPS was below 30. I searched by frame debugging and unity wasn't doing static batching because the number of vertices was too big. It seems this problem can be solved by larger core GPU(my GPU is NVIDIA 940M for laptop and the CUDA Core number is 384) by larger batch processing or downsampling polygons. And about the down sampling, I have to use external 3d modeling software. So I started learning 3d graphics now.
unity working on nexus 5 lolipop.
Also I started working on getting android sensor information with unity.

Check out for my latest updates in Drone Space Defense FB Page !

0 件のコメント: