x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Sphere portal

This effect have been around a long time already... however no tutorial on it whatsoever. Can finally someone who know - share the blueprint/material set up behind it please?

https://www.youtube.com/watch?v=uAnlIMH247o and https://youtu.be/6aflOXRrGTI?t=55 and https://www.youtube.com/watch?v=y29vnA-5_cI

...I forgot to say - I am interested in the visual part of the effect primarily!! making this easy to explain?... I already know how to "teleport" with the existing tutorials...

Product Version: UE 4.19
Tags:
more ▼

asked Jul 13 '18 at 01:06 AM in Using UE4

avatar image

Lyubomir Iko
3 1 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

There are plenty of tutorials for it if you look up how to make portals. You have to use a scene capture and make a material using that capture applying it to the object that will be the portal, the tutorials on youtube use rectangular shapes but nothing is stopping you from applying the material to a sphere and it will still work and just look like a sphere instead.

more ▼

answered Jul 13 '18 at 01:25 AM

avatar image

Enjobg
121 1 3 5

avatar image Lyubomir Iko Jul 13 '18 at 02:40 AM

Oh boy, that answer... When I follow existing tutorials on plane portals but try to implement scene capture to a sphere I get all kind of problems that I cant solve. I am just visual artist, I dont understand much of what actually is going on, especially in blueprint in order to debug or invent. So I am asking politely for a working tutorial.

avatar image Enjobg Jul 13 '18 at 10:14 AM

Well depending on how advanced you want it to be there may be some differences however the basics are no different than the tutorials on youtube. Following just this https://www.youtube.com/watch?v=F28NKqG7ce8 tutorial it works with no problems (here's the result https://streamable.com/b99zt ). One thing to note is that I am rotating the 2D capture camera to look towards the same direction as the player camera, otherwise the portal will always look at the same direction no matter what angle you look at it from, that is done with this little blueprint.

alt text

As for any other visual effects like how it looks "fluid" at the corners on one of the videos that's playing around with the material, I'm not good at that stuff but just looking up some material tutorials and using the capture as the texture works good as it can be seen herealt text

avatar image Lyubomir Iko Jul 13 '18 at 07:00 PM

I have follow that tutorial many times, and I get exact problem you describe. My math and logic are tragic so my best bets are to follow strictly tuts...

Following your BP I dont know how to get call "Scene capture component 2D" from the portal actors? alt text And how to plug it to the rest... alt text

So can you upload the whole blueprint screenshot and solution to "Scene capture component 2D" node problem... :-/ Thanks?!

avatar image Enjobg Jul 13 '18 at 07:37 PM

Ah, you seem to be doing that in the level blueprint, I generally tend to avoid the level blueprint and do my coding inside the actual blueprint actors so my previous screenshot is my whole blueprint except for the teleport logic. The way I get the scene capture 2D reference is simply by dragging it over from the components list to the blueprint but it should also appear when you right click and write it's name.

alt text

If you're only going to have like 2 portals per level it's fine doing it this way, but ideally you want to have a single blueprint for all the portals and have a way to setup which portal it's linked to while designing the level.

The part I took from the tutorial was the actual Scene Capture setup (making the render targets and materials and applying them to the sphere) the result of which is this https://streamable.com/x3zwe , after that I just add my blueprint to the portal actors and get the result from my previous comment.

I'm not sure what you were trying to do with the math over there but you were setting the locations of the portals to be relative to the player character which makes them move their position as the player moves, you don't need to use the SetWorldLocationAndRotation just SetWorldRotation with the rotation being that of the player camera should do the job unless you're looking for the portals to be looking at specific directions.

avatar image Lyubomir Iko Jul 13 '18 at 10:55 PM

Finally some working results! Thank you so much! Your set-up make way more sense indeed, way more clean and short than the tutorial on youtube o:

I still have two questions however... oh boy sorry if I bother you but I have to try:

  1. The view from the teleport didn't scale down relative to the distance of observer, making some king of unwanted zoom effect :/

  2. What is the logic to implement it with the sequence camera?...

My lack of logic get me to nowhere D: alt text

avatar image Enjobg Jul 14 '18 at 08:50 AM

1) Yeah that's one of the little problems, I'm not sure how to fix that exactly I don't use the material editor often but it playing around with the UV gives me different results so that could be one way to do it, it's just that when I get it to scale properly it just looks awful and the rotation also breaks making it look really strange when looking around it.

2) For a sequence camera for me it works just by using the view target from the controller like this alt text

If you're going to switch between sequence and gameplay that might actually not work so you might need an alternative. Some extra nodes checking if it's a sequence or a gameplay and setting it depending on that can solve that but I'm sure there are better solutions that that.

I'll see if I can come up with something about the scale in the next few days if I do I'll make sure to keep you updated.

avatar image Lyubomir Iko Jul 14 '18 at 11:32 AM

I am full with gratitude!!! :) I will watch if you come up with a solution for the scaling issue, however you nailed all of my initial expectation! Respect from Bulgaria!

avatar image Enjobg Jul 14 '18 at 09:12 PM

And I just finished it, it seems to be working nearly perfectly now.

https://streamable.com/g97zj

However I did remake the whole blueprint now I use 1 blueprint for multiple portals instead of a separate blueprints for each portal. It should still work with the new tick it's just one variable which you will have to change to fit your blueprint or just download my project ( https://drive.google.com/open?id=1kzAUZ4-5F5pUHmfOwLBdcDe8FpQSqyiG )

As for the blueprint logic itself this is how I do the scaling

Event Tick - first it figures out which camera is active (sequence or player) and calls a custom event alt text

SetupCapture - this is the custom event, it sets the location and rotation of the Scene Capture 2D inside the portal that will be the exit, the location is based on the relative location of the player compared to the entrance portal and in the end calls another custom event that finds all the actors that are between the screen capture and the portal and hides them because they'll get in the way and block the visibility of the portal alt text alt text

The exit portal reference is just a variable of the Portal blueprint type. If you're trying my project the way the portal connections are setup is you put the portal(s) in the level and in the details panel you select the exit portal and the render target for the current portal (so if portal A goes to portal B exit portal is portal B and the render target is the one for portal A)

alt text

P.S. I'm from Bulgaria too :)

avatar image Lyubomir Iko Jul 14 '18 at 11:50 PM

You got new mail ! :P

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question