More Unity3D to flash conversions
I recently downloaded the latest version of Unity 3D 3.5 demo – release candidate 1 to further test the flash export capabilities. I have to say I was impressed and it’s certainly a big step forward – long list of bugfixes and some new implemented features speaks for itself.
To test the flash conversion I made the 2 demos.
Click on the images to play demos.
First it’s just a very simple demo with high poly car model, plane , camera and one directional light. I wanted to see how the dynamic shadows would be rendered and whether the high poly model would cause any performance issues. It’s using standard fps controler and a mouse look for the camera. To get reasonable looking dynamic shadows shadow resolution had to be “Very high Resolution” and also Shadow distance in Quality settings had to be increased to 300. Otherwise shadow started to disappear if you moved even slightly away from the car with the camera.
- Model renders smoothly and fast enough (as expected if you have good GPU).
- Lens flare effect on the light now renders correctly
- There’s a banding effect on the shadowed area both on the floor texture or inside of the car
- Some materials were not correctly transferred from the max files
Car racing tutorial demo
NOTE : PLEASE DRIVE SLOWLY OTHERWISE SCENE WILL STOP RENDERING!
This was the conversion of a racing game tutorial . This is of course much more complex example and there were multiple issues with this conversion. Quite a lot of issues had to do with terrain object, which is currently not supported for flash platform build target. Removing Terrain, solved about a half of the compiler errors, but I had to remove also parts of code that referenced it, and with it also code that check the rendering and hiding the objects that don’t need to be rendered.
I think it’s a pity that Terrain object isn’t supported as it brings a lot of convenience to the environment creation. I think there already must be an algorithm to converted it to mesh and apply textures ? As GPU can only work with polygons ? Why not do that for flash conversion as well and have a settings to how much detail would terrain have?
Ok, so here are some cons and pros
- car runs pretty smoothly all the physics and lightning works quite nicely
- lens flare now works fine as well
- the same banding effect on the shadowed areas
- no car sound effects only when collision occurs
- for some reason if you speed up with the car it will stop rendering scene (ok this one might have to do with me disabling some parts of the script to get rid of compiler bugs : – ) )
- there’s a slight space between the shadow and an object casting that shadow (you can notice that on the wheels for example)
- Even without terrain the demo has 22 MB. Non development build.
Other than that, it’s pretty sweet and playable (apart from speedy non render bug).