Download

How to create a "magic door"-effect

Hi!

My name is Lina, I’m a student in visual communication and am currently working on my graduation project!! It centers around tarot readings. Besides creating different tarot cards in 3D I’m building a VR-environment with ue4, where the tarot readings will take place. It’s a bit similar to a card game but the main focus is looking at every card’s different images, there are no game functions involved.

Before I started this project I had no experience in ue4, so I’ve spent a lot of time in tutorials trying to get to know as much as I can and I’m still trying to wrap my head around a lot of stuff. However, I’ve managed to get the basic functions working but have now run into some difficulties and am currently stuck and in need of guidance.

So, to the issue:

Each card I’m making will depict an image consisting of a bunch of different 3D-objects, like a small scene. In my mind I’m visualising these cards as having depth, you can pick up and rotate the card in your hand and look into this 3D-scene, sort of like a parallax-effect. Or like looking into a box but you only see the ”hole”. I’ve attached images to clarify what I mean.

I have have managed to create this effect before (in AR) (and not in ue4) by using occluder-objects that block/cull whatever I want to block but I can’t manage to find a similar solution in ue4.

I’ve tried using scene capture components and created render target materials on a card to ”fake” the effect, but I feel like there should be better ways to create what I want. Used this tutorial: UE4 Tutorial: How To Build A Seamless Unreal Portal Door - YouTube

I’ve tried material cutoff effects that is controlled by another objects position but that is also a bit messy and does not really do what I want it to. Looked at this tutorial for that: Material Cutoff Effect Tutorial - (UE4) - YouTube

So, if anyone have any advice on how I could make this idea come to life I would be forever grateful. Or if someone has tips on tutorials I could look at, that could point me in the right direction :slight_smile: Many many thanks in advance.


Above: a sketch of what I have in mind
Below: reference of what it could look like
parallaxeffect_reference.gif

Hey sounds a cool idea… Never done anything like it before, but think you could be on the right track using camera feed render target materials…

You could then get some surreal effects through some funky camera movement so when tilting the card rather than just tilting the camera you also move the camera so it keeps the same focus point but changes its pov…? Would then be pretty easy to create different scenes for each of the cards by just switching cameras…

(tutorial you mentioned & https://www.youtube.com/watch?v=jWRkM-95k2I)

Not sure but you can use portals, with your own tweaks

I believe that something called ‘render to texture’ will do what you want. It’s a bit complicated and I haven’t looked at it in some time. But google should tell you what you need to know.

Look up “depth expressions”, “post process materials”, and “vector fields”. Those would be three functions in Unreal that I would utilize for such effects. The render target is another one, but it’s a bit more complex than others, I think. You’ll probably need to create a material function that projects the scene into / on the card, and meld it somehow with blueprints that do the render targeting and other facets to get the parallax and 3D-in-the-card effect. Parallax occlusion mapping is definitely something to consider using in materials, perhaps for the textures of objects in a card’s scene. However, it’s insufficient by itself to get the effect of turning the card to see only certain things, and seeing into the card. Doing a scene inside a card most likely requires building the scenes independently from the card, and then setting up a camera or set of cameras (such as extras for post processing) to capture the scene, project it to the card with render targets and depth expressions (is going to involve math, including calculating camera angle and camera vector from player view relative to card rotation), and enhancing and finishing the effects and look with post process materials and/or simply post process volume stuff. Triggers are going to be needed for initializing the cards’ 3D and seeing-into-it perspectives upon picking up of cards, and probably other actions. Vector fields would be useful for getting magic visual effects to occur inside or around the card, and can use triggers in blueprints to cause changes in those magic visuals…so those are more of an aesthetic enhancing feature to add. “Vector Expressions” are crucial to the design of something like this. You’ll probably also need to transform between the different spaces too a bit, such as transforming from world space to object (aka local) space, and tangent to world space. By default, actors are in tangent space to start.