Page 1 of 1

[Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-24 17:53
by arjan
what the title says? what can i do abou it? :-|

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 00:47
by zangoo
renderer.minCullDistance 2000
this makes everything draw at 2000m, this could cause lag.

staticMeshRenderer.noLods 1
this makes everything looks its best, could cause lag.

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 00:50
by Z-trooper
if its custom made statics you might need to add more lod's

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 00:52
by zangoo
nolods would fix that issue.

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 08:47
by Rhino
zangoo wrote:nolods would fix that issue.
nooo... no lods forces the object into its highest lod for w/e distance its at, it still keeps the same cull distance which is where it draws.

to force a object to draw for a larger distance ingame you need to increase its cull radius.

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 09:32
by space
[R-DEV]Rhino wrote:nooo... no lods forces the object into its highest lod for w/e distance its at, it still keeps the same cull distance which is where it draws.

to force a object to draw for a larger distance ingame you need to increase its cull radius.

How is this done - I sent a PM a while back asking this.
Do you change the following line in the .con?


GeometryTemplate.setSubGeometryLodDistance 0 0 500

If so, what do the numbers mean, and also not all statics have that line in the .con.

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 10:03
by Rhino
ye, i generally ignore PM's about modding / mapping questions unless they need to be kept private for w/e reason cos I get loads of PMs per day and mainly cos even if I do awanser the question it only helps one person where by a forum post it has the potential of helping lots of people, I have solved many of my modding problems from a simple forum search of the question on BFeditor or w/e without even having to post a topic or post.

if you look in the .tweak file of most statics you will find a line a bit like this:

Code: Select all

rem *** Generated with Bf2Editor.exe [created: 2006/5/15 12:52]
GeometryTemplate.doNotGenerateLightmaps 0
GeometryTemplate.lightmapOverride 0
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
GeometryTemplate.glowing 0
GeometryTemplate.noLighting 0
ObjectTemplate.activeSafe SimpleObject afghan_back8m01
ObjectTemplate.creator EDMUND:Edmund_Fovargue
ObjectTemplate.modifiedByUser "Edmund Fovargue"
ObjectTemplate.saveInSeparateFile 1
[b]ObjectTemplate.cullRadiusScale 5[/b]
ObjectTemplate.geometry afghan_back8m01
ObjectTemplate.setCollisionMesh afghan_back8m01
ObjectTemplate.mapMaterial 0 Mud 1001
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
the line in bold will extend the cull radius of your object, setting it to 2 will make it draw for 2x the distance it did before adding it, setting it to 5 will be 5x the distance etc.

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 11:29
by arjan
Ok thanks guys. :)

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 12:48
by zangoo
[R-DEV]Rhino wrote:nooo... no lods forces the object into its highest lod for w/e distance its at, it still keeps the same cull distance which is where it draws.

to force a object to draw for a larger distance ingame you need to increase its cull radius.


wouldnt min cull distance fix the cull radius issue, from my tests in the editor, the forcenolod 1 and mincullradius 2000, everything is in its best lod and draws at any distance up to 2000m

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 13:02
by Rhino
zangoo wrote:wouldnt min cull distance fix the cull radius issue, from my tests in the editor, the forcenolod 1 and mincullradius 2000, everything is in its best lod and draws at any distance up to 2000m
yes you can, but then you get every lamp post, post box, bin etc drawing for 2000 meters which is not needed, since its such a small object you will not see it at that distance and it has to render even thou you cant see it and you loose nothing from it being gone, but you gain fps.

so ingame wise its best to have the core, big statics like buildings, walls etc that do need to draw for long distances have a large cull thou small, not very meaningful (at distance) environmental objects draw at short ranges only.

Thou when I take promo shots etc I do play around with the debugger, making all objects cull, at there highest lod and a few other commands to make them look as nice as possible, even if my FPS shoots below 30 ;)

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 13:54
by space
So do you have to place the modified .con file, in the level object folder with the correct path? I cant see how you change its view distance for other users, if youve only modified it on your own comp.

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 14:03
by Rhino
ehhh no, if you want to extend the view distance in the editor / debugger or though the map's init.con file you shove the command in which zangoo was on about.

if you want to extend the view distance of a object you turn up its cull radius scale like i posted a few posts back in its .tweak file.....

Editing the files on your own to play in your normal pr with will probaly make you either 1, CTD on loading to a server or 2, get kicked/banned by punk buster for modified content.

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-25 20:06
by space
Sorry I meant the .tweak, not .con -
but if I change the .tweak file for say, the target static on my firing range, then that tweak file is in my PR folder and not the level folder. Unless the tweak is added to my level folder, then everyone else who plays it, will experience the original view distance. How do I get the new view distance to come into effect on my map, for other players?

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-26 13:11
by space
bump?

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-26 14:20
by Rhino

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-26 14:40
by space
spacemanc wrote:So do you have to place the modified .tweak file, in the level object folder with the correct path? I cant see how you change its view distance for other users, if youve only modified it on your own comp.

Ok thanks - so basically I do the above and it will supercede the .tweak in the PR folder. Think Ive got that :-?

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-26 14:47
by Rhino
all you need to do is follow that tut, apart from your dont need to do the init.con edits since one of the BF2 patches since that tut can do without that.

then make a serverarchive.con file, add that to load a objects_server.zip of your map, then include your new .tweak into the objects_server.zip into the correct folder structure and then your new .tweak file will be loaded with your map.

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-26 15:11
by space
Cool - Ive already got that set up for some xpack objects Ive added - It simple when you know how :)

Its pretty stupid the way things like crash barrier or wall statics have different view distances for different length sections - eg
10m barrier section - view distance 200m
4m section - view distance 100m
barstewerds!

Re: [Help] statics dissapearing at certain distance in editor?

Posted: 2008-06-26 15:59
by Rhino
thats cos it goes by the objects size...