NGE Structure View Distance

Borrie BoBaka

Local Bothan
Staff member
Super Moderator
Joined
Mar 16, 2014
Messages
91
Location
Dark Rebellion RP
I'm inclined to try and work on this myself but I thought it might be better to post this in the Requests section.

Back in late CU, Early NGE, there was a patch released that drastically increased the visual draw distance of all player structures. I wager this was done to accommodate for the increased ability of computers as time went on. With this patch, you could see houses from a great distance, roughly 300 to 400 meters away. Very similar to static structures are now. 

Here is an image I found demonstrating this:
http://i.imgur.com/UlU4C8D.jpg

Essentially, I'd love to get that draw distance back for player structures.

Originally, I tried to see if I could force it to expand this distance with the Client Settings Overrider tool, which worked wonders for increasing my draw distance of static structures and terrain, but it did nothing to player structures. I would not be surprised if I still need to be in range of a structure for it to initially draw, but even with the overrider, the structures vanished after I got too far away, roughly 64 to 128 meters from the building. 

Now, I am not entirely sure if this change was done in the server's code itself, or in the client through a certain file. Either way, I have had little luck finding the file responsible for this draw distance. But regardless, this patch was done mid-lifetime of the game. They even had a fancy post about it announcing it, though I've combed through all the patch files and could not find any reference to it. 

If anyone thinks they know what could be done to solve this, I would greatly appreciate it! 
Thank you!
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
Player structures are handled server side, including the view distance.

Where exactly, I couldn't tell you but there might be a thread somewhere here (or someone that can answer it specifically).

Basically, your client wont know about any building until it gets into range of the building, then the server lets the client know, so to reduce server related load, it's kept low at the moment, but can easily be tweaked if you run a server yourself and have the hardware that doesn't buckle under the added strain.

As you found out yourself, .WS (World Snapshot) files do get loaded client side, so NPC structures you can view away from large ranges in theory, if you tweak certain files and settings.
 

Borrie BoBaka

Local Bothan
Staff member
Super Moderator
Joined
Mar 16, 2014
Messages
91
Location
Dark Rebellion RP
As I recall, the initial rendering of buildings (when you first encountered one and they spawned into the world) was always pretty close range, possibly a little further out using the method you just listed. The big difference was the fact that the objects persisted after being spawned for an immense range. 

It was as if the building, after spawning, imprinted itself on the world so that it would be rendered like NPC structures, and only update if you were in range. For instance, at a distance, if someone deleted a house, you wouldn't see that the house was gone until you went back in range of it. 

I'll dig around and see what I can find. The most straight forward answer to this problem is most likely what you suggested, the expanded view range. However because the spawn in range was shorter than the spawn out rate, I suspect something more is happening than just the server's recognition of player view range.

Thank you for the suggestions though, I now have a path to follow, and perhaps others do as well!
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
Hm interesting, do you remember this being in PreCU too though? It's been so long and I barely remember details like this unfortunately.

I might investigate too now that you mention it, when I find the time and hopefully don't forget.
 

Borrie BoBaka

Local Bothan
Staff member
Super Moderator
Joined
Mar 16, 2014
Messages
91
Location
Dark Rebellion RP
Well, I remember there being some sort of article on their website, like a Friday Feature, that detailed about how they increased the view distance of the game and how you could see houses from far away. It's not impossible that this was introduced the Combat Upgrade, but what I remember most of all is that it was on the Gold website, not the black and blue one. Seemingly, they didn't use the Gold website until roughly mid CU, early Rage of the Wookiees.

Memory is a fickle thing, but I remember the houses being so drastically increased, in comparison to what it is now. For that, we do have definitive proof. I found another screenshot that demonstrates this; notably, in the Core3 SWGEmu, the City Hall, what is behind it, and that Mustafarian Bunker would not be visible normally.  
http://i.imgur.com/Q95NCSD.jpg

I just spent the past hour tirelessly searching through Friday Features and Patch Reports and I can't find any mention of this update. I decided I'd change my efforts to the Serverside, looking through source to see if there were set limits on the Object parent classes for buildings, but found nothing in BuildingObjectImplementation.cpp. I checked the SceneObject base as well, and while there's references to range, I think it has more to do with interaction than the spawn in principles.

Checked through Clientdata, as well as the templates for the default object and default structure. Seemingly, there's nothing that directly references range, however I am inexperienced still with using SIE and doing IFF file lookups, so I may have missed something. 

I'll keep casually looking through things, not just the files but the actual article about the update as well. I feel very certain it was at least CU or after.

EDIT: I did want to add some hypothesizes I had about this matter, if anyone was interested in helping me find that article, or the precise location of that data. What I suspect is that they did the visual increase after they had stablized the Engine and computers were getting better. It stands to reason that the distances in JTL helped solidify this, so this definitely had to have been Post-JTL. However, in the NGE, the developers did go on a kick about upgrading graphics, like the human/twi'lek/zabrak revamp, the improved shaders on things like the Uniform Boots, etcetera. I would suspect this increase would have gone alongside it, as increasing the visual distance of player houses does go a long way to making the game look better. But most importantly, there was the great house purge in June 2007. I suspect this upgrade may have been around then, when housing was put on the spotlight.
 

Anach

Member
Joined
Sep 17, 2010
Messages
48
Structure view distance was the same in pre-cut as NGE, it was actually changed in Publish 14.1. It's an acknowledged issue on mantis@swgemu. We were discussing it on IRC just a few days ago.
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
Were trying to do the same in our Pre-CU server, we have installed a 80 core, 128gb ram monster to make sure lag or server processing isnt an issue and we would like to increase biulding draw distance for our players, but we have been so far unsuccessful.

Anyone made any progress with this? if you can point us in the right direction we might be able to do it on our own, we just cant find the location of the variables in the code files.
 

Anach

Member
Joined
Sep 17, 2010
Messages
48
XionicFire said:
Were trying to do the same in our Pre-CU server, we have installed a 80 core, 128gb ram monster to make sure lag or server processing isnt an issue and we would like to increase biulding draw distance for our players, but we have been so far unsuccessful.

Anyone made any progress with this? if you can point us in the right direction we might be able to do it on our own, we just cant find the location of the variables in the code files.
Apparently structure view distance isn't currently separate from NPC view distance, so if you increase that distance, you are suddenly placing a huge load on the server due to it spawning lairs, NPCs, structures and everything else at that distance also. TA said it will be looked at later. Until then, take a look at CLOSEOBJECTRANGE, in ZoneServer.idl.
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
Anach said:
XionicFire said:
Were trying to do the same in our Pre-CU server, we have installed a 80 core, 128gb ram monster to make sure lag or server processing isnt an issue and we would like to increase biulding draw distance for our players, but we have been so far unsuccessful.

Anyone made any progress with this? if you can point us in the right direction we might be able to do it on our own, we just cant find the location of the variables in the code files.
Apparently structure view distance isn't currently separate from NPC view distance, so if you increase that distance, you are suddenly placing a huge load on the server due to it spawning lairs, NPCs, structures and everything else at that distance also. TA said it will be looked at later. Until then, take a look at CLOSEOBJECTRANGE, in ZoneServer.idl.
Thank you!, we know this will cause big load on the server and this is why we built the engine on this monster.

So essentially changing npc draw distance will make building draw distance work the same? interesting, we will mess around with it and see if something works.

Thanks for the tip.
 

Anach

Member
Joined
Sep 17, 2010
Messages
48
XionicFire said:
Anach said:
XionicFire said:
Were trying to do the same in our Pre-CU server, we have installed a 80 core, 128gb ram monster to make sure lag or server processing isnt an issue and we would like to increase biulding draw distance for our players, but we have been so far unsuccessful.

Anyone made any progress with this? if you can point us in the right direction we might be able to do it on our own, we just cant find the location of the variables in the code files.
Apparently structure view distance isn't currently separate from NPC view distance, so if you increase that distance, you are suddenly placing a huge load on the server due to it spawning lairs, NPCs, structures and everything else at that distance also. TA said it will be looked at later. Until then, take a look at CLOSEOBJECTRANGE, in ZoneServer.idl.
Thank you!, we know this will cause big load on the server and this is why we built the engine on this monster.

So essentially changing npc draw distance will make building draw distance work the same? interesting, we will mess around with it and see if something works.

Thanks for the tip.
As you probably know, buildings already loaded will stay visible in the distances, this just changes the range they first load, but also every other object in the world. So yes, it will achieve what you are after, but you will also see NPCs fighting off in the distance (damage numbers), and it may increase the memory usage of clients also, due to the sheer density of lairs. The more players you have, the worse it will get. So you may have to fiddle around tweaking the value.

It's my opinion that lair density is far too high on the emu, and needs to have far fewer lairs spawn per square km. I don't remember having to zig zag so much between lairs preCU, and recall large vacant areas. That would help the problem, but also close object distance needs to have structures separated from everything else, so we can tweak the values separately; for example, I'd like to have structures visible at 1536m and NPCs visible at 512m
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
Anach said:
XionicFire said:
Anach said:
XionicFire said:
Were trying to do the same in our Pre-CU server, we have installed a 80 core, 128gb ram monster to make sure lag or server processing isnt an issue and we would like to increase biulding draw distance for our players, but we have been so far unsuccessful.

Anyone made any progress with this? if you can point us in the right direction we might be able to do it on our own, we just cant find the location of the variables in the code files.
Apparently structure view distance isn't currently separate from NPC view distance, so if you increase that distance, you are suddenly placing a huge load on the server due to it spawning lairs, NPCs, structures and everything else at that distance also. TA said it will be looked at later. Until then, take a look at CLOSEOBJECTRANGE, in ZoneServer.idl.
Thank you!, we know this will cause big load on the server and this is why we built the engine on this monster.

So essentially changing npc draw distance will make building draw distance work the same? interesting, we will mess around with it and see if something works.

Thanks for the tip.
As you probably know, buildings already loaded will stay visible in the distances, this just changes the range they first load, but also every other object in the world. So yes, it will achieve what you are after, but you will also see NPCs fighting off in the distance (damage numbers), and it may increase the memory usage of clients also, due to the sheer density of lairs. The more players you have, the worse it will get. So you may have to fiddle around tweaking the value.

It's my opinion that lair density is far too high on the emu, and needs to have far fewer lairs spawn per square km. I don't remember having to zig zag so much between lairs preCU, and recall large vacant areas. That would help the problem, but also close object distance needs to have structures separated from everything else, so we can tweak the values separately; for example, I'd like to have structures visible at 1536m and NPCs visible at 512m
Well what i noticed is no matter what happens, once you go past 190m anything and everything dissapears from view, this is especially true on player buildings, but also happens to npcs and lairs.

if you want to test this out, drop a house, or tag a lair with a waypoint, drive out 190m, the milisecond you go past 190m it instantly dissapears, and reapears if you go back in.

I remember back on live this used to be at least the lenght of the player city radius, i have screenshots to prove it, all we are trying to do it return it to its former glory.

Atm no matter how awesome your player city on the EMU it looks like a ghost town, virtually all empty because draw distance is severely limited.

Our client  .exe on our distribution has been hacked to allow more than 2gb of ram for the game and also allow 60fps in windowed mode and remove cursor window binding, part of these changes is to allow that extra memory to fuel these changes and not be lagged.

well try to test if the changes work.
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
Sir

I would like to say on behalf of everyone in our server, you, are our hero!

// The range of objects kept within closeObjects vectors.
// Changing this will have a large impact on performance.
public static final float CLOSEOBJECTRANGE = 192;

you were correct, we just changed this to 550, and the game is now BEAUTIFUL, its just awe inspiring and amazing, just like it was on live.

this has solved our issue and our server is not even breaking a sweat.

If you would like to claim the bounty for this request you are more than welcome to do so, please PM your paypal to me for payment.

Thanks for the assistance, on hehalf of everyone in the server we thank you!
 

Valkyra

Member
Joined
Aug 31, 2010
Messages
211
XionicFire said:
Sir

I would like to say on behalf of everyone in our server, you, are our hero!

// The range of objects kept within closeObjects vectors.
// Changing this will have a large impact on performance.
public static final float CLOSEOBJECTRANGE = 192;

you were correct, we just changed this to 550, and the game is now BEAUTIFUL, its just awe inspiring and amazing, just like it was on live.

this has solved our issue and our server is not even breaking a sweat.

If you would like to claim the bounty for this request you are more than welcome to do so, please PM your paypal to me for payment.

Thanks for the assistance, on hehalf of everyone in the server we thank you!
A more comprehensive solution I think, would be to have the COR set per structure/building object, like in the buildouts system post-CU (basically they converted .ws to datatables format, and had view range as a parameter.)

But for now that should work fine.
 
Top Bottom