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

UNITY 3 beta preview

Discussion in 'General Discussion' started by nikemerlino, Jun 23, 2010.

  1. longshot

    longshot

    Joined:
    Sep 24, 2009
    Posts:
    71
    Having an issue with a shader on the iPad.

    Here is how it looks in the editor( and player ). I am using the GL ES 2.0 emulation setting.



    And here is how it looks when on an actual iPad -

    Only the upper right corner renders correctly.



    Here's the shader script -

    Code (csharp):
    1. Shader "Plasma"
    2. {
    3.     Properties
    4.     {
    5.         _CurrentFrame("Current Frame", Float) = 1
    6.         _Density("Density", Float) = 4
    7.     }
    8.    
    9.     SubShader
    10.     {
    11.         Pass
    12.         {
    13.             CGPROGRAM
    14.             #pragma vertex vert
    15.             #pragma fragment frag
    16.             #include "UnityCG.cginc"
    17.            
    18.             float _CurrentFrame;
    19.             float _Density;
    20.             struct v2f
    21.             {
    22.                 float4 pos : POSITION;
    23.                 float4 uv : TEXCOORD0;
    24.             };
    25.            
    26.             float hypot( float x, float y )
    27.             {
    28.                 return sqrt( pow(x,2) + pow(y,2) );
    29.             }
    30.            
    31.             v2f vert(appdata_base v)
    32.             {
    33.                 v2f o;
    34.                 o.uv = float4(v.texcoord.xyz,0);
    35.                 o.pos = mul( UNITY_MATRIX_MVP, v.vertex );
    36.                 return o;
    37.             }
    38.            
    39.             float4 frag(v2f i) : COLOR
    40.             {
    41.                 float theColor = 63 + 64 * sin( (hypot(128-(i.uv.x * 512), 256-(i.uv.y * 512)) + _CurrentFrame) / _Density);
    42.  
    43.                 return half4( theColor/255, 0, 0, 1);
    44.             }
    45.             ENDCG
    46.         }
    47.     }
    48.  
    49. }
    I've tried a bunch of different things to try to fix this, but nothing seems to work. At first I thought that perhaps sine plasma was too much for the iPad's gpu, but I tried adding more plasma functions to the shader, and they render correctly...in the upper right corner. I also thought that perhaps it was a fill rate issue, but the problem occurs no matter how much space the plane is taking up on the screen.

    Anyone have any ideas?
     
  2. longshot

    longshot

    Joined:
    Sep 24, 2009
    Posts:
    71
    I've tracked down and fixed the issue. The "pow" function is buggy on the iPad.

    Replacing the line -

    Code (csharp):
    1. return sqrt( pow(x,2) + pow(y,2) );
    with

    Code (csharp):
    1. return sqrt( x*x + y*y );
    fixes the issue.

    The link to the bug is http://intra.unity3d.com/fogbugz/default.asp?369444_pkgsapab

    Thanks.
     
  3. KITT

    KITT

    Joined:
    Jul 17, 2009
    Posts:
    221
    Beta 3.0.0b5 is available for download..
     
  4. w00dn

    w00dn

    Joined:
    Apr 28, 2010
    Posts:
    275
    anyone else having troubles with ipad, default vertex lit shaders and the new beta5?

    i just updated from b4 to b5 and now i'm having these shader issues in the editor and on the device.

    what it looks like:


    and what it should look like:
     
  5. longshot

    longshot

    Joined:
    Sep 24, 2009
    Posts:
    71
    Downloaded it and played with it a bit. I don't know if it was in there before, but there is rendertexture support for the ipad, which is awesome.

    Full screen plasma at 60fps( < 10fps without using a rendertexture ). :)

     
  6. MattCarr

    MattCarr

    Joined:
    Jul 5, 2009
    Posts:
    339
    Did anyone else notice the Macros window came and went from Beta4 to Beta5? I never actually tried it out and I didn't see anyone mention having used it on the forum, but it looked interesting. Hopefully it turns up again because it probably could be useful to have a macro system for certain dev situations.
     
  7. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Macros were an internal testing tool. The idea is kind of cool though so maybe it will make its way into a proper build some day.
     
  8. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    I didn't see anyone else bring this up, but it seems the beta 5 (or 4 for that matter) don't seem to agree with the Glassreflect2d shader from the car tutorial. am I missing a step, or is there some kind of change I need to make... (I don't normally dabble in the dark arts of shader coding :) ).

    Cheers,

    Galen
     
  9. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    I think shaders are still under development and I'm not surprised any existing shader isn't working with the beta.
     
  10. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    longshot - Nice work on the plasma. I took a few minutes to play around with rendertextures and they are really nice.
     
  11. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    is anyone aware of a change-log between B4 and B5?

    EDIT: @GotMilk, thanks for the URL :)
     
  12. KarelA

    KarelA

    Joined:
    Dec 30, 2008
    Posts:
    422
  13. DallonF

    DallonF

    Joined:
    Nov 12, 2009
    Posts:
    620
    This intrigues me:
    "Editor: fixed all the GUI elements showing up as enabled during the folding/unfolding phase of a fade group."
    (emphasis mine)

    I'm still stuck with 2.6.1 for now... what's a fade group, and is it as awesome as it sounds?
    I remember spending a couple days working on a GUI system that fades and animates...
     
  14. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    i think they are talking about the editor gui, not the one for the game.

    I think i found a bug, when i rotate an imported 3D model in the 3D preview window in the inspector, my system crashes completely and it happens every time.
    Case number 369653.
     
  15. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Has Unity 3 done something to change iPhone build sizes? (I'm using the non-Pro version)

    In 1.7 my last build was 17.9MB. In Unity 3 beta 4 it jumped to 25MB with only minor changes. In beta 5 I have only added a few small things (but also reduced the size of some assets), and now my build is over 40MB.

    I haven't gone overboard with assets (my Assets folder is 3.6MB), so the build size seems very large.
     
  16. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you likely choose the least optimal settings like choosing .net 2.0 instead of subset or 1.1 and targeting ARMV6 + ARMV7 which together on its own makes a good 30mb
     
  17. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Thank you dreamora,

    .NET 2.0 Subset was selected already, and when I change it to 1.1, it changes straight back to 2.0 Subset.

    Targeted arm6 only brought the app size down to 25.2MB, which is where I was with beta 4.

    I was hoping to be able to release an app under the 20MB device download limit.
     
  18. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    to get its real size, you need to move out the actual binary from the app package and then compress the rest. then sum up the size of the binary + compressed app ... thats +- the size of the file as it will go to the app store


    to get smaller you need stripping but that was basically always the case as already in unity iphone 1.x, not having pro and streaming meant 16-18mb just for mono+engine
     
  19. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Sorry, I'm a bit lost there. Can you explain that in more detail please?
     
  20. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,045
    Build and Run seems to work correctly now in beta5 but .... now there is a new problem - iphone builds seem to have UV's messed up (build iphone-match example)- bug report submitted.
     
  21. FatiguedArtist

    FatiguedArtist

    Joined:
    Mar 3, 2010
    Posts:
    38
    Has anyone noticed the references to Fight Club in the naming of the beta versions? b3 was called Chemical Burn and b5 is called Insomnia (can't remember the name of b4), also I think the typeface is similar/the same :p
     
  22. KarelA

    KarelA

    Joined:
    Dec 30, 2008
    Posts:
    422
    b4 was Cornelius :)
     
  23. FatiguedArtist

    FatiguedArtist

    Joined:
    Mar 3, 2010
    Posts:
    38
    Awesome! Yet another Fight Club reference.
     
  24. smithlim

    smithlim

    Joined:
    Nov 18, 2009
    Posts:
    21
    hello~
    does it support IME?
    I haven't tested unity 3.0.

    thanks.
     
  25. MattGPC

    MattGPC

    Joined:
    Jun 25, 2010
    Posts:
    10
    Far be it from me to ask the same question twice but...

    I noticed with the beta download assets there was a normal map stuck in the terrain textures folder.

    Is there any chance of normal mapped terrains making the final U3 release?

    It's sorely needed, especially with all the other graphics enhancements you've got going in.
     
  26. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    according the docs and screenshots, support for asian fonts from the system is there and IME mentioned somewhere too.

    but I have neither so I can't test it to say for 100% sure
     
  27. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    No, normal maps for the Terrain Engine aren't going to make it into 3.0. I put that texture into the Standard Assets a couple months back when it seemed like we might be adding them... a bit of wishful thinking on my part :roll:
     
  28. Maurice-Hoffman

    Maurice-Hoffman

    Joined:
    Jan 22, 2009
    Posts:
    182
    Hello Ethan,

    I noticed the object picker but it seems not to work.

    Can you explain how it works ?
     
  29. Ender13

    Ender13

    Joined:
    May 3, 2009
    Posts:
    91
    Any chance it's planned to be added to a 3.x release?
     
  30. theinfomercial

    theinfomercial

    Joined:
    Sep 9, 2008
    Posts:
    1,000
    Some sewer stuff with Beast. Yay!

    P.S. I find it funny that my 666th post deals with Beast (this a a HELL (pun) of a coincidence).
     

    Attached Files:

  31. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    This video does a good job of explaining the Object Picker: http://vimeo.com/12584179
     
  32. sourcerer

    sourcerer

    Joined:
    Oct 8, 2008
    Posts:
    119
    @theinfomercial: Looks nice, shame you gotta stop posting now or otherwise noone will observe the 666 phenomenon anymore!
     
  33. Iron-Warrior

    Iron-Warrior

    Joined:
    Nov 3, 2009
    Posts:
    838
    General Q to anyone:

    Has there been any improvements/additions to the character controller? I wouldn't mind a much more advanced controller with more functions, especially some stuff that would make it easier to use with Rigidbodies...some things that are a huge hassle to code (moving platforms, sliding, ect) could probably use some improvements.
     
  34. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Yes, the Character Controller has been updated to some degree to make it work with moving platforms etc...
     
  35. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    Why is that a unity task?
     
  36. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    From Unity 3 beta 5 documentation:

    Can someone explain me what is the meaning of 3, 4, 5, 6 ? I find it really difficult to find references on these concepts on Javascript. I understand that Unity Javascript is a hybrid and I suppose that some C# features "jumped in". The only way to understand those is learning C# ? Really, I appreciate the hard work that Unity guys put on the new documentation. I understand that it is not finished and polished and I can wait to see the finished form. Of the other hand, any references or explanations on the points above would be really appreciated. Thanks in advance.
     
  37. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you won't find any such stuff on javascript.

    unity javascript has not much to do with javascript other than the underlying syntax.

    if you want to find more on those things, search for them in relation to C# because thats the terms it actually uses.
     
  38. tigershan

    tigershan

    Joined:
    Jul 29, 2010
    Posts:
    73
    I am testing out the volumetric light in Unity3.0, I was wondering if there is a way to change the giving light's color.
     

    Attached Files:

  39. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    volumetric light .... is there something like that in Unity3? How do you do it?
     
  40. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    there is a god ray post effect in Pro
     
  41. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    617
    Has anyone given AssetBundle loading via WWW a shot in Unity3+iPhone?

    My loader test works fine in Unity1.7 on device and in Unity3 editor but fails on Unity3 built iPhone/iPad executable saying

    "is not a valid unity3d file" then EXC_BAD_ACCESS's.
     
  42. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    This brings back memories :)
    This give you a lot of extra power but it has the ability of making your code a lot less user friendly...

    For instance:
    At the moment I have a variable called playMode. I then use it like so:
    Code (csharp):
    1.  
    2. switch(playMode)
    3. {
    4. case ePlayMode.Playing:
    5.      DoFunction1();
    6.      break;
    7. case ePlayMode.SubMenu:
    8.      DoFunction2();
    9.      break;
    10. case ePlayMode.MainMenu:
    11.      DoFunction3();
    12.      break;
    13. case ePlayMode.Inventory:
    14.      DoFunction1();
    15.      break;
    16. }
    17.  
    With function types I could do this:
    Code (csharp):
    1.  
    2. var Actions : function[];
    3.  
    ...and then use it like this:

    Code (csharp):
    1.  
    2. Actions[playMode];
    3.  
    To me it looks so much neater... but to look at code like this and not see a "=" in front of or behind the code, this would look like a non-sensical array reference... Only by searching for the array declaration will you realize this is actually a function call...
     
  43. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    741
    Would it be possible to add a preference for platform for new projects? Unity defaults to PC/MAc, but I'd imagine a large portion of the brethren never, or rarely, use anything but iPhone/iPad.

    That was a handy thing about having the dedicated prog, it was always ready to go for iPhone.

    b.
     
  44. Peter G

    Peter G

    Joined:
    Nov 21, 2009
    Posts:
    610
    Two points:
    1. All's it takes to switch to iPhone is going to the build settings and hitting switch platform so having that done automatically would be nice, but it doesn't cost much time to change manually.

    2. I'm not sure where you got your stats, but a very large number of people only develop for Mac/PC. Some for professional projects and some as hobbyists who can't build for anything else but web player and widget.
     
  45. tigershan

    tigershan

    Joined:
    Jul 29, 2010
    Posts:
    73
    Sure there is something like that in unity 3.0, if you have the beta, go to components under scripts and rendering, and you will see volumetric light Beta and volumetric lights, which requires render to texture.
     
  46. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    Ahhh, o.k. :idea:
     
  47. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    741

    1. I know exactly how to switch from pc/mac to iPhone project settings. I'm not suggesting that become everyone's default, just my default. What's it to you if I ask for it?

    2. How does "I'd imagine a large portion of the brethren..." sound like a stat? Let's say it's me and some guy named Bob who want an option to open new U3 projects in iPhone/iPad. Again, how's it your concern if I suggest a feature?
     
  48. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    1. I'm against that :)
    But only cause I would prefer the create project dialog to have a selection list or alike to define the type of the project on creation instead of conversion after it.
    Unity knows afterwards what it will be, so why not go the right way right from the start :)

    2. Agreed, the other platforms are really the minority, especially cause a lot who use unity for hobby do cause they get it at $0 which is desktop only
     
  49. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    741

    That's an even better idea. A selection list from the beginning...

    Is iPhone/iPad really a minority platform? Wow... I had no idea. I imagined that most folk bit the bullet of having to purchase Unity pro to get to iPhone Pro (pardon the old vernacular) because that was the only way to get it. Other than AAA level stuff, I can't imagine too many indies going head to head in the open market with the big boys on pc/mac platforms. Though, I'm likely ill aware. Still, having to convert the project after making it is a pain, and for $2k+ a selection list on creation isn't an outrageous concept.

    B.
     
  50. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Unity Free probably amounts to at least 90% of Unity users, because it's, you know, free (and it doesn't do iPhone). You don't have to attempt an AAA game on the desktop; I think very few people are insane enough to try that....

    --Eric