Render entity from unlimited distance

User avatar
ratmix
Member
 
Posts: 148
Joined: Mon May 01, 2017 19:45
In-game: ratmix

Render entity from unlimited distance

by ratmix » Sun Mar 10, 2019 19:04

I have a problem with max draw distance for entities set by active_block_range and active_object_send_range_blocks.

I need a large entity (a wall) to be visible from up to 2000 blocks away. I would need to set active_block_range to 125 (125x16 = 2000 blocks) to ensure players would see the entity. This would likely kill the server (and client). What I'm looking for is a way to send a specific entity to the client which is located at an unlimited distance from their player. Is this at all possible?

Image for context (Thanks to Sires for the idea)...
Image
King of the Hill :: Modern Warfare Server RATMIX.COM:30000 | King of the Hill Community Site
 

User avatar
sorcerykid
Member
 
Posts: 1061
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
GitHub: sorcerykid
In-game: Nemo

Re: Render entity from unlimited distance

by sorcerykid » Mon Mar 11, 2019 17:28

To my knowledge, this is currently impossible because activation and deactivation of SAOs are managed entirely on the CPP side. Is there a reason this entity has to be visible from so far away? Even if there was a workaround (like hacking the ServerEnvironment::deactivateFarObjects() function), there are likely to be unanticipated side effects since SAOs are supposed to be removed when active blocks are deactivated.

Edit: It just occurred to me that perhaps you mean that you want the wall to be visible from any lateral distance, not from 2000 meters in front of the player. If that's the case then why not just create 16x16 entities and tile them along the XY or ZY plane? That would still provide the illusion of what you want, and probably better rendering performance.

On a sidenote, I believe somebody mentioned on #minetest-hub a few weeks ago about "pre-rendering" scenes via custom skyboxes. That might be another way to accomplish what you want (altho I don't know if it was just a proposal, or if the method is already supported).
 

User avatar
texmex
Member
 
Posts: 1588
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: Render entity from unlimited distance

by texmex » Mon Mar 11, 2019 18:42

IIRC correctly then player entities have no limit of how far away they will render. Thus the ugly hack would be to somehow render a boxy player wher the wall should be xD
 

User avatar
ratmix
Member
 
Posts: 148
Joined: Mon May 01, 2017 19:45
In-game: ratmix

Re: Render entity from unlimited distance

by ratmix » Mon Mar 11, 2019 19:46

sorcerykid wrote:perhaps you mean that you want the wall to be visible from any lateral distance, not from 2000 meters in front of the player


Thanks for the reply. That's correct, I just need the player to see the wall if they are within about 150 blocks adjacent to and within 2000 blocks laterally of the wall entity position. Tiling will create overlaps thereby reducing opacity (which I need)...
Image
In addition, I need to move 6 walls every second so tiling would create a lot of demand on the server. Just trying to keep lag to a bare minimum.

texmex wrote:IIRC correctly then player entities have no limit of how far away they will render. Thus the ugly hack would be to somehow render a boxy player where the wall should be xD


You might be on to something.
King of the Hill :: Modern Warfare Server RATMIX.COM:30000 | King of the Hill Community Site
 

User avatar
sorcerykid
Member
 
Posts: 1061
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
GitHub: sorcerykid
In-game: Nemo

Re: Render entity from unlimited distance

by sorcerykid » Mon Mar 11, 2019 20:17

Out of curiosity, why are translucent nodes out of the question? It seems that you are trying to adapt an entity to behave in every respect like a wall of nodes, but I'm not sure why.
 

User avatar
ratmix
Member
 
Posts: 148
Joined: Mon May 01, 2017 19:45
In-game: ratmix

Re: Render entity from unlimited distance

by ratmix » Mon Mar 11, 2019 22:00

A wall of nodes means I need to remove and add up to 48 million nodes every second (4000x4000x6walls). Plus, with nodes you will not have a moving animation. I have tried using a node with a really large mesh, but the max render distance is still low, plus the player look direction effects the node's visibility.
King of the Hill :: Modern Warfare Server RATMIX.COM:30000 | King of the Hill Community Site
 

User avatar
sorcerykid
Member
 
Posts: 1061
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
GitHub: sorcerykid
In-game: Nemo

Re: Render entity from unlimited distance

by sorcerykid » Tue Mar 12, 2019 00:39

Ah, I didn't realize you needed animations too. In that case it sounds like what you trying to accomplish is well beyond the scope of what Minetest is designed to do. All the potential workarounds seem to have been exhausted. Realistically, this is something that would probably necessitate a fairly sophisticated engine change (both client and server).
 

Skulls
Member
 
Posts: 108
Joined: Thu Dec 21, 2017 17:41
In-game: Skulls

Re: Render entity from unlimited distance

by Skulls » Tue Mar 12, 2019 03:28

If this is only for single player you may try attaching a huge (but low poly) object to the player so the "wall" follows the player around like a gloomy storm cloud.
 

User avatar
ratmix
Member
 
Posts: 148
Joined: Mon May 01, 2017 19:45
In-game: ratmix

Re: Render entity from unlimited distance

by ratmix » Tue Mar 12, 2019 04:01

sorcerykid wrote:what you trying to accomplish is well beyond the scope of what Minetest is designed to do

I know, but I can't give up. Any idea how I might implement texmex's suggestion about spoofing a player entity to achieve this? When you press 'z' to zoom, the player appears first, before the map blocks load. This is likely because the client already has the player loaded, so I think he has a viable idea.

Skulls wrote:you may try attaching a huge (but low poly) object to the player so the "wall" follows the player

Thanks for the idea, but the wall position must remain relative to the world.
King of the Hill :: Modern Warfare Server RATMIX.COM:30000 | King of the Hill Community Site
 


Return to Modding Discussion



Who is online

Users browsing this forum: sirrobzeroone and 1 guest