Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

3.2 error, can't use rendertexture

Discussion in 'Editor & General Support' started by arioch82, Feb 16, 2011.

  1. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    I've updated to 3.2.0 and I get this error if the scene contains a rendertexture

    Code (csharp):
    1.  
    2. screenviewcoord[1] < 0 || screenviewcoord[3] < 0
    3.  
    4. Assert in file: C:/BuildAgent/work/f724c1acfee760b6/Runtime/Camera/CameraUtil.cpp at line: 38
    5.  
    when i open a scene i get this error too

    Code (csharp):
    1. screenviewcoord[1] < 0 || screenviewcoord[3] < 0
    2. UnityEditor.DockArea:OnGUI()
    3.  
    4. Assert in file: C:/BuildAgent/work/f724c1acfee760b6/Editor/MonoGenerated/Editor/AssetDatabase.cs at line: 106
    5.  
    the problem is due to the render texture height it has to be set <=256, any value above it will produce the error (no problems with the width).

    several user are having this issue (please see http://forum.unity3d.com/threads/30545-screenviewcoord-1-lt-0-screenviewcoord-3-lt-0 ), for some of them the rendertexture works fine with height up to 512.

    Just create an empty scene, create a new render texture with height >=512 and assign it to the camera and the error will show up in the console (just once in the editor, spammed continuosly during play).

    I've reported this issue on that topic about a week ago and I haven't had a single official answer, hope things will change here.
     
    Last edited: Mar 8, 2011
  2. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    I saw this issue when game view/scene view is smaller then RenderTexture used
     
  3. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    uhm yeah that could be the problem, my web game has a 720x450 resolution and I'm using a 1024x1024 render texture.
    any way to fix this without resizing the game/rendertexture?

    this is really blocking me from doing new builds.
    it was working just fine with 3.1
     
  4. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    No it is related to window size itself (ot is it manifested in game too?)
    Anyway, if this is in game and is reproduced consistently - strip down your project to smallest size possible (though make sure that error is still here ;-)) and submit alongside bug report
    If it is in editor - try to make (game view/scene view) window larger itself
     
    Last edited: Feb 16, 2011
  5. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    I get it spammed continuosly (non-stop) in the console log when I hit play as my game window is 720x450, haven't checked an actual build log, does it make any difference? (it's a web game)

    I've tested it in an empty scene with a brand-new render texture without adding any other object, just setting that render texture as target for the camera and it gives the error. do I really need to do a new project with an empty scene and send it?

    and again, everything was just fine with 3.1 and previous version, never had this error, is something that appeared since my upgrade to 3.2
     
  6. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    try making it larger as a workaround
     
  7. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    I cannot make it larger, I work in a game company not on a personal/indie project and that's the resolution the game window has to be.

    since it was working on previous version should I expect a fix soon on this?
    Otherwise I think I'll have to revert on 3.1 if you can't suggest anything else

    I'm using the pro version, don't know if it makes any difference for the bug
     
  8. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    I'm talking about game view window in Editor - can you make *window* larger?
     
  9. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    ok I'm using a 1024x1024 render texture and yes if I make the game window in the editor larger (something less then 1024, shouldn't be >1024?) the error disappear but I don't understand if when I'll do the web build (720x450) the error will still be there or if it's only an editor bug.

    also I need to test the game at the build resolution, without considering that i cannot really work with a game window that takes the 80% of my screen; luckly I have a 1080p monitor and I can *temporary* resize it if it won't cause problem in the final build, but what about the ones using a screen resolution where the height is <1024? they cannot use large render texture? (e.g. can't work on this project on my macbook pro).

    why the problem is only on the height and not on the width too?
    and mainly, why it was working with all the pervious unity versions?
     
  10. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    ok i've tried doing a web build and luckly there's no error in the log so it's only an editor bug.

    I've already opened one last week but whit all those new infos should I open a new one or maybe is possible to edit the bug report in some way?
     
  11. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    yes, this is editor-only bug
    you can edit your bug - go by the link that was sent to you in the mail
     
  12. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    can't see any link/button to edit in the report

    the ticket is: 391367_lqgfuach it was basically a copy&paste from the other topic, if you can give me a link to edit it I'll do it
     
  13. unityrookie

    unityrookie

    Joined:
    Sep 24, 2009
    Posts:
    34
    Any official word on where this stands? I'm in the same position as arioch, I need the render texture 1024x1024 and am continuously getting this error, and would rather not adjust the game window. If it's just an editor error, I guess not that a big deal. But would be nice to know what the word is on this. It throws the non-programmers/artists on the team for a loop seeing this error continuously print out.
     
  14. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    Guys, come on
    Are seeing this in game build? No! Dammit, you will need to resize only game view window in Edtitor because not a single person have this error in built game
     
  15. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    alexey I understand that as a temporary fix we can resize the unity game window but it's not so nice to work with a window that takes most of the screen (with a 1024 on an full HD, height of 1280, it takes the 80% of it!) or anyway if you are working on a game (let's say web or mobile) with a fixed resolution you have to test it at that resolution you cannot just resize the window using the free aspect.
    and what about if you are using a 2048 render texture?

    we can't just use the console or any debug.log/warning/error as the error get spammed continuously on it.

    what I think unityrookie was asking is: since it's an editor only bug and it was working fine in 3.1 should we expect a fix/patch/whatever anytime soon?

    also i'm reading of a lot of other issue here in the support forum with the 3.2, do you have any roadmap for a 3.2.1 to fix issues like this?
     
    Last edited: Feb 23, 2011
  16. unityrookie

    unityrookie

    Joined:
    Sep 24, 2009
    Posts:
    34
    thank you arioch, that's exactly what I meant with my question. I appreciate that its not a "critical" problem as I can still compile and build the program and there is a work around. But as Arioch suggests, the console gets spammed with the error during debugging, making it trickier to pick up the real problems, and I prefer not to 'collapse all'. Same goes with wanting to work with a fixed resolution that actually represents the game, not a huge window taking up nearly all my screen. Again, these are not keeping me from working, but they are inconvenient and are new in the upgrade from 3.1 to 3.2, which is why I was wondering if they are being worked on.
     
  17. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Thanks for the heads up, will be fixed in next release real soon now.
     
  18. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    thank you.

    there's any public roadmap on the releases?
    just to understand if we'll have to wait like months for a 3.3 or do you plan a 3.2.1 soon with this and other small fixes
     
  19. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    ok it looks like this problem has been solved with 3.3 after htiting play in the editor with the game view but I still get it once in a while during a scene editing, i think it's the same issue but with the scene view this time.
    is it supposed to be fixed in 3.3? should I open a new bug / report an update to the old one?
     
  20. unityrookie

    unityrookie

    Joined:
    Sep 24, 2009
    Posts:
    34
    same situation with me. It now works while playing the game, but pops up during editing. Much better this way though, at least I can run it without all the errors clogging up the console window while running.
     
  21. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    i don't know why but the error is back today while playing the game without changing anything on my rendertexture.
    now also if i set the rendertexture 16x16 i get the error printed in the console non-stop (and yeah... my game/editor window is bigger than 16x16)

    removing the target texture from the camera solve the problem so the issue is the render texture

    how is that possible?
     
  22. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    tried on a mac, same project, not a single error on both editor and game.
    looks like it's a windows only issue
     
  23. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    250
    I do get it every now and then, but at least not constantly anymore, as it was before. It's a step in the right direction.
     
  24. reculum

    reculum

    Joined:
    May 16, 2010
    Posts:
    60
    Hey guys,

    i'm using the render texture as a radar.
    I think it's more useful to simply make the rendertext smaller , and then when you do the final build, make it as large as it should be.
    (i havn't updated to the newest version yet, and hope that someone who reads this might be helped out by reading that)

    I really think the errors inside unity should be a bit more helpful, because without this thread i had have no idea on what's wrong ^^
     
  25. gboticus

    gboticus

    Joined:
    Apr 17, 2011
    Posts:
    5
    I'm using Unity 3.3.0f4 and I am still seeing this error message being spammed in the console when the game window is smaller than the render texture's resolution. I'm running Unity in Windows 7 64-bit.

    This only seems to happen when using the editor however, I am fortunate enough to have a high enough resolution monitor but others on the development team are not so fortunate. Having this error message spammed impacts the performance of the game it would be appreciated if it could get fixed or maybe a temporary workaround proposed?
     
  26. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    @gboticus: Welcome to the forum!

    According to the bug database, this has been fixed and should be available in the next version.
     
  27. FluffyCheese

    FluffyCheese

    Joined:
    Oct 13, 2010
    Posts:
    6
    I have this error in version 3.3.0f4 as well. I'm also using a render texture, but for me it's not when the game window is smaller than the render texture, but rather the game window is smaller than the scene window.

    Temp fix: it's easy enough to ensure you have a large enough game window (you can still set the actual game render to a specific resolution by setting the web size in Player Settings - it's the size of the window that makes a difference in my experiences). Not very ergonomic but still perfectly functional. If on the other hand you choose the "live with it" strategy, bear in mind that having something output to the log every frame can cause a performance hit.

    Is it worth filing a bug report if it's supposedly fixed?
     
  28. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,690
    Still getting this in 3.4.
     
  29. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Still happens on 3.4. :(
     
  30. FalconRime

    FalconRime

    Joined:
    Feb 17, 2011
    Posts:
    34
    Am getting this in 3.4.1
     
  31. Timmey

    Timmey

    Joined:
    Apr 13, 2010
    Posts:
    35
    I am having this with Render textures of any size. It seems to be linked to whenever unity does a dirty serialization in the editor. On 3.4.1 maybe its something with AMD cards??
     
  32. mulova

    mulova

    Joined:
    Apr 14, 2011
    Posts:
    62
    I'm getting this error too in 3.4.2
    If the Game view is smaller, error occurs.

    AMD Radeon HD 6800 series
    Windows7 Professional K
     
  33. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    Yep. I'm getting this error as well in 3.4.2. Spams the Console and slows the game down by about 70% ^_^ As mentioned it works fine if I set the renderteture to be lower (in my particular case 512x512) but this is not a solution really, just a work-around.
     
  34. Canazza

    Canazza

    Joined:
    Feb 10, 2011
    Posts:
    14
    I'm getting this problem too, Render Texture is 512x512 on a fixed web player resolution of 800x450. Setting the Render Texture to something lower does not fix it, however, resizing my Game window to something bigger does fix it (even if I still keep the game resolution fixed to 800x450 and have the big grey border round the outside).

    Happens in both instances we use a render texture (one on the settings screen and one for the mini-map). And we're just rendering a camera directly to a texture then displaying it in the GUI (no fancy GL calls or whatnot)

    Currently using Unity 3.4 (We're on the last leg of a project and we don't want to risk messing stuff up with the 3.5 preview :D)
     
  35. kaushik-d

    kaushik-d

    Joined:
    Aug 25, 2011
    Posts:
    19
    I was getting this error for a while in 3.4 - only in the Editor though. Whenever I used a RenderTexture the size of my application window (1024x768) I would get this error. However, found that just resizing the Game window in Free-Aspect mode doesn't give than error anymore.