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

htmlTexture for iPhone

Discussion in 'iOS and tvOS' started by bliprob, Dec 27, 2009.

  1. bliprob

    bliprob

    Joined:
    May 13, 2007
    Posts:
    901
    Finally got around to making this work:

     
  2. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
    Can click the link? :?
     
  3. bliprob

    bliprob

    Joined:
    May 13, 2007
    Posts:
    901
    I haven't tried posting touch events into the web view, but it should be possible.

    Here's the same project with a htmlTexture and a live camera texture. The live camera texture comes from the offscreen 3GS camera preview and is updated once per Update():



    The "goodbye" button on the phone appears as blue here, but is really red, so it looks like I've got the pixel byte order wrong.
     
  4. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    wow cool !
    i only figured it out to load external images as a Texture but with click function would be awesome !
    When do you release it ?
    thanx
    :oops: kerstin
     
  5. jtbentley

    jtbentley

    Joined:
    Jun 30, 2009
    Posts:
    1,397
    Very cool stuff :)
     
  6. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Looking forward to try this out !
     
  7. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
    Add to EP ? haa~~ :p
     
  8. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Go Rob! :)
     
  9. bliprob

    bliprob

    Joined:
    May 13, 2007
    Posts:
    901
    With the live camera view and compass, you can make a sort of crude augmented reality:



    You can see I've got a cube floating above the half-eaten muffin on my messy desk. (The muffin is a disgusting blue due to the red and blue channels being swapped in the live camera texture.) The background live camera view is a material on a plance parented to the camera. The camera is rotated to match the current compass heading. As the phone is rotated, the cube rotates out of the view.

    As AR goes it's not so great, but it's basically the same technique that some games already in the app store use (i.e. Fairy Trails). Actually Fairy Trails is sticking a transparent composited EAGLView into the actual camera preview, while this is making the camera preview into a texture for using in a full-screen EAGLView with no compositing, so the framerate this way might be better.
     
  10. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
    AR is very magic. this can be added to EP?


    :D

    Give a mark,give a model,AR Completed, then it is too good :wink:
     
  11. DarkSky998

    DarkSky998

    Joined:
    Oct 11, 2010
    Posts:
    1
    It's so cool,Sir.
    Can I open the iPhone's Camera just in Unity3 or have to write a Object-C plug-in in Xcode?
    I am looking for some sample code or toturial about "Apply Augmented Reality to Mobile Serious Game on iPhone"
    But I only found how to load the GPS location have no the Camera.


    Can you teach me or give me a tip?
    Thank you very much.
    I'm sorry about my English.
     
  12. exia

    exia

    Joined:
    Sep 7, 2009
    Posts:
    7
    hi bilprob,
    worked the iphone camera in this scene in real time? if yes, please briefly explain how u convert the image data from xcode to Unity Texture2D?? thank u
     
  13. stairs

    stairs

    Joined:
    Nov 19, 2010
    Posts:
    18
    Hi have the exaclty same problem! How you do that? It's a plugin or something?
     
  14. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
    Where is htmlTexture for iPhone~~ :)
     
  15. liudibo

    liudibo

    Joined:
    Dec 9, 2010
    Posts:
    75
    Mark and learn.
     
  16. chb402

    chb402

    Joined:
    May 20, 2011
    Posts:
    1
    it would be cool if i can do that same thing.

    can anyone tell me where is the link for it?
     
  17. ciaravoh

    ciaravoh

    Joined:
    Dec 16, 2009
    Posts:
    252
    what a mess on your desk ! :)
     
  18. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Blue muffins seem quite tasty by the looks of it. But then I am a hippo.
     
  19. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    What it going on with the htmlTexture for iPhone / IOS ?

    Is there any progress?
     
  20. Peter Hou

    Peter Hou

    Joined:
    Oct 12, 2010
    Posts:
    66
    I hope development will resume on this. We could really use it :)
    If this were ever released on the Asset Store we'd be happy to pay for it.