Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8691507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:08:05+00:00 2026-06-13T00:08:05+00:00

Im using SphereMeshGenerator to create a sphere element in a WPF application. This sphere

  • 0

Im using SphereMeshGenerator to create a sphere element in a WPF application.
This sphere is mapped with a media element (video).

I would like to place the camera in the middle of the sphere to get view from inside of the sphere.

Ive tried to play with camera position and direction without any success.
My knowledge about wpf and 3d are quite limited unfortunately.

So my question is, if possible, how to do it?

My goal is to emulate a video panoramic animation.

Thank you.

PS: this question has already been asked but still unanswered. See comments section here:

Link Page

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:08:06+00:00Added an answer on June 13, 2026 at 12:08 am

    Topic quite old but, as it could help other people in the same situation, i think i have to post the way to do that.

    Code XAML using SphereMeshGenerator:

    <Window x:Class="WpfSphereMeshGenerator.SphereMeshGeneratorMediaInto"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:WpfSphereMeshGenerator"
        Title="SphereMeshGeneratorMediaInto" 
        Height="300" Width="300"
        Loaded="Window_Loaded">
    
    <!-- OXYZ axis in WPF are in center of ViewPort3D-->
    
    <Window.Resources>
      <!--sphere diameter--> 
        <local:SphereMeshGenerator 
        x:Key="MySphereMeshGenerator"
        Center="0 0 0"
        Radius="100.0" />
    </Window.Resources>
    <Grid>
        <Viewport3D>
            <!--camera in center of ViewPort => 0,0,0-->  
            <Viewport3D.Camera>
                <PerspectiveCamera 
                        x:Name="Camera"
                        UpDirection="0,1,0"
                        LookDirection="-2,-2,-2"
                        Position="0,0,0" 
                        FieldOfView="100" >
    
                </PerspectiveCamera>
            </Viewport3D.Camera>
            <ModelVisual3D>
                <ModelVisual3D.Content>
                    <AmbientLight 
                            Color="White">
                    </AmbientLight >
                </ModelVisual3D.Content>
            </ModelVisual3D>
            <!--ModelVisualD by default in center of ViewPort-->
            <ModelVisual3D
                x:Name="ModelA">
                <ModelVisual3D.Content>
                    <GeometryModel3D 
                            Geometry="{Binding 
                            Source={StaticResource 
                            MySphereMeshGenerator}, 
                            Path=Geometry}">
                        <!--turn sphere-->
                        <GeometryModel3D.Transform>
                            <RotateTransform3D >
                                <RotateTransform3D.Rotation>
                                    <AxisAngleRotation3D
                                                x:Name="Rotate"
                                                Axis="0,1,0"/>
                                </RotateTransform3D.Rotation>
                            </RotateTransform3D>
                        </GeometryModel3D.Transform>
                        <!--video put on BackMaterial-->
                        <!--inside face-->
                        <GeometryModel3D.BackMaterial>
                            <DiffuseMaterial>
                                <DiffuseMaterial.Brush>
                                    <VisualBrush>
                                        <VisualBrush.Visual>
                                            <MediaElement>
                                                <MediaElement.Triggers>
                                                    <EventTrigger RoutedEvent="MediaElement.Loaded">
                                                        <EventTrigger.Actions>
                                                            <BeginStoryboard>
                                                                <Storyboard>
                                                                    <MediaTimeline 
                                                                        x:Name="mediaTimeline"
                                                                        RepeatBehavior="Forever" />
                                                                </Storyboard>
                                                            </BeginStoryboard>
                                                        </EventTrigger.Actions>
                                                    </EventTrigger>
                                                </MediaElement.Triggers>
                                            </MediaElement>
                                        </VisualBrush.Visual>
                                    </VisualBrush>
                                </DiffuseMaterial.Brush>
                            </DiffuseMaterial>
                        </GeometryModel3D.BackMaterial>
                    </GeometryModel3D>
                </ModelVisual3D.Content>
            </ModelVisual3D>
        </Viewport3D>
    </Grid>
    <Window.Triggers>
        <EventTrigger  
            RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation
                        Storyboard.TargetName="Rotate"
                        Storyboard.TargetProperty="Angle"
                        From="0" To="360" Duration="0:0:10"
                        RepeatBehavior="Forever">
                    </DoubleAnimation>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </Window.Triggers>
    

    Thx to MABROUKI for the help on this one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Ubuntu, I would like to create a shell script (bash) for an Ubuntu
Using Jenkins or Hudson I would like to create a pipeline of builds with
using prototype method we can create new methods... like... Object.prototype.newMethod=function(){ // do something }
Using Rails 3.2.0 with haml and sass: I Would like to link an external
Using postgresql 8.4, I'm trying to write a function, and it looks like this:
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using CI for the first time and i'm smashing my head with this seemingly
Using Android TelephonyManager an application can obtain the state of data activity over the
Using the opencart image manager how would I set the upload to automatically remove:
Using WPF/PRISM I want to log my messages through ILoggerFacade to my GUI (A

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.