Announcement

Collapse
No announcement yet.

SceneCapture2DActor "Fix"

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

    SceneCapture2DActor "Fix"

    ================================================== ==============
    Title: "Reflection Fixes": SceneCapture2DActorFix & SceneCaptureReflectActorFix
    Version: Version "Uncompiled"
    Release Date: September 2014
    Author(s): TKBS
    Description: SceneCapture2DActorFix Adds a Sprite and Static Mesh for easier (rotation) use in Editor. Good for LD's.
    SceneCaptureReflectActorFix allows the actor to show in game; saves hassle. Good for LD's.
    More information:
    • I may release a compiled version with a mod in the future, try to rename your actor if you use this code
    • RattleSN4K3 has kindly provided an in editor version (a non-'.u' script fix)
    • Turning on Camera 'frustrum' in the "flags" can also help
    • I spent a stupid amount of time trying to get the normal "SceneCaptureReflectActor" to work and had absolutely no joy then hrs later i remembered i could do this fix aswel..
    • .. Maybe someone else can provide a comprehensive thread for it
    • By default FPS is set to 1000, this is a bit of an overkill and can be drastically reduced, choose your setting wisely

    Download Link: n/a (not needed, compile your own)
    Additional Credits: RATTLESN4K3, Epic (for unreal)
    ================================================== ==============
    Code:
    /**
     * Place this actor in the level to capture it to a render target texture.
     * Uses a 2D scene capture component
     * - TKBS -  Added Fix for LD's 
     * SceneCapture2DActor with Sprite & Mesh for easier rotation
     */
    class SceneCapture2DActorFix extends SceneCapture2DActor
        placeable;
    
    
        // add a sprite so i can see it in editor
    
    
    defaultproperties
    {
        // add sprite (make use sprite)
        Begin Object Class=SpriteComponent Name=Sprite
            Sprite=Texture2D'EngineResources.ActionCamMove'
            HiddenGame=True
            AlwaysLoadOnClient=False
            AlwaysLoadOnServer=False
            bIsScreenSizeScaled=True
            ScreenSize=0.0025
        End Object
        Components.Add(Sprite)
        
        // 2D scene capture
        Begin Object Name=SceneCapture2DComponent0
        End Object
        SceneCapture=SceneCapture2DComponent0
        Components.Add(SceneCapture2DComponent0)    
    
    
        CameraMesh=StaticMesh'EditorMeshes.MatineeCam_SM'
    
    
        // Unlock camera mesh (mesh to help visible rotation)
        Begin Object Name=CamMesh0
            StaticMesh=StaticMesh'EditorMeshes.MatineeCam_SM'
        End Object
        CameraComp=CamMesh0
        Components.Add(CamMesh0)
    
    
    }
    ================================================== ==============
    NON -".U" script version
    • Paste into a viewport
    • (CTRL+V or Edit->Paste). A new SceneCaptureActor2D will be created at (0,0,0).

    ================================================== ==============
    Code:
    Begin Map
       Begin Level
          Begin Actor Class=SceneCapture2DActor Archetype=SceneCapture2DActor'Engine.Default__SceneCapture2DActor'
             Begin Object Class=StaticMeshComponent Name=CamMesh0 ObjName=StaticMeshComponent_0 Archetype=StaticMeshComponent'Engine.Default__SceneCapture2DActor:CamMesh0'
                StaticMesh=StaticMesh'EditorMeshes.MatineeCam_SM'
             End Object
             Components(1)=StaticMeshComponent'StaticMeshComponent_0'
          End Actor
       End Level
    End Map
    ==========================================
    Image:

    Click image for larger version

Name:	Scenecapturefix.jpg
Views:	1
Size:	78.4 KB
ID:	3253969
    ================================================== ==============
    SceneCaptureReflectActorFIX

    ================================================== ==============
    Code:
    class SceneCaptureReflectActorFIX extends SceneCaptureReflectActor
        placeable;
    
    
    defaultproperties
    {
        // used to apply the reflection material for visualization
        Begin Object Name=StaticMeshComponent0
            HiddenGame=FALSE
            CastShadow=false
            bAcceptsLights=false
            Scale3D=(X=4.0,Y=4.0,Z=4.0)
            StaticMesh=StaticMesh'EditorMeshes.TexPropPlane'
        End Object
        StaticMesh=StaticMeshComponent0
        Components.Add(StaticMeshComponent0)
    }
    ================================================== ================================================== ============================
    Notes:
    • This simply shows the actor in game, as by default it is hidden/ only shows in editor
    • I experienced alot of trouble the normal scenecapturereflectactor when rendering in tight/ long corridors with small ceilings (the material would not render correctly, p!ssed me off for ours)
    • ↑↑↑This fixes that issue for me.↑↑↑

    ================================================== ================================================== ============================

    #2
    I would recommend not to use such script at all as it needs to be packaged along the map. You can easily add the StaticMesh camera to the actor by modifying the T3D snippet. This won't need a external script then.


    Originally posted by TKBS View Post
    If i release this mod as "SceneCapture2DActorFix" Will i be able to include this source code in My custom gametype without interfering?
    Example: If people download and use this, then later i release a custom gametype with this code included ^^
    Why would it interfere with your game type. You add that special actor to your maps. As you have to package the map, it wil interfere with the script file "SceneCapture2DActorFix.u" only.

    Comment


      #3
      Ty for response, i thought it would Might just call it "SC2DAF.uc" instead.

      You can easily add the Static Mesh camera to the actor by modifying the T3D snippet. This won't need a external script then.
      ^^ dunno what your talking about with that, [unless you mean copy paste it from map to text file, add the sprite code and then paste it back (like how to add enforcer pickup to map style).
      Either way it doesn't matter because information like that is most useful prior to making the mod... doesn't really help me after tbh, although it is appreciated
      - However if you explain yourself a bit better others may benefit from it so feel free to do so and ill paste your info/ quote into the OP.


      Thank you for your input RattleSN4K3.


      Comment


        #4
        Paste into a viewport (CTRL+V or Edit->Paste). A new SceneCaptureActor2D will be created at (0,0,0).
        Code:
        Begin Map
           Begin Level
              Begin Actor Class=SceneCapture2DActor Archetype=SceneCapture2DActor'Engine.Default__SceneCapture2DActor'
                 Begin Object Class=StaticMeshComponent Name=CamMesh0 ObjName=StaticMeshComponent_0 Archetype=StaticMeshComponent'Engine.Default__SceneCapture2DActor:CamMesh0'
                    StaticMesh=StaticMesh'EditorMeshes.MatineeCam_SM'
                 End Object
                 Components(1)=StaticMeshComponent'StaticMeshComponent_0'
              End Actor
           End Level
        End Map

        Comment


          #5
          I thought you meant that. Thanks for the tip! I have added it to the first post and popped you in the credits.
          - I also added a second actor fix. After spending too much time trying use the SceneCaptureReflectActor i gave up and used a similar fix.

          Comment

          Working...
          X