Rendering video files on marker.

Feb 22, 2010 at 3:37 AM

I am trying to render video files( avi, wmv, , , etc) on the groundmarker.

Is it possible??

There is a sample video , I want to do this using goblinXNA .

http://serviceapi.nmv.naver.com/flash/NFPlayer.swf?vid=53AB8ED100E3762B0BAE10B0B9EEBC3F3E39&outKey=V122d0ba42d7c02cfead

Feb 23, 2010 at 9:41 PM

Hi

 you can create a rectangle primitive  mesh and then texture it with the video .I worked for me!

 

 

 

Feb 24, 2010 at 12:21 AM

I made a rectangle primitive mesh, then,,,,,,,,

I don't know how to make the video as texture,,

Could you show me some sample source ??

Feb 24, 2010 at 12:24 AM

GeometryNode pyramidNode = new GeometryNode();
            pyramidNode.Model = pyramidModel;
            pyramidModel.UseLighting = true;


            pyramidMaterial.Diffuse = Color.White.ToVector4();
            pyramidMaterial.Specular = Color.White.ToVector4();
            pyramidMaterial.SpecularPower = 10;
            pyramidMaterial.Texture = videoPlayer.GetTexture();

            pyramidNode.Material = pyramidMaterial;

Mar 3, 2010 at 2:24 AM
Edited Mar 3, 2010 at 6:39 AM

I tried as you told me . And I see only White Back ground and listen to the sound of the movie. However the movie texture is NOT on the marker,,

What is my problem??

 

 

Video video;
VideoPlayer player;
Texture2D videoTexture;

protected override void LoadContent()
{
    video = Content.Load<Video>("myVideo");
    player = new VideoPlayer();
 }

protected override void Update(GameTime gameTime)
{

   if (player.State == MediaState.Stopped)
    {
        player.IsLooped = false;
        player.Play(video);
    }
   base.Update(gameTime);
}

 ----------------------------------------------------------------------------------------------

Material dominoMaterial = new Material();
dominoMaterial.Diffuse = new Vector4(1.5f, 1.5f, 1.5f, 1.0f);
dominoMaterial.Specular = Color.White.ToVector4();
dominoMaterial.SpecularPower = 10;
            

if (player != null)
{
     if (player.State != MediaState.Stopped)
     {
            videoTexture = player.GetTexture();
      }
}

dominoMaterial.Texture = videoTexture;
dominoNode.Material = dominoMaterial;

groundMarkerNode.AddChild(dominoTransNode);

 

Mar 3, 2010 at 7:32 AM

videoTexture = player.GetTexture();

should be in the draw function , ie you cannot just load the texture all at once and play it , it needs to be done in the draw function ,

player.GetTexture(); gets the texture frame by frame 

Mar 9, 2010 at 8:16 AM

praqynand. thank you for helping me, 

I think I did it :-D

But I don't know why I can see part of the video.

Did you have same problem, praqyanand??

Jul 22, 2010 at 12:29 PM
Edited Jul 22, 2010 at 12:40 PM

I am doing the same thing, Rendering video on the marker. Can you please publish your full code. In my code,Marker is getting detected and I am able to listen sound of the video but not able to see/render video on the Marker.

Aug 5, 2010 at 12:17 AM

I think that video is playing well. You need to make space to show video texures, so that you can see the video as well.

Jun 28, 2011 at 2:10 PM

Hello,

Does You have had success using videos on the marker? I'm trying... but ... nothing, hehe.

I would like a example source for me to help...

Thanks