How can I achieve the effect shown in the above picture?
I have seen in the official documentation that the closest method to capturing a screen is through RenderTarget Texture. However, the examples provided on the official website are different from what I actually want. RenderTarget Texture captures the entire screen, and I need texture capture within the scope of this model. How can I achieve this?
Can you elaborate? I do not understand this requirement.
Anyway, looking at the image and depending on whether the effect is 2d or 3d, whether I could see a funnel if I walked around, and whether the efefct will stay on for some time, I can think of:
If it is simple, you could get away with a plane, with a material shader, placed in front of the mesh and facing the camera. I would be curious if the vortex effect could be achieved by animating transparency only. Then you would not need any shader stuff.
The other option I can think of: use post process and position texture (PrepassRenderer or GeometryBufferRenderer). Then you can place the vortex wherever you want (in the world) and with proper perspective.
Or the middle way: use simple post process (no extra renderers), convert origin position of vortex from world to screen space, render. This is like putting a 2d plane in the world but have it affect other meshes in its surrounding. Drawback is the effect is like a billboarded sprite (i.e. you cannot walk around it).
Or make a vortex mesh with a PBR material (sth glass like).
Maybe twirling the UVs:
https://doc.babylonjs.com/toolsAndResources/nme/customFrames/#uv-twirl
or is that a shockwave?:
Or both combined?
If I understand correctly the problem is, apply the portal effect only inside the plane and nowhere else yeah?
One way to do this would be,
- Render an RTT w/ just your portal plane
- calculate just the uvOffsets inside it
- make a post process that applies those uvOffsets
- Profit
Thank you, this is exactly the effect I need
Postmortal to the rescue!!!
ez