Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Re: reflection with a viewport3D

Closed Thread
 
Thread Tools Display Modes
Old 01-10-2006   #1 (permalink)
Craig Kelly
Guest


 

Re: reflection with a viewport3D

Hi Adam, thanks for the reply.

I'm a newb with 3d, so to quickly summarize your last post:

Two main ways to achieve mirror 3d effects:
1) Add each element twice to your viewport. For copied items, flip em, and
apply a gradient, blending the original to an opaque color.
2) Add a second viewport which holds the same items the first viewport, but
flip the camera.

Correct me if I'm wrong, but it seems that the 2nd approach would not work
to achieve the same Max mirrored effect since it has several reflected items
with different z-values.
(i'm looking at a screenshot found here: http://www.microsoft.com/max/)

I'm using Nov '05 CTP bits and I went ahead and tried the 2nd approach first
just for kicks, but got stumped on a couple things.

a) for the 'inverted camera', would that be done simply changing the up
direction? If so, what to?
b) The only way I can add models from the 1rst viewport to the 2nd viewport
is to call Clone() on the base Model3DGroup. Is there a way for the 2nd
viewport to hold references to the models int the 1rst viewport? I saw bits
of 3d sample code that use 'ChangeableReference', but i can't seem to find
that in the latest bits (nor am I sure what it's really used for).

If both of your suggested approaches work, do you have any sense which would
be more effecicient, and which would lend themselves best to mirrored
animations?

Thanks in advanced!

-CK

"Adam Smith [MS]" wrote:

> (disclaimer - I'm not on the Max team, though I am on the 3D team)
>
> I believe that the most straightforward approach to this rendering behavior
> is to simply place each mesh into the scene twice, once with a flip+position
> transform - this should provide a perfect reflection. If you want to
> simulate a more realistic appearance (where, say, the reflect is less
> distinct as it gets farther from the reflective surface) you can consider
> using a material group with the contents of the original mesh as the first
> material and a linear gradient (fading from transparent at the reflective
> surface to opaque background color at some mid-point) as the second
> material. Alternately, you could place a plane at the
> "table-top"/reflection point and have *it* have a gradient on it, etc.
>
> Another approach is to have nearly the same scene in two different
> Viewport3D's - in the first you draw the reflection with an inverted camera
> and in the second you draw the "real" content with a normal content, lining
> up the baselines. This ensures that the reflections are always occluded by
> the "real" content, and it allows you to place 2d content between the layers
> (again, to simulate fade/table-top/etc).
>
> -Adam Smith [MS]
>
> "casey chesnut" <casey@MORE_SPAMbrains-N-brawn.com> wrote in message
> news:eBlyTg41FHA.1032@TK2MSFTNGP12.phx.gbl...
> > Microsoft Max has the 3D picture frame view that does reflection.
> > my guess is that they do that with a Viewport3D and a VisualBrush.
> > i would also assume that all the picture frame meshes are included in a
> > single Viewport3D.
> >
> > the thing i dont understand is that each picture frame seems to be doing
> > reflection!
> > its like they are reflecting each individual mesh ... which i cant imagine
> > how to do.
> > while i can see how to reflect an entire Viewport3D.
> >
> > are they reflecting individual meshes within a single Viewport3D? ... if
> > so, how?
> >
> > Thanks,
> > casey
> >
> >

>
>
>

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
reflection, COM, and Vista idoublepress .NET General 11 07-11-2008 12:31 AM
Viewport3D in XPS Alex74 Avalon 2 01-26-2007 01:36 PM
data binding in viewport3d Robin Senior Avalon 11 02-14-2006 05:19 AM
3d Reflection effects Craig Kelly Avalon 7 01-10-2006 03:52 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50