Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

PSM Unity - Issues I've found so far.

Discussion in 'PSM' started by SpookyFishGames, Apr 15, 2014.

  1. SpookyFishGames

    SpookyFishGames

    Joined:
    Jan 28, 2013
    Posts:
    27
    Finally received my PSM Publisher license from Sony, so spent the weekend porting 99 Waves to Die to Vita.

    Porting was fairly straightforward (I already had all joypad code etc. in place for the Windows/Ouya versions) and very little work was involved in getting it up and running on the Vita. Really loving how easy cross platform stuff is with Unity, it really is as close to 'code once' 'run anywhere' as I've seen :)

    I have, however, run into a couple of issues:

    1 - Screen.showCursor = false; isn't doing anything, so I've got a mouse cursor on screen at all times, and it even follows finger touches around, despite the fact that I've specified 'Touch=False' in Publishing Utility. Is this a bug, or do I need to use an alternative method to hide the cursor on PSM/Vita?

    2 - Random graphical glitches - I've had my game, so far, running on Windows, iOS, Android OUYA and they all use exactly the same settings/models/textures etc. and work fine. My game is not using any fancy graphical effects, just a few voxel models, and particle effects. On everything I've tried it on it works fine, but for some reason the same setup on the Vita doesn't work. Half of my particle effects are randomly not appearing, and the same goes for my models. The model is there, because I can crash into it and die, but it isn't being rendered.

    3 - Performance - Haven't got any FPS numbers, but the performance is visibly lower than on other platforms. Even the OUYA runs my game fine at 1080p, so the Vita shouldn't even be breaking sweat. As well as all the graphical glitches/missing models etc. I mentioned in point 2, I'm also getting severe frame rate dips. I know this is early release stuff, but I thought it (performance wise) would have at least been equivalent to Android/iOS.

    The biggest issue to me is number 2, I don't understand why the same settings that have worked on every single platform I've tried my game on so far, would be fine, but this Vita version doesn't. Really hard to debug it as well, because I'm using Unity Basic.

    I've seen a few other threads mentioning performance issues, but I haven't seen one that is having major graphical issues. Am I the only one seeing this?
     
  2. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    If i point the camera in a certain direction 'some' models disappear. Like the floor for instance, also have basic unity, there is a debugger around for the Vita, i believe its mentioned in a thread somewhere if that helps. ;)
     
  3. SpookyFishGames

    SpookyFishGames

    Joined:
    Jan 28, 2013
    Posts:
    27
    Thanks, I'm going to carry on having a play with it and see if I can workout what's going on. At first I thought it might be a 4.3.4 issue, I've been sticking to 4.2.x with my project, because when I first tried upgrading to 4.3 I was getting some weird bugs with it that I didn't have time to sort. However just tried a windows build, using 4.3.4 and that works fine (and the issues I'd had in 4.3.1 have gone to :) ), so I guess the issue I'm having is specific to this PSM build.

    I've fixed the cursor though. I was defining a custom cursor (crosshairs), and in the windows version I just turn it off (with Screen.Cursor=false) if you're using a joypad, but this didn't work on the Vita. But if I just remove the custom cursor from the build settings, then it doesn't appear on the Vita.
     
  4. GMM

    GMM

    Joined:
    Sep 24, 2012
    Posts:
    301
    I have no bothered with cursors in the projects i have made in Unity so far since they have all relied on either controller or touch controls, i do not know if this is possible, but can't you set the mouse cursor image at runtime to be null if run using PSM?
     
  5. SpookyFishGames

    SpookyFishGames

    Joined:
    Jan 28, 2013
    Posts:
    27
    Thanks for pointing me in the right direction. Just done some quick play testing on my Vita, and I think both the performance, and disappearing models/particles is something to do with camera(s). My game is a twin stick shooter, with a dynamic camera that follows the player round as they move. Just played a few games, and stayed in the starting position (so the camera was staying fixed), and had no problems either with disappearing objects, or framerate dips, everything that should be there was, and it was smooth as butter.

    As soon as I moved my position, thus causing the camera to move, framerate starts stuttering and things stopped appearing correctly, and this then continued until the scene was reloaded (i.e. a new game was started).

    I'm wondering if maybe it's an issue with the dynamic batching? It's one of the only parts of the scene I don't have control over, and Unity must (internally) use any cameras in the scene, to determine what it can/can't batch based on what's visible. Not sure where to look, or how to even test/prove that the issue might be in that area though.

    It may be possible to un-assign the custom cursor at runtime, but I haven't tried it. I keep all my projects in SVN, and create branches for each platform, just in-case they need anything specific (so I could avoid having things like the Google Play DRM, and OUYA stuff in all versions) so I've just created a PSM branch, and removed the custom cursor from that version.
     
  6. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    Haha happy to hear its not just me it is doing that too!
    Playing around with settings will be a huge trial and error and timely thing to do, it would be great if one of the Unity overlords could point us in the right direction?
    If not.. trial and error it is ;) I'l post anything i find about it, hope everyone else does the same :)
     
  7. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    $Screen Shot 2014-04-17 at 10.36.13.png $Screen Shot 2014-04-17 at 10.36.08.png
    Two images attached to suggest things to try and fix camera problem. I have unity free, but it still has an occlusion tick box, maybe turning that off will stop camera from making objects disappear?
    And someone mentioned the rendering paths might effect it, theres a couple of options here to try too.
    Same as before, post any fixes you guys come across, next time i build to vita i'l try these two things i mentioned and will post any results i find. 8)
     
  8. Astfgl

    Astfgl

    Joined:
    Jan 19, 2014
    Posts:
    86
    The only real issue I've seen so far is that collisions between CapsuleColliders and CharacterControllers are not always detected, causing objects to pass through or slide past each other. It doesn't do that on any other platform I've tested. I'll try to make a repro case for Unity sometime soon, it could be a simple bug in the preview release.

    Other than that my project works remarkably well on the Vita. All the shaders and effects work, the controls work, and performance is better than I had expected. In my case my project runs much better on the Vita than it does on my 2012 Nexus 7.
     
  9. xxPillsxx

    xxPillsxx

    Joined:
    Oct 10, 2012
    Posts:
    31
    I tried that, but it doesn't fix anything, it seems like our problem is the camera's near clipping is bugged, which causes objects to become unrendered at a farther distance than expected. Details here
     
  10. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Please make sure to report these bugs (with some kind of repro project, pretty please ;) - in the editor : just select the Help menu -> Report a Bug, and attach the project.

    Thanks!
     
  11. xxPillsxx

    xxPillsxx

    Joined:
    Oct 10, 2012
    Posts:
    31
    I made a bug report and it's been 3 days and still no reply from them... and as I checked the issuetracker site I saw that there has been no bug reproduced since 17th April?
     
  12. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Oh, sry about that - sounds like there must've been a glitch in the error reporter. Shouldn't take that long to get it processed.
    Regarding the Issuetracker - IIRC reported bugs are not automatically propagated there. I think the bugs in the issuetracker have been vetted before pushed publicly. Also, there is no PSM category there (yet ;)).
     
  13. xxPillsxx

    xxPillsxx

    Joined:
    Oct 10, 2012
    Posts:
    31
    Can you check out the case? It's the camera problem, same thing as jesusluvsyooh and SpookyFishGames are getting, but it's major, it makes the game almost unplayable from all the things disappearing and stuff. I attached a very simple yet clear example, and detailed description (don't mind the second reply, I forgot to remove all those messy things), and a screenshot too. We all will appreciate if you can fix it in the next update. Case 603486
     
  14. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    The problem seems to be that a primitive large enough to fall outside the guard band is rejected completely (instead of being clipped) - it's not the near clip plane that is the problem (triangles cut against the near plane as expected). The guard band is basically an "off-screen" (imaginary) screen space area 'outside' your normal (visible) screen.

    Workaround for the time being is to sub-divide large primitives that end up that close to the camera (if you for example replace the box with a plane you see the problem goes away).

    We're looking into it..
     
  15. xxPillsxx

    xxPillsxx

    Joined:
    Oct 10, 2012
    Posts:
    31
    Thanks for the information, I'll try the workaround for now, good luck fixing it, and fast for the next update.
    EDIT: Nope, doesn't work (well), I tried to replace cube with plane and the problem is still there, only it's less frequently disappearing now, but still disappears unsupposedly, and it's even jiggy $2014-04-24-201328.jpg
     
    Last edited: Apr 24, 2014
  16. SpookyFishGames

    SpookyFishGames

    Joined:
    Jan 28, 2013
    Posts:
    27
    the issue that I'm having can't be being caused by 'large' primitives. All the objects in my scene are very small, and don't need to get anywhere near going out of screen space before they start disappearing.

    I've been a bit busy the last week or so, but hopefully this week I'll be able to get an example project done to demonstrate the issue.
     
  17. MDaveUK

    MDaveUK

    Joined:
    Apr 27, 2014
    Posts:
    14
    That sounds just like the PS1, PS2 and PSP! :) That darn pesky guard band! I thought we seen the last of that :)
     
  18. AlexGK

    AlexGK

    Joined:
    Jul 31, 2013
    Posts:
    38
    I seem to have a similar issue. Part of some models (close to the border of the viewport) disappear suddenly.

    Link to image: https://www.dropbox.com/s/1iqnilzkp73rq1c/WP_20140427_001.jpg



    Now we're into it: Skybox Cubed shader, for some reason, it's completely broken.
     
    Last edited: Apr 28, 2014
  19. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Please report a bug on that (Help menu > Report a Bug), and attach a repro project (if you have one) - Thanks!
     
  20. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Definitely sounds like a bug. I've made a note of it - maybe I'll have time to look at it before the next release.

    Sounds similar to the 'camera near clip/cull' bug reported by others. We have this one fixed now, so hopefully this won't be a problem in the next version of Unity-for-PSM. If you think it could be something else then just file a bug on that (and attach some kind of repro project).

    If possible, I'd love to have a look at that more in-depth. If you can share the project with us, please just report it as a bug (Help menu -> "Report a Bug") and attach the project that has the performance problem.

    Thanks!
     
  21. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    Excellent! My particles were doing the same, along with 'some' floors, great to hear it's been not only looked into, but fixed too!
    I'm overwhelmed by the, information, speed and fixes you guys are doing, especially you eriQue. :D
     
  22. MDaveUK

    MDaveUK

    Joined:
    Apr 27, 2014
    Posts:
    14
    Performance is very very good for my project, as long as I turn off VSYNC and Hard/Soft Shadows. On other platforms these don't cause as much a hit to performance. I think the shadows seem to be extremely limited by memory too, as in, they aren't getting enough. But I assume thats being worked on to get it to parity to other platforms. Nice work Unity and Sony! Keep it up :)
     
  23. Cryogen

    Cryogen

    Joined:
    Sep 5, 2013
    Posts:
    5
    Performance seems okay, except for load times (which are really long), on Ipad2 load times are about 20 seconds, on Unity/PSM they're 2 minutes+.

    Is anyone else having severe memory constraint problems? SystemInfo.systemMemorySize is reported only 140 megs available.

    Similarly the first line from the console that shows memory says this:
    [22.079038] 0: fps 0.87 ms/f 1154.05 [kernel avail main 156MB, cdram 0MB, phycont 26MB]

    Whereas I notice in the presentation on Unity/PSM, they show a console trace that reports 400+ megs available.
     
  24. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    I don't know how you guys are getting all these performance issues, my projects straight from Android and iOS are getting 100 fps + on some maps.
    It's Multiplayer ! 20,000 polys, 60+ draw calls (according to unity editor stats) from the players camera.
    And with a direction light, and hard shadows.

    Example of game, screenshot not from vita, but just to give you an example
    $1185669_642880742396748_252650708_n.jpg
     
  25. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    591
    i notice something really strange i m building a level about 85 000 polygone i got about 177 drawcalls it runs really good between 30 and 67 frame per second but everytime i add a directional light into my scene the draw calls jumps from 177 to 800 is that normal or is that a bug ? is there any solution to make a custom directional light ?
     
  26. Nevak

    Nevak

    Joined:
    Sep 27, 2012
    Posts:
    20
    Anyone tried mecanim already?

    My framerate goes down to 20 and less as soon as I have 4 characters using an Animator D:
     
  27. youarebritish2

    youarebritish2

    Joined:
    Nov 7, 2013
    Posts:
    29
    I'm also noticing lower-than-expected framerates on Vita. I hadn't thought about Mecanim being a contributor, though, so I'll see how it looks without, as I'm using 3-4 characters with Animators.
     
  28. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    591
    i have a scene with more then 10 character with mecanim and i got 36 frames but sometimes its freeze its just happen one or two times i m trying to get more then 36 frames but never succeed was aiming for 60 frames
     
  29. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    It's hard to say without looking at the actual set up in your project. But it does sound a bit strange.

    Any chance you can report it as a bug and attach your project to the case?
     
  30. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Do you see this massive load time even when you load the title for the second time? It does sound like the engine is compiling shaders, but these should be cached and subsequent runs will use the cached data (and thus load much faster).
    You can use PsmDeviceForUnity.exe to inspect the console output.

    If the difference persists it might be an indication of something else. Maybe the console output contains hints about this.
    In any case - you are welcome to submit a "bug" on this, and attach your project, and we will have an in-depth look at your problem.
     
  31. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    591
    @erique : okay i will send the file via report bug but is there any solution for custom direct lighting system or something similar even static light doesn t show up no matter what type of shader i m using
    here are some screen directly from the vita in the editor everything works great but on the vita nothing really works correctly with the light
    $2014-05-06-010331.jpg $2014-05-06-003054.jpg
     
  32. youarebritish2

    youarebritish2

    Joined:
    Nov 7, 2013
    Posts:
    29
    Is there anything we can do to diagnose massive load times associated with custom shaders? Including the Lux shaders caused it to sit loading for more than eight hours without writing anything to console output.
     
  33. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    8hrs is definitely not expected - it most probably crashed/hung.
    Regarding diagnosing:
    The device console will be filled with entries like
    when the runtime is compiling shaders (when running in 'development build' mode).
     
  34. PeterD

    PeterD

    Joined:
    Feb 6, 2013
    Posts:
    120
    This is something I warned about a while ago. Shaders that don't work will tend to simply spam errors to the logs and slow everything down.