Thread: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

Page 1 of 2 12 LastLast
Results 1 to 25 of 37

Hybrid View

  1. #1
    Administrator JPolito's Avatar  
    Manager
    Join Date
    Apr 2004
    Posts
    7,525

    New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    These entities were released with Sven Co-op 5.11. They are experimental and may be changed in a future release.

    Mirrors/Monitors/Portals only work when the game is running in 'Windowed' mode. This will be addressed in a future release.

    A demonstration map has been created to give mappers an example of how to use Mirrors/Monitors/Portals. Tutorials will be written later, but if you'd like to look at the map, please download it here.



    Known Issues:
    - Minimizing and re-opening the game before entering the mirror room (and possibly other rooms) causes your player model to become Barney.
    - Player model colors sometimes appear as the default colors.
    - Chrome on models may look incorrect.
    - If you enter the miniature skybox, you'll notice that there is a blue outline around the scaled-down platform. This is caused by a broken shader, which will be fixed in the next release. Fixed.
    - The default 'Start on' behavior is currently broken, which will be fixed in the next release. Mirrors/Monitors/Portals need to be set to 'Start Disabled' and manually triggered after the map starts. Fixed.
    - Monitors cannot have their targets changed. Fixed.



    Env_render_invidual (point entity):

    Changes the visual appearance of entities for one player or a group of players. Works in a similar fashion to env_render, except it is only visible to the target player or group of players.

    Keyvalues:

    target(string) : "Entity to affect"

    netname(string) : "Player to affect"

    message(string) : "Entity to copy from"

    rendermode(choices) : "Render Mode" : 0 =
    • 0: "Normal"
    • 1: "Color"
    • 2: "Texture"
    • 3: "Glow"
    • 4: "Solid"
    • 5: "Additive"


    renderamt(integer) : "FX Amount (1 - 255)"

    rendercolor(color255) : "FX Color (R G B)" : "0 0 0"

    Spawnflags:

    1: "No Renderfx" - Do not apply RenderFX keyvalue.
    2: "No Renderamt" - Do not apply Renderamt keyvalue.
    4: "No Rendermode" - Do not apply Rendermode keyvalue.
    8: "No Rendercolor" - Do not apply Rendercolor keyvalue.
    16: "Auto Apply" - Apply the values as soon as the map starts.
    32: "Start On" - Entity will be active as soon as the map starts.
    64 : "Affect Activator (ignore netname)" - Affect the entity's activator only. Ignores the netname (player to affect) keyvalue.
    128 : "Use Entity to copy from" - Entity specified by 'Entity to copy from' keyvalue is used as a template from which render values are copied.



    Func_mirror (brush entity):

    Can be used to create mirrors. Does not need an origin brush to function.

    Keyvalues:

    zoom(integer) : "Zoom" : 1
    • Scale of the image being displayed on the surface of the entity.


    fps(integer) : "Max FPS" : 0
    • Frames per second rendered by the entity.


    textureMode(choices) : "Texture Mode" : 1
    • Determines which textures on the brush will render the mirror/monitor/portal.
      • 0 : "{ Textures"
      • 1 : "All Textures"
      • 2 : "Named Texture"


    textureName(string) : "Texture Name"
    • Name of the texture that will be used to render the mirror/monitor/portal. Only used when textureMode is set to 2 (named texture).


    Spawnflags:

    1: "Solid" - Entity will be solid.
    2: "Start Disabled" - Entity must be triggered to work.
    16: "Render only every 2nd frame" - Entity will only render an image every second engine frame. May improve performance.



    Func_monitor (brush entity):

    Can be used to create display screens that render a camera view onto a surface. Does not need an origin brush to function.

    Keyvalues:

    target : "Target" : 1
    • The name of a trigger_camera entity which will be used as the source of the monitor's displayed image.


    zoom(integer) : "Zoom" : 1
    • Scale of the image being displayed on the surface of the entity.


    fps(integer) : "Max FPS" : 0
    • Frames per second rendered by the entity.


    textureMode(choices) : "Texture Mode" : 1
    • Determines which textures on the brush will render the mirror/monitor/portal.
      • 0 : "{ Textures"
      • 1 : "All Textures"
      • 2 : "Named Texture"


    textureName(string) : "Texture Name"
    • Name of the texture that will be used to render the mirror/monitor/portal. Only used when textureMode is set to 2 (named texture).


    width(integer) : "Width (Resolution)" - Width-resolution (in pixels) of the monitor, independent of the scale of the texture used on the monitor. Default is 512.

    height(integer) : "Height (Resolution)" - Height-resolution (in pixels) of the monitor, independent of the scale of the texture used on the monitor. Default is 512.

    Spawnflags:

    1: "Solid" - Entity will be solid.
    2: "Start Disabled" - Entity must be triggered to work.
    16: "Render only every 2nd frame" - Entity will only render an image every second engine frame. May improve performance.



    Func_portal (brush entity):

    Can be used to create 3D sky boxes and portals into other rooms. Needs an origin brush to function correctly.

    Keyvalues:

    target : "Target" : 1
    • The name of a target entity at which the portal will render a 3D projection from. Usually an info_target.


    zoom(integer) : "Zoom" : 1
    • Scale of the image being displayed on the surface of the entity.


    fps(integer) : "Max FPS" : 0
    • Frames per second rendered by the entity.


    textureMode(choices) : "Texture Mode" : 1
    • Determines which textures on the brush will render the mirror/monitor/portal.
      • 0 : "{ Textures"
      • 1 : "All Textures"
      • 2 : "Named Texture"


    textureName(string) : "Texture Name"
    • Name of the texture that will be used to render the mirror/monitor/portal. Only used when textureMode is set to 2 (named texture).


    Spawnflags:

    1: "Solid" - Entity will be solid.
    2: "Start Disabled" - Entity must be triggered to work.
    4: "Teleport" - Portal will teleport some objects to the destination image.
    8: "No GL ClipPlanes" - Usually when a portal is rendered, everything between the player and the area that the portal shows is clipped away. Usually you want this enabled, but you might want to disable this feature when creating concave portals (e.g. for 3d skyboxes).
    16: "Render only every 2nd frame" - Entity will only render an image every second engine frame. May improve performance.
    Attached Files Attached Files
    Last edited by Hezus; 14-05-2018 at 03:58 PM.

  2. #2
    Administrator JPolito's Avatar  
    Manager
    Join Date
    Apr 2004
    Posts
    7,525

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    These previously-existing entities were altered with the release of Sven Co-op 5.11.



    Trigger_Camera:

    Keyvalues:

    m_iszASMouseEventCallbackName(string) : "AS Mouse Event Callback Name"
    • Signature for AS callback method is: bool YourMouseEventCallbackName(CBaseEntity@ pCamera, CBaseEntity@ pPlayer, CBaseEntity@ pEntity, int mouseEvent, int mouseEventParam, float screenX, float screenY, Vector mousePosition, Vector clickDirection, Vector clickPlaneNormal, float scale)
      • pCamera - the camera entity calling this method
      • pPlayer - the player who created the mouse event
      • pEntity - the entity "hit" by the cursor (if any)
      • mouseEvent - one of:
        • MOUSE_RELEASED = 0;
        • MOUSE_PRESSED = 1;
        • MOUSE_DOUBLE_PRESSED = 2;
        • MOUSE_DRAGGED = 3;
        • MOUSE_POS_CHANGED = 4;
        • MOUSE_WHEEL_SCROLLED = 5;
      • mouseEventParam - depends on the event:
        • if event is MOUSE_WHEEL_SCROLLED, mouseEventParam is the scrollDelta (usually: 1, 2, 3 or -1, -2, -3)
        • if event is any other, mouseEventParam is one of:
          • MOUSE_BUTTON_LEFT = 0;
          • MOUSE_BUTTON_RIGHT = 1;
          • MOUSE_BUTTON_MIDDLE = 2;
      • screenX - x coordinate of the mouse cursor on screen (from -1 to 1)
      • screenY - y coordinate of the mouse cursor on screen (from -1 to 1)
      • mousePosition - the position of the mouse cursor in world coordinates
      • clickDirection - the direction from the camera origin to the cursor "hit" point, basically: (camera->origin - mousePosition).Normalize()
      • clickPlaneNormal - the normal vector of the surface that was hit by the mouse cursor
      • scale - if clicked through a portal with scale, this is the final scale (useful for scaling explosions or other visual/physical effects caused by the mouse event), usually this will be 1.0


    m_iszOverridePlayerTargetname(string) : "Set Player Targetname"
    • Sets a player's target name when they use the camera, unsets it, when they stop using it


    m_iszTargetWhenPlayerStartsUsing(string) : "Target when player starts using"
    • Target to be triggered when a player starts using the camera.


    m_iszTargetWhenPlayerStopsUsing(string) : "Target when player stops using"
    • Target to be triggered when a player stops using the camera.


    max_player_count(integer) : "Max Players" : 1
    • Maximum players allowed to view the camera at once. This is ignored when the 'All Players' spawnflag is used.


    max_player_target(string) : "Target: Player tried to use, but Max Players reached"
    • Target to trigger when a player tries using the camera, but max players has already been met.


    hud_health(choices) : "HUD: Health and Battery"
    • Hide the HUD health and battery values when the camera is enabled
      • 0 : "Show Health and Battery"
      • 1 : "Hide Health and Battery"

    hud_flashlight(choices) : "HUD: Flashlight"
    • Hide the HUD flashlight icon when the camera is enabled
      • 0 : "Show Flashlight"
      • 1 : "Hide Flashlight"

    hud_weapons(choices) : "HUD: Weapons"
    • Hide HUD weapons when the camera is enabled
      • 0 : "Show Weapons"
      • 1 : "Hide Weapons"

    cursor_sprite(sprite) : "Custom Cursor (Sprite)"
    • Name of a custom sprite that will be used as the mouse cursor in the camera view.


    Spawnflags:

    32: "No Instant Turn" - Used to be 'Instant Turn', but never worked. This flag will now disable instant camera turning, which causes the camera to slowly turn to face its target when enabled.
    512: "Ignore Hold Time" - Camera will ignore its hold time and will only turn off when re-triggered. Useful for camera menus that have an 'exit' button.



    Miscellaneous:

    Added useType (USE_ON, USE_OFF, USE_SET, USE_TOGGLE) to func_button, func_rot_button, momentary_rot_button, and button_target.
    Last edited by AdamR; 15-04-2017 at 08:07 AM.

  3. #3
    Registered User
    Join Date
    Jun 2007
    Posts
    33

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    Is there a test map available for the new entities?

  4. #4
    Registered User
    Join Date
    Mar 2017
    Posts
    6

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    working in a deathrun map with portals and cameras, lets see...

  5. #5
    Registered User
    Join Date
    Mar 2017
    Posts
    6

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    The instructions are not clear, the entities dont work as intended and too much .wad for this hammer build.

    Any .map example?

  6. #6
    Administrator JPolito's Avatar  
    Manager
    Join Date
    Apr 2004
    Posts
    7,525

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    I will create a demo map now. Probably should have done this before the release, but, better late than never.

  7. #7
    Registered User
    Join Date
    Dec 2016
    Posts
    29

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    Quote Originally Posted by JPolito View Post
    Mirrors/Monitors/Portals only work when the game is running in 'Windowed' mode. This will be addressed later.
    That's a huge problem. Portals can't be used in any meaningful way gameplay-wise until every player is able to see them.
    Can you give any ETA for the feature? Weeks or possibly months?

  8. #8
    I'm in your Sven Co-op, coding stuff Protector's Avatar  
    Programmer
    Join Date
    Sep 2003
    Location
    Basel, Switzerland
    Posts
    678

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    Quote Originally Posted by pekhe View Post
    Portals can't be used in any meaningful way gameplay-wise until every player is able to see them.
    Correct. It's an experimental feature. It's not meant to be used in final maps, it's meant to be used by mappers to play around with and possibly find bugs, so we can address them before making the feature final.

    Can you give any ETA for the feature?
    No.

  9. #9
    Registered User
    Join Date
    Jun 2007
    Posts
    33

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    I was not able to get the brush entities to function either.
    How do you "connect" portals?

  10. #10
    Registered User
    Join Date
    Dec 2016
    Posts
    29

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    Quote Originally Posted by vonje View Post
    I was not able to get the brush entities to function either.
    How do you "connect" portals?
    When creating the func_portal brush entity, make sure to include a block covered with "origin" texture (similar to rotating doors), and place it in the middle of the portal surface.
    Then change the "Target" value in the func_portal to reference an "info_target" point entity.


  11. #11
    Administrator JPolito's Avatar  
    Manager
    Join Date
    Apr 2004
    Posts
    7,525

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    Demo map has been uploaded. See the first post's attached files.

    I'll try to write tutorials for each entity later, but for now you can probably learn how to set things up by looking at the source files.



    Known Issues:
    - If you enter the room with portals before you enter the skybox, the portals will be rendered through the skybox and will cause extremely low framerates. I'll reorganize the map later.
    - If you enter the miniature skybox, you'll notice that there is a blue outline around the scaled-down platform. This is caused by a broken shader, which will be fixed in the next release.
    - The default 'Start on' behavior is currently broken, which will be fixed in the next release. Mirrors/Monitors/Portals need to be set to 'Start Disabled' and manually triggered after the map starts.
    - Minimizing and re-opening the game before entering the mirror room (and possibly other rooms) causes your player model to become Barney.
    - Monitors cannot have their targets changed.


    If anyone has any requests for things to be added to the demo map, post here or mention it to me on Discord and I'll try to get it in.
    Last edited by JPolito; 30-04-2017 at 02:01 PM.

  12. #12
    snarks snarks snarks snarks snarks snarks snarks snarks Green Astronauts's Avatar
    Join Date
    Mar 2013
    Location
    Nijmegen, the Netherlands
    Posts
    207

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    That's really neat :O
    In-game name:


    Administrator at the ModRiotGaming servers

  13. #13
    Registered User
    Join Date
    Mar 2017
    Posts
    6

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    Thanks for the example map. I like your use of Hints and Skip

  14. #14
    Registered User
    Join Date
    Jun 2007
    Posts
    33

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    That 4D cube stupefies me more than anything.

  15. #15
    Mr. Charmander NinjaBlack1337's Avatar
    Join Date
    May 2016
    Posts
    33

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    Wow func_portal is useful! it's now i can makes easy. amazing job

  16. #16
    snarks snarks snarks snarks snarks snarks snarks snarks Green Astronauts's Avatar
    Join Date
    Mar 2013
    Location
    Nijmegen, the Netherlands
    Posts
    207

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    I noticed a number of visual oddities in 2160p windowed mode. Notably: In mirrors and portals, everything looks wider than it is.
    See this video:


    These oddities also occur in 1440p windowed but not in 1080p windowed, or at least not as far as I can see (except for that one bug with the large monitor changing the aspect ratio of the view shown).

    Really cool that the spraypaint is visible in the 3D skybox though. I was hoping for that
    Last edited by Green Astronauts; 18-04-2017 at 02:20 AM.
    In-game name:


    Administrator at the ModRiotGaming servers

  17. #17
    Administrator JPolito's Avatar  
    Manager
    Join Date
    Apr 2004
    Posts
    7,525

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    Oh wow, nice find. This is why these entities are still 'experimental'. Hopefully this is easy enough to fix.

  18. #18
    Mr. Charmander NinjaBlack1337's Avatar
    Join Date
    May 2016
    Posts
    33

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    There's something, i find the func_portal. anyway i died telefrag by entities(grenade? and others aswell)

  19. #19
    Silencer Lt.JC's Avatar  
    Tester
    Join Date
    Dec 2003
    Location
    Germany
    Posts
    1,246

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    I can confirm the bugs found by NinjaBlack1337, played the test map with a friend and he was standing in one of th portals. I threw a satchel charge in there and he gibbed. Then I tried to do it while I'm standing in there myself and I died. One time it even froze the whole game.

    Also I don't know if this is specific to the ___portals map but I noticed when playing with more than one player only one of us (probably the activator) could see the effects.

    For example I was the first to enter the mirror room so I triggered them and I saw the mirrors but he didn't. Then he was the first to enter the 3D skybox room and I couldn't see it only a big box which was actually the func_portal (just not activated for me)


    But for some reason the portal room was working fine for both of us.
    Born to Fight,
    Trained to Kill,
    Taught to Survive,
    and told to take no Prisoners.
    Visit http://www.youtube.com/NostalgicGames

  20. #20
    snarks snarks snarks snarks snarks snarks snarks snarks Green Astronauts's Avatar
    Join Date
    Mar 2013
    Location
    Nijmegen, the Netherlands
    Posts
    207

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    By sheer accident I found another freak bug related to portals:
    If you're running the game in fullscreen mode, so that portals don't work, and you try to throw a crowbar through a portal, the game instantly freezes. I tried this three times in a row, specifically:
    1) With the round portal in the floor (listenserver freeze caused by a client)
    2) With the round portal in the floor, again (listenserver freeze caused by the host)
    3) With the door-shaped portal near it (listenserver freeze caused by the host, again)

    Haven't tried any other items, but throwing a crowbar through a functioning portal (read: when running the game in windowed mode) works fine.

    To make things worse: If player A (playing in windowed mode) activates a portal and it doesn't render for player B (despite B also playing in windowed mode), the game will freeze / server will freeze (whichever is applicable) if B tries to throw a crowbar through the non-rendering portal...

    Edit: A helpful player named BlueIsTrue joined my server and informed me that you can run Sven Co-op in fullscreen with the launch option "-nofbo" and have mirrors, monitors and portals still render!
    (doesn't solve the freezing problems though)
    Last edited by Green Astronauts; 18-04-2017 at 10:10 PM.
    In-game name:


    Administrator at the ModRiotGaming servers

  21. #21
    Registered User
    Join Date
    Apr 2017
    Location
    North Carolina, USA
    Posts
    1

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    Quote Originally Posted by Green Astronauts View Post
    By sheer accident I found another freak bug related to portals:
    If you're running the game in fullscreen mode, so that portals don't work, and you try to throw a crowbar through a portal, the game instantly freezes. I tried this three times in a row, specifically:
    1) With the round portal in the floor (listenserver freeze caused by a client)
    2) With the round portal in the floor, again (listenserver freeze caused by the host)
    3) With the door-shaped portal near it (listenserver freeze caused by the host, again)

    Haven't tried any other items, but throwing a crowbar through a functioning portal (read: when running the game in windowed mode) works fine.

    To make things worse: If player A activates a portal and it doesn't render for player B (despite B playing in windowed mode), the game will freeze / server will freeze (whichever is applicable) if B tries to throw a crowbar through the non-rendering portal...

    Edit: A helpful player named BlueIsTrue joined my server and informed me that you can run Sven Co-op in fullscreen with the launch option "-nofbo" and have mirrors, monitors and portals still render!
    (doesn't solve the freezing problems though)
    I've made a imgur gallery describing the following cvars
    cl_portal_disabled
    cl_portal_quality
    cl_mirror_disabled
    cl_mirror_quality
    cl_monitor_disabled
    cl_monitor_quality

    http://imgur.com/gallery/ErBdh

    Edit: Didn't notice the changelog described the new cvars, so I've edited my post a little, hopefully nobody notices
    Last edited by BlueIsTrue; 19-04-2017 at 03:22 PM.
    Code:
    Developer 1
    //Values of 2 and above is overkill spam

  22. #22
    Registered User CubeMath's Avatar
    Join Date
    Dec 2016
    Posts
    23

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    I have a suggestion to this feature.

    func_mirror should mirror Gauss-Lasers and Gluon-Lasers.
    Maybe env_laser's too if possible.

  23. #23
    I'm in your Sven Co-op, coding stuff Protector's Avatar  
    Programmer
    Join Date
    Sep 2003
    Location
    Basel, Switzerland
    Posts
    678

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    Quote Originally Posted by CubeMath View Post
    I have a suggestion to this feature.

    func_mirror should mirror Gauss-Lasers and Gluon-Lasers.
    Maybe env_laser's too if possible.
    This is on my todo list, but with low priority.

  24. #24
    Registered User
    Join Date
    Apr 2017
    Posts
    1

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    How to install map?

  25. #25
    snarks snarks snarks snarks snarks snarks snarks snarks Green Astronauts's Avatar
    Join Date
    Mar 2013
    Location
    Nijmegen, the Netherlands
    Posts
    207

    Re: New Entities & Features in 5.11 (Mirrors/Monitors/Portals, env_render_individual)

    Put the file ___portals.bsp in your ...\Sven Co-op\svencoop_addon\maps\ folder, then start the game and start a new server on the map ___portals
    In-game name:


    Administrator at the ModRiotGaming servers

Page 1 of 2 12 LastLast

Posting Permissions

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