Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: .roq videos as textures

  1. #11
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    I tried it but with same result

    it's like the fx is played correctly only in the YZ plane and that the playloopedfx function ignores the last parameter for the up vector, because it should work if we provide both vectors

    in the XZ plane it gets rotated 90 degrees

    (there's a typo in my op, the buggy ones are fxorigin2/4 like i illustrate below, but anyway, if i rotate the fx in EffectsEd 90 degrees, 1 and 3 become buggy, and 2 and 4 are fixed)

    a workaround could be to make 2 different .efx which use the same shader, rotated 90 degrees in EffectsEd; one of them played in all origins of YZ-plane; and the other, played in all origins of XZ-plane, but not rly a beautiful solution lol.

    ty for the help

    Click image for larger version. 

Name:	shot0009.jpg 
Views:	22 
Size:	250.8 KB 
ID:	1632

  2. The Following User Says Thank You to pollo For This Useful Post:

    kung foo man (3rd August 2020)

  3. #12
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Yeah, I remember that something about placing such effects was weird in CoD2..
    Do you spawn them with a bullettrace()? How do they behave on non axis aligned surfaces?
    Maybe changing the type of the effect can help, there were different kinds for decals like bulletholes and such (just a guess)..

  4. The Following User Says Thank You to serthy For This Useful Post:

    kung foo man (3rd August 2020)

  5. #13
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    Quote Originally Posted by serthy View Post
    Yeah, I remember that something about placing such effects was weird in CoD2..
    Do you spawn them with a bullettrace()? How do they behave on non axis aligned surfaces?
    Maybe changing the type of the effect can help, there were different kinds for decals like bulletholes and such (just a guess)..
    yeah it's definitely a bit weird. I spawn them placing script_origins in radiant with a specific rotation per each one, thus their forward vector is (aprox. for other surfaces) the normal vector to each surface.

    I will try later with bullettrace; already did with decal but apparently it doesnt show up in fx ed preview, besides it doesnt let me set the shader framerate.

    This is how it looks in non axis-aligned surfaces with the current solution.



    how it looks in radiant:

    Click image for larger version. 

Name:	test3.png 
Views:	12 
Size:	659.1 KB 
ID:	1633

    thx

  6. The Following 2 Users Say Thank You to pollo For This Useful Post:

    kung foo man (3rd August 2020),serthy (2nd August 2020)

  7. #14
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    I played around abit, and spawned the FX on a tag, but it seems it is the FX, it won't change its upward angle

    PHP Code:
    init()
    {
        
    level thread MonitorPlayer();

        
    level._effect"dog" ] = loadfx"fx/dog.efx" );

        
    precacheModel"xmodel/tag_origin" );
    }

    MonitorPlayer()
    {
        while( 
    true )
        {
            
    level waittill"connected" player );

            
    player thread MonitorButton();
        }
    }

    vs)
    {
        return ( 
    v] * v] * v] * );
    }

    MonitorButton()
    {
        
    self endon"disconnect" );

        while( 
    isDefinedself ) )
        {
            if( 
    self UseButtonPressed() )
            {
                
    start self.origin + ( 64 );
                
    end start vsAnglesToForwardself getPlayerAngles() ) , 10000 );
                
    trace BulletTracestart end false self );

                if( !
    isDefinedtrace"position" ] ) )
                    continue;

                
    vectorToAnglestrace"normal" ] );
                
    up AnglesToUp);
                
    fwd AnglesToForward);
                
    right AnglesToRight);

                
    trace"position" ] + vsfwd 1.1 );

                
    // PlayFx( level._effect[ "dog" ] , p , fwd , up );

                
    thread TagFx7.1 );

                while( 
    self UseButtonPressed() )
                    
    wait0.05 );
            }

            
    wait0.05 );
        }
    }

    TagFxdelay )
    {
        
    tag spawn"script_model");
         
    tag setModel"xmodel/tag_origin" );
          
    tag.origin p;
          
    tag.angles a;

          
    wait0.05 );

          
    PlayFxOnTaglevel._effect"dog" ] , tag "tag_origin" );

            
    // doesnt affect the FX
          
    tag rotatePitch360 );
          
    tag rotateYaw360 );
          
    tag rotateRoll360 );

          
    tag moveZ200 ); // works

          
    waitdelay 0.05 );

          
    tag delete();

    I play around with the FX itself in the Editor, but its a pain in the ass to change it (change, move .efx file to iwd, start game...) it takes ages. And in the FX Editor not even all effects are shown (I cannot see the decals..)

    Click image for larger version. 

Name:	shot0005.jpg 
Views:	10 
Size:	132.9 KB 
ID:	1635

    Last edited by serthy; 2nd August 2020 at 16:46.

  8. The Following 2 Users Say Thank You to serthy For This Useful Post:

    kung foo man (3rd August 2020),pollo (2nd August 2020)

  9. #15
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Some experiments with shaders: https://github.com/nonsensation/CoD2-Shader

    However, texture atlas seems to be more integrated in the engine itself, no luck on that.


  10. The Following 2 Users Say Thank You to serthy For This Useful Post:

    kung foo man (12th August 2020),pollo (10th August 2020)

  11. #16
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    that looks amazing, thx for the effort and sharing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •