Render entity from unlimited distance
Render entity from unlimited distance
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)...
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)...
- sorcerykid
- Member
- Posts: 1841
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: Render entity from unlimited distance
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).
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).
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: Render entity from unlimited distance
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
Re: Render entity from unlimited distance
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)...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
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.
You might be on to something.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
- sorcerykid
- Member
- Posts: 1841
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: Render entity from unlimited distance
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.
Re: Render entity from unlimited distance
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.
- sorcerykid
- Member
- Posts: 1841
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: Render entity from unlimited distance
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).
Re: Render entity from unlimited distance
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.
Re: Render entity from unlimited distance
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.sorcerykid wrote:what you trying to accomplish is well beyond the scope of what Minetest is designed to do
Thanks for the idea, but the wall position must remain relative to the world.Skulls wrote:you may try attaching a huge (but low poly) object to the player so the "wall" follows the player
-
- New member
- Posts: 6
- Joined: Mon Oct 29, 2018 04:13
- GitHub: ExeVirus
- In-game: Just_Visiting ExeVirus
Re: Render entity from unlimited distance
Ratmix, It is possible to do what you are thinking with just meshes I think. What you would do is define an .obj file with your wall really far from it's local 0,0,0. Then the wall object would hopefully be in the line of sight of a given player but render really far away. Now, that has limits obviously based on mapblock size.
Another option is to implement a grid of such wall objects such that they are spaced out throughout your play area. I.e. every 2 mapblocks you have a mesh node with your wall with a different offset matching your current mapblock coords. This would be quite involved, but would work for larger map sizes.
Another option is to implement a grid of such wall objects such that they are spaced out throughout your play area. I.e. every 2 mapblocks you have a mesh node with your wall with a different offset matching your current mapblock coords. This would be quite involved, but would work for larger map sizes.
9lXCftzoaojO8VNNRYxYtg1sqCEdv3dH
- sorcerykid
- Member
- Posts: 1841
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: Render entity from unlimited distance
Actually, an .obj file isn't necessary. I think it would be much easier to just specify a nodebox in the node definition, rather than exporting a mesh and keeping track of an additional asset file.
Who is online
Users browsing this forum: No registered users and 8 guests