{"id":853,"date":"2020-03-06T07:46:13","date_gmt":"2020-03-06T07:46:13","guid":{"rendered":"http:\/\/www.chozabu.net\/blog\/?page_id=853"},"modified":"2024-02-04T14:20:31","modified_gmt":"2024-02-04T14:20:31","slug":"portalsbp-docs","status":"publish","type":"page","link":"http:\/\/www.chozabu.net\/blog\/?page_id=853","title":{"rendered":"PortalsBP Docs"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"894\" height=\"488\" src=\"http:\/\/www.chozabu.net\/blog\/wp-content\/uploads\/2019\/06\/feature.png\" alt=\"\" class=\"wp-image-808\" srcset=\"http:\/\/www.chozabu.net\/blog\/wp-content\/uploads\/2019\/06\/feature.png 894w, http:\/\/www.chozabu.net\/blog\/wp-content\/uploads\/2019\/06\/feature-300x164.png 300w, http:\/\/www.chozabu.net\/blog\/wp-content\/uploads\/2019\/06\/feature-768x419.png 768w, http:\/\/www.chozabu.net\/blog\/wp-content\/uploads\/2019\/06\/feature-250x136.png 250w, http:\/\/www.chozabu.net\/blog\/wp-content\/uploads\/2019\/06\/feature-150x82.png 150w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">By Alex &#8220;Chozabu&#8221; PB &#8211; with some fantastic contributions from Spencer Crapo<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">See on marketplace here: <a href=\"https:\/\/www.unrealengine.com\/marketplace\/portals-blueprint\">https:\/\/www.unrealengine.com\/marketplace\/portals-blueprint<\/a><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>These docs are for 4.23+ &#8211; <\/strong>if using an older version, please check <a href=\"https:\/\/docs.google.com\/document\/d\/1EGjYWL2WrT3Rn-vw6XkyPOA9e7QESiCq1lv1fPZ3YHk\/edit?usp=sharing\">the old docs<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This portal system is designed to allow you to connect two points in space <em>though there are several important limitations<\/em>, see \u201cImportant Notes\u201d at the bottom of the document.<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If this doc does not answer your question, you can ask a question on the marketplace page, contact me on discord: <a href=\"https:\/\/discord.gg\/xeBWY9N\">https:\/\/discord.gg\/xeBWY9N<\/a> or by email ( chozabu+portalsbp@gmail.com).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Usage:<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Adding to Your own project<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>You must enable \u201cGlobal Clip Plane\u201d in project settings.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Migrate over the PortalBP actor.<br><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Creating a portal:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Place two \u201cPortalBP\u201d actors in your level, select \u201cPortalBP\u201d and in the details panel<br><br>Set the \u201cPortalTarget\u201d to \u201cPortalBP2\u201d<br>Select \u201cPortalBP2\u201d and set its \u201cPortalTarget\u201d to \u201cPortalBP\u201d<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/NebZHwlNsVrtsrJbS1zPX9nc-9Sq0jLARoTCuMqL4vO-HOhxrSxpH5a946R_-k5BjxBsHkMegmJ6pDpdexPoZMOGIFmtqeMktx0sCsiEQTfABHyQNFn1Hd7oZsyD9TLNXZgLXq8f\" alt=\"\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Customising Recursion<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"> If you don&#8217;t add a PortalRenderManager to a level &#8211; one will be created OnBeginPlay.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To change its settings (recursion limit) you can either edit the BP to change globally, or add an instance to the level to change just for that level.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Setting up your Player Pawn<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>On your player pawn (if 1st person), you should also implement PortalCameraInterface, and return the players camera location.<br>For a 3rd person pawn, you may still implement, but return the character, or 1st person camera location.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Usually a portal teleports an object when its center enters a portal. The purpose of <strong>PortalCameraInterface <\/strong>is so, with a first person setup, the pawn will teleport when the camera crosses the portal.<br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Additional Setup:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure your project has &#8220;Global Clip Plane&#8221; enabled.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/sJNK8yQYd2ezyZjqKI_PtKyHgkTfqCTZmI9FepTIy7Jxbq8Yl3BcG1KDIxht2o1iCL__Hd_Ja9NgDjEAwFVH64RQiA91rLn5WxCXcqYsBZV-v5jIfmfEW44BUEhB4iSzqdsc98yU\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Also make sure the portals \u201cNear Clip Plane\u201d distance matches your projects  \u201cNear Clip Plane\u201d  if non-standard.<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Anything that should pass through a portal must generate overlap events.<br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Portal Quality:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">-RenderMipScaledownSpeed &#8211; set this value closer to 0 to improve portal quality at a distance, bring it closer to 1 to increase performance at the cost of quality<br>-UseSimpleRenderMethod &#8211; disabled optimisations, should give perfect quality portals<br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Important Notes:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Though an object appears to be on both sides of a portal when touching one &#8211; in terms of physics it is only on one side of the portal. This means you may experience physics weirdness when an object is being pushed through a portal. Again, I have plans to change this in the future, but no promises.<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Performance &#8211; each portal can do a full re-render of the level &#8211; I\u2019ve done some work to optimise here, but keep performance in mind, and check you are not going over your frame-budget.<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SpringArm will not function well &#8211; there is an example of custom 3rd person camera on EPlayer blueprint. Fuzzy Tom also mentions he has had some success with inbuilt spring arm when camera position lag is disabled.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Changelog<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\"><em>v24<\/em> (2021\/10\/15)<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Support UE4.27<\/li>\n\n\n\n<li>Apply fix back to 4.23 for easier upgrades<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><em>v23<\/em><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Support UE4.26<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><em>v22<\/em><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fix portal traces<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><em>v21<\/em> (2020\/08\/17)<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Bi-Directional physics on objects overlapping portals<\/li>\n\n\n\n<li>Handle higher velocity objects better<\/li>\n\n\n\n<li>lots of small tweaks, fixes and some optimisation<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><em>v20<\/em><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>fixed\/better seamless travel <\/li>\n\n\n\n<li>can force lower portals quality for performance <\/li>\n\n\n\n<li>supports more types of objects (and has beter interface+dispatcher) <\/li>\n\n\n\n<li>various other fixes (custom instance mats on skelmesh, nudge on passing through a portal, PortalLineTrace)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><em>v19<\/em><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fix for some scaled portals not being seamless<\/li>\n\n\n\n<li>Fix for recursions failing to render near edge of screen<\/li>\n\n\n\n<li>Demo content Networked (Including Portal guns, and both character types)<\/li>\n\n\n\n<li>unlinked portals are now see through<\/li>\n\n\n\n<li>4.25 support<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><em>v18:<\/em><\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>New &#8220;PortalRenderManager class by &#8220;Spencer Crapo&#8221;\n<ul class=\"wp-block-list\">\n<li>Supports recursion between non-paired portals<\/li>\n\n\n\n<li>Customisable recursion limit<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Re-Written Fake recursion focused on camera origin instead of portal center<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><em>v17:<\/em><\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fix portals in packaged builds<\/li>\n\n\n\n<li>Allow more postprocessing through a portal (persist render state enabled on scenecaptures)<\/li>\n\n\n\n<li>Improve procmesh, portals should be seamless at smaller scales<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><em>v16:<\/em><\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Portals can now be placed against a wall<\/li>\n\n\n\n<li>Additional ProcMesh generated to help ensure seamless transition through portal, no need for reducing clip plane<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><em>V15 and older:<\/em><\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Maintain angular momentum through portals<\/li>\n\n\n\n<li>Handle characters and physicsbody based pawns<\/li>\n\n\n\n<li>Interface to get camera position for first person pawns<\/li>\n\n\n\n<li>Tidy up of main BPs<\/li>\n\n\n\n<li>Generate smaller render targets in addition to main screen-matched target, render at lower res when possible<\/li>\n\n\n\n<li>Simple portal gun demo<\/li>\n\n\n\n<li>Fix wall walking pawn, add wizard hat<\/li>\n\n\n\n<li>Debugging ui<\/li>\n\n\n\n<li>Real recursion camera<\/li>\n\n\n\n<li>Third person camera demo &amp; portal trace function<\/li>\n\n\n\n<li>~Many other fixes, tweaks and updates<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Alex &#8220;Chozabu&#8221; PB &#8211; with some fantastic contributions from Spencer Crapo See on marketplace here: https:\/\/www.unrealengine.com\/marketplace\/portals-blueprint These docs are for 4.23+ &#8211; if using an older version, please check the old docs This portal system is designed to allow you to connect two points in space though there are\u2026<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"http:\/\/www.chozabu.net\/blog\/?page_id=853\">Continue reading<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-853","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.chozabu.net\/blog\/index.php?rest_route=\/wp\/v2\/pages\/853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.chozabu.net\/blog\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.chozabu.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.chozabu.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.chozabu.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=853"}],"version-history":[{"count":16,"href":"http:\/\/www.chozabu.net\/blog\/index.php?rest_route=\/wp\/v2\/pages\/853\/revisions"}],"predecessor-version":[{"id":885,"href":"http:\/\/www.chozabu.net\/blog\/index.php?rest_route=\/wp\/v2\/pages\/853\/revisions\/885"}],"wp:attachment":[{"href":"http:\/\/www.chozabu.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}