Search Unity

:::..:::::::...pixels.:.::::.

Discussion in 'Made With Unity' started by taumel, Nov 7, 2006.

  1. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Hi,

    i've played a bit around with the pixles (Jaja Knallbonbonfarben)... http://spielwiese.marune.de/_uni/index.html

    No this fast for realtime... :O/

    Calculations could be optimized but i don't see how to get this faster than by a factor of 2.


    Regards,

    taumel
     
  2. Morgan

    Morgan

    Joined:
    May 21, 2006
    Posts:
    1,223
    Runs pretty smooth for me - 13 fps on G4 1.25/Radeon Mobility 9600/64, with a bunch of other apps hogging CPU.
     
  3. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    20fps on my mini but doubling the texturesize is a slowdown...
     
  4. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    50fps windowed, ~100fps fullscreen on macbook pro. If that is a bunch of SetPixel calls, then yes, the calls themselves will most likely be the bottleneck. Maybe it makes sense to add something like SetPixels where you'd pass a whole width*height array. Should speed up those things quite a bit.
     
  5. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    62-64 in windowed and 65-67 in full
    geforce 7800gt
    pentium d 3GHz X 3GHz
    1gb ram
     
  6. Randy-Edmonds

    Randy-Edmonds

    Joined:
    Oct 10, 2005
    Posts:
    1,122
    45fps window : 55fps fullscreen

    P4 3.16 (laptop)
    Nvidia FX Go5600
     
  7. nafonso

    nafonso

    Joined:
    Aug 10, 2006
    Posts:
    377
    I die a little when I see this :cry: . On powerbook 1.67 GHz with an ATI 9700 (128mb) I get 15-25fps windowed and 20-30fps fullscreen.
     
  8. thylaxene

    thylaxene

    Joined:
    Oct 10, 2005
    Posts:
    716
    i get 50fps windowed and 50-60fps fullscreen at 1680x1050 rez on a 2x2.3 G5 and ATI X800XT 256mb card.

    nice btw. :wink:
     
  9. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    Apparently it's all about the Core Duo. Even though my MacBook has crap instead of a graphics card, I get 50fps in the web player.
     
  10. thylaxene

    thylaxene

    Joined:
    Oct 10, 2005
    Posts:
    716
    that's great to know... thinking of selling my 17in powerbook to get a MacBook.

    cheers.
     
  11. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    This is most likely saying that the demo is cpu bound rather than gfx card bound. Probably due to the scads of SetPixel calls. And the MacBooks and Mac Minis do have decent cpus in 'em.

    -Jon
     
  12. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    50 fps fullscreen and Windowed on G5.
    Very cool btw,Like lava
    AC
     
  13. joacoerazo_legacy

    joacoerazo_legacy

    Joined:
    Apr 5, 2006
    Posts:
    214
    constant 50 fps windowed

    MBP 1.83, 1gb ram
     
  14. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    BTW, 16FPS on MacBookPro + Vista RC2, without OpenGL drivers (i.e. software rendering). ATI does not have GL drivers for Vista yet :(
     
  15. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Too much switching between languages: How do i convert a float to int and vise versa in unity javascript again?
     
  16. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Did a little update to it in order for the show-off users with their dandy systems. ;O)

    n cycles through some simple effects
    m switches the texture resolution

    http://spielwiese.marune.de/_uni/index.html

    @aras
    How do i delete/release a texture again?

    It would be nice to have some more commands like:

    a) A fill command which can fill a rectangle area (x1,y1,x2,y2) with a given colour (ARGB).
    b) A copy command with which you can copy from one area/texture to another area/texture.
    c) What's exactly happening with the commands? Can i access the textures in the VRAM directly?

    https://support.ati.com/ics/support/default.asp?deptID=898&task=knowledge&folderID=4353


    Back to work,

    taumel
     
  17. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Just like any other object: Destroy(myTexture)

    Right now SetPixel updates pixels in system memory copy; GetPixel reads from system memory copy. Apply() uploads the texture to the graphics card (glTexSubImage*).
    That is generally not possible. VRAM is not mapped to process address space, so you can't "just write" to it. In OpenGL textures are modified using glTexSubImage* calls.
     
  18. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Code (csharp):
    1.  
    2. var p : int = 1.5;
    3.  
     
  19. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    @Aras
    Ah okay, i dunno what's included in this driver. I've just stumbled over the note some days ago...

    @Joachim
    No, i meant something like erg=6/float(10);
     
  20. nafonso

    nafonso

    Joined:
    Aug 10, 2006
    Posts:
    377
    I agree.. It must be tied with cpu and/or memory bus.
     
  21. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    Get asn SetPixel are FAST functions. BUT: When you update a 256x256 texture then you're calling them 65536 times.

    In the future, we'll look at some fast(er) way to set many pixels with one call.
     
  22. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    A third handy command would be to fill from a given position the next x positions with a given colour - kind of like a byterun.
     
  23. peckinpah

    peckinpah

    Joined:
    Mar 15, 2006
    Posts:
    71
    Am I the only one who can't switch player to fullscreen on this one? It just opens an empty new browser-window...

    macbook pro/firefox/radeon x1600 256mb
     
  24. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Works fine here. I've also never experienced problems this way. What i do hear from time to time is that some people are experiencing crashes with Firefox on windows with unity stuff (window problems).
     
  25. nafonso

    nafonso

    Joined:
    Aug 10, 2006
    Posts:
    377
    Yes, I tried it on firefox and it opens a new blank window instead of going fullscreen.
    Try it with safari.
     
  26. littlelingo

    littlelingo

    Joined:
    Jul 18, 2006
    Posts:
    372
    Hi T,

    As far as int conversion there is no "real" way like parseInt or something in Unity Javascript to do that right now. The current way is like Joe listed.

    So for your example it would be:

    Code (csharp):
    1. var erg : int = 6/float(10);
    2.  
    HTH,

    -- Clint
     
  27. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Okay, thanks!