Announcement

Collapse
No announcement yet.

TextureRenderTarget2D crashes the game?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    TextureRenderTarget2D crashes the game?

    is TextureRenderTarget2D crashes the game?

    Hello! I have a map on which the statikmesh. On static mesh superimposed simple material Material'menu. MainMenuMaterial '. We have the texture of the material TextureRenderTarget2D'menu. MainMenuTexture '.

    Here is my class GFxMoviePlayer:

    class Some_GFxMoviePlayer extends GFxMoviePlayer;

    DefaultProperties
    {
    RenderTexture = TextureRenderTarget2D'menu. MainMenuTexture ';
    MovieInfo=SwfMovie'menu.MainMenu.MainMenu1'
    }

    When I go to the map, then everything is fine. When I write in the console command quit, exit command or command restartlevel, then the game crashes.

    If I do not specify RenderTexture = TextureRenderTarget2D'menu. MainMenuTexture ', then everything is fine, but there is a Warning:

    Warning, Failed to load' SwfMovie? INT? Scaleform.IME.MoviePath? ': Failed to find object' SwfMovie? INT? Scaleform. IME.MoviePath? '
    Log: GFx attempted to load missing object [? INT? Scaleform.IME.MoviePath?].

    Does anybody knows how to solve the problem? Please, help.

    #2
    this will be fixed in next version?

    Comment


      #3
      I have similar code in my project and it loads, and even quits fine. Your usage sounds unclear to me, but i am hoping that it is a translation issue. To clear things up,

      "On static mesh superimposed simple material Material'menu. MainMenuMaterial '. We have the texture of the material TextureRenderTarget2D'menu. MainMenuTexture '."

      By this you mean you have created a material - menu.MainMenuMaterial, and applied it to your mesh by casting it as a TextrureRenderTarget2D? I am not sure you should do this, the way UnrealScript works is to return None when casts fail. If you have an unchecked assignment you are going to result in odd outcomes, which i can see leading to this very issue.

      Join us on IRC one day and we can work things through much quicker.

      #unrealscript on irc.enterthegame.com
      #udkc on irc.gamesurge.net

      Comment


        #4
        can you tell the version of UDK? I installed "UDKInstall-2011-11-BETA"
        for example, in UDK-2011-05 everything works fine.

        Comment


          #5
          I've just updated to November and ill be updating to December in about an hour. I've had the kiosk working with a scriptedtexture in place since ~ July.

          Comment


            #6
            OK, here is my code:

            My_PlayerController.uc :
            class My_PlayerController extends PlayerController;


            DefaultProperties
            {
            }

            My_HUD_MainMenu.uc :
            class My_HUD_MainMenu extends GFxMoviePlayer;
            DefaultProperties
            {
            MovieInfo=SwfMovie'MyPack.MainMenu1'
            RenderTexture =TextureRenderTarget2D'MyPack.Text'
            }
            My_HUD.uc :
            class My_HUD extends HUD;

            var My_HUD_MainMenu gfxMainMenu;

            simulated function PostBeginPlay()
            {
            gfxMainMenu = new class'My_HUD_MainMenu';
            gfxMainMenu.Start(true);
            }
            defaultproperties
            {
            }


            My_Game.uc :
            class My_Game extends GameInfo;


            event PostBeginPlay()
            {
            }

            DefaultProperties
            {
            PlayerControllerClass=class'My.My_PlayerController '
            HUDType = class'My_HUD'

            }

            Comment


              #7
              Here is my Texture:

              Here is my Material:

              Comment


                #8
                In UDK-2011-12 game still crashes

                Comment


                  #9
                  yeah, SetExternalTexture still crashes the game!!!!!!!!!!

                  Comment


                    #10
                    Originally posted by _h2o_ View Post
                    yeah, SetExternalTexture still crashes the game!!!!!!!!!!
                    How about UDK-2011-05 version? have you tried it?

                    Comment


                      #11
                      My Texture:


                      My Material:


                      I
                      hook in the SWF i want played with the following:


                      Code:
                          ViewscreenTexture = ScriptedTexture(class'ScriptedTexture'.static.Create(RenderTargetResolution, RenderTargetResolution));
                      
                      
                          ViewscreenMaterial = ViewscreenMesh.CreateAndSetMaterialInstanceConstant(0);
                          ViewscreenMaterial.SetParent(Material'BTBanking.KioskSWF_mat');
                          ViewscreenMaterial.SetTextureParameterValue('SWFMovie', ViewscreenTexture);
                      
                      
                          ViewscreenMovie = new ViewscreenMovieClass;
                          ViewscreenMovie.Kiosk = self;
                          ViewscreenMovie.RenderTexture = ViewscreenTexture;
                      
                      
                          ViewscreenMovie.bIgnoreMouseInput = false;
                      
                      
                          ViewscreenMovie.SetMovieInfo(ViewscreenSWF);
                          ViewscreenMovie.setKiosk(self);
                          ViewscreenMovie.Start();
                      where RenderTargetResolution is currently set to 512, and ViewscreenSWF is set to an swf I'd like to be played. It doesnt crash, and is running fine on the December 2011 build.

                      Comment


                        #12
                        it starts since GFX4 (november UDK version)

                        all versions before november works, but i do not want old version, i wanna lastest

                        Comment


                          #13
                          I must not be understanding your problems. The example i just posted is working, includes a TextureRenderTarget2D texture, and plugs an SWF straight into it. None of this crashes the game on December 2011. SetExternalTexture does crash the game, so why not work around it.

                          As for wanting the latest, that is good, but you are going to be exercising some cutting edge code and plugins, which is bound to be time consuming.

                          Comment


                            #14
                            OK, what is ViewscreenMovie.Kiosk = self; and ViewscreenMovie.setKiosk(self); ? : )

                            Comment


                              #15
                              it was a CopyPasta chunk of my code, neither are important. You can see my kiosk http://www.youtube.com/watch?v=sfnuR...5aAUAAAAAAAAAA

                              Comment

                              Working...
                              X