Search Unity

3d object in picture

Discussion in 'Editor & General Support' started by Cll3m, Aug 2, 2012.

  1. Cll3m

    Cll3m

    Joined:
    Aug 2, 2012
    Posts:
    5
  2. khanstruct

    khanstruct

    Joined:
    Feb 11, 2011
    Posts:
    2,865
    I'm not sure I understand the question. Technically, your monitor is a 2d picture. Any window displaying 3d assets should then qualify for what you're asking.

    If you're looking for a flat image, with a small box/window cut out of it; use a big GUI that covers the screen and leaves a small portion open.
     
  3. Cll3m

    Cll3m

    Joined:
    Aug 2, 2012
    Posts:
    5
  4. Democre

    Democre

    Joined:
    Mar 31, 2010
    Posts:
    345
    You could use a render texture (if you have pro).
     
  5. rab236

    rab236

    Joined:
    Jan 17, 2009
    Posts:
    2,311
    I think he's asking if he has a picture of a room, how would he get a 3D model to look natural with the picture, like shadows on the floors.

    To answer, Photoshop has great 3D features. You can set the lighting and adjust the color balance of a 3D object while using a 2D image as a background.

    In Unity you can move an object around on the XZ plane and have a plane with the image in the back. You could control lighting of the object also.
     
    Last edited: Aug 2, 2012
  6. khanstruct

    khanstruct

    Joined:
    Feb 11, 2011
    Posts:
    2,865
    If that's the case, then this is a question of compositing. This is typically done post production, and you would use a tool like After Effects. Doing this real time isn't really a viable possibility at the moment.
     
  7. Cll3m

    Cll3m

    Joined:
    Aug 2, 2012
    Posts:
    5
    Thanks for your response and information. I've tried with a plan in unity! ;)
     
  8. Democre

    Democre

    Joined:
    Mar 31, 2010
    Posts:
    345
    AR does it all the time. It just is not a simple subject to tackle. The guy in the linked post is doing it, although I don't know if it's run time or not. But seeing as how he was inspired by an AR app, I bet it is being done at run time.

    @Cll3m If it's a static image, you could try to model a room based on that image and just use your furniture in that.
     
    Last edited: Aug 2, 2012
  9. Morning

    Morning

    Joined:
    Feb 4, 2012
    Posts:
    1,141
    Can you specify your question a bit more?
    Do you just want models in pictures or do you want an editor in unity similar to what that video shows? If first, you can easily do this in a modeling application like blender or 3ds max.
     
  10. unikum

    unikum

    Joined:
    Oct 14, 2009
    Posts:
    50
    I think he wants to create a similar application that the video shows.

    Basically all you would have to do is to have a picture rendered to the camera and have the camera pointed in the direction that makes sense for the perspective. Imagine creating a plane in Unity that fits with the ground in the picture. Then you would spawn the object to that plane and let the user rotate and move it along that plane. Behind this you render the image. Something along those lines I would assume would work. You'd also like to simulate the light by position it similar to where the light source is in the image.
     
  11. khanstruct

    khanstruct

    Joined:
    Feb 11, 2011
    Posts:
    2,865
    I was responding to rab236 about making a model look natural in a scene. AR is great at placing a 3d asset into a scene, but it certainly doesn't look natural. Just like the original blue screen effects from old movies; sure, its there, but you wouldn't believe it was really there.
     
  12. Democre

    Democre

    Joined:
    Mar 31, 2010
    Posts:
    345
    I was just saying that run time compositing isn't as unobtainable as that sentence was sounding. Check out the linked video. That level of compositing is seen in a lot of places, most specifically AR aps, but there are others that composite 3D models into playing film. It's not a simple process for sure, and may not be viable for beginners.

    I can't find it now, but I was watching demos 2 or 3 years ago of marble statues being dropped into a scene and placed on 2D tables or moved to the 2D floor all with appropriate sub-surface scattering from the light sources in the 2D picture and light bounce into the static images.

    The tech is there and the GPUs can do it, the question is just why? There's not a lot of practical use of mixing real world and modelled geometries at run time. There are some, but not many.

    This is why I recommended that if he was working with a static image, not with a specific film clip (as the linked video does), just to model the room based on that static image. Even if he just models an inward normalled cube and projected the static image onto it, he could still set up lights and such so that his furniture models could be placed in there.

    Edit: found this link: http://www.youtube.com/watch?v=hmzPWK6FVLo
    I think OP wants to use this.
     
    Last edited: Aug 3, 2012
  13. Cll3m

    Cll3m

    Joined:
    Aug 2, 2012
    Posts:
    5
    Hi,
    Democre and Unikum find i meant! This is a static picture with 3d object.
    other example :
    http://www.youtube.com/watch?v=J5em4WXpMag&feature=player_embedded#! between 0"30 and 0"50

    I will try with unity and come back to tell you how it goes.
    Thanks all ;)
     
unityunity