locked
3D interactivity in XAML? RRS feed

  • Question

  • Is possible to achieve interactivity with user through 3D surface in XAML (example: click on button on 3D surface, etc.)? Using Vista CTP Sep 05... 
    Thursday, September 22, 2005 12:52 PM

Answers

  • VisualBrush does not pass input through to the visuals that are being painted. It is a "read-only" copy of the visuals. Now, the brush is "live" in that the brush is painting the exact same image that is that is being rendered by the visuals in real time, so if you interact with or update the source visuals the brush will paint the updated image, but you cannot interact with the brush and have the source visuals respond.

    HTH,
    Drew

    Thursday, September 29, 2005 8:43 PM

All replies

  • You mean you're using VisualBrush to "paint" visuals onto the surface of a 3D surface and you want interactivity? If so, the answer is no. The "copy" of the visuals displayed by a VisualBrush are non-interactive.

    HTH,
    Drew

    Friday, September 23, 2005 12:06 AM
  • How about (Mouse)Picking then? Does this require me to do it the usual way by calculating a picking ray, transform that ray from view space into world space and then to hit tests against every 3d object within the viewport?

    Or is there a slim, sexy, and easy way to do this?
    Friday, September 23, 2005 12:11 AM
  • What I was saying is that you can't do something like map a Button visual onto a 3D rotating cube using VisualBrush and then expect to be able to click the button.

    The 3D objects themselves support hit testing and mouse interactions. From what I hear even this build is still a little buggy, but still quite functional already. Take a look at this post, granted it's a little older (July) so you may find differences in the Sept. build, but it still covers the basics and should get you started in the right direction.

    HTH,
    Drew

    Friday, September 23, 2005 1:34 AM
  • I thought I heard one of the PDC talks mention that you could map UI objects to a 3D mesh using VisualBrush and be able to interact with them. 
    Not sure which talk it was, most likely it was on Tuesday (maybe WPF: A Lap around the WPF?). 
    I just remember hearing that and franticly writing down VisualBrush.

    Let me know if I'm wrong, because I tried it, with the PDC bits of course Big Smile.
    I can get the UI to display, but I can't interact with it. 

    Thanks
    Thursday, September 29, 2005 8:30 PM
  • VisualBrush does not pass input through to the visuals that are being painted. It is a "read-only" copy of the visuals. Now, the brush is "live" in that the brush is painting the exact same image that is that is being rendered by the visuals in real time, so if you interact with or update the source visuals the brush will paint the updated image, but you cannot interact with the brush and have the source visuals respond.

    HTH,
    Drew

    Thursday, September 29, 2005 8:43 PM
  • Drew is correct - the Visual Brush is a read-only look. We've succeeded in (relatively easily) do some level of interactivity in the 3D content (e.g., selecting an item causes a listbox item to be selected in the corresponding 2D listbox which then updates the Visual Brush or selecting an item causes the item to transition to a 2D area and then we make the 2D elements visible for interactivity).
    Thursday, September 29, 2005 9:53 PM