Page 1 of 1

REAL portals?

PostPosted: Tue Dec 04, 2012 07:51
by OmniStudent
This is not a feature I'm dying to have, but rather something that would have to be worked into the code real early:

What about portals that actually connect to another place, so that you could see into the place and walk into it without any loading or change or world in between?

This would require the minetest to draw the regular landscape, AND the landscape that can be seen through the portal (the hard part) and that enteties that entered a portal would have to be teleported to the portal destination.

This would probably be very complicated, but maybe there's a smart and simple solution somewhere in the basic 3d rendering code.

PostPosted: Tue Dec 04, 2012 14:35
by PilzAdam
I think RealBadAngel wants to code it.

PostPosted: Fri Jan 04, 2013 00:32
by GloopMaster
he means as per Portal.

PostPosted: Fri Jan 04, 2013 01:05
by rarkenin
I don't think Irrlicht can handle this since it needs to draw alternative light paths. Or does it have this functionality?

PostPosted: Sun Jan 06, 2013 17:24
by jordan4ibanez
All you would have to do is have a portal table, with different frequencies. Each portal in the frequency gets how many tables are in the frequency table that it's in on create and portal frequency change, and adds onto it. also when a portal is removed, it gets it's table in the frequency table, and removes the data.
so let's say we have this

portal = {1={x=121,y=4342,z=1232},{x=-23,y=432,z=-444}}

you create a portal at {x=-1,y=0,z=40} so then this is added on

portal = {1={x=121,y=4342,z=1232},{x=-23,y=432,z=-444},{x=-1,y=0,z=40}}

when you enter/rightclick/punch/whatever a portal, it finds it's position in the frequency table and sees if there is another position in front (or if it is the max number in the table it resorts back to 0) of it, it transfers the player there. Easy.

PostPosted: Sun Jan 06, 2013 17:56
by Sokomine
jordan4ibanez wrote:All you would have to do is have a portal table, with different frequencies.

I'm planning to do something similar: A teleporter network where each "net" has a name and teleporters attached to it plus a master knowing where each teleporter is. Didn't get around to code it completely yet :-(

PostPosted: Sun Jan 06, 2013 23:17
by aldobr
Render to texture -> use the rendered texture as the texture of a node.

Using LUA acessible "render to texture" can be used in other mods, like a camera+videoscreen etc.

Basically allow lua to setup adittional cameras besides the player camera. The player camera renders to the screen, the other, aditional cameras, render to a texture in memory.

Then allow lua to refer to those textures and use then as the texture of specific nodes.

Its doable, but i wont do it.