[Help] statics dissapearing at certain distance in editor?

Making or wanting help making your own asset? Check in here
Post Reply
arjan
Posts: 1865
Joined: 2007-04-21 12:32

[Help] statics dissapearing at certain distance in editor?

Post by arjan »

what the title says? what can i do abou it? :-|
zangoo
Posts: 978
Joined: 2007-09-01 03:42

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

Post 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.
Ballistics or Tracers? Please Vote
[DM] member, We are now recruiting!
Xfire:Zangoo
Z-trooper
Retired PR Developer
Posts: 4166
Joined: 2007-05-08 14:18

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

Post by Z-trooper »

if its custom made statics you might need to add more lod's
Image
"Without geometry, life is pointless"
zangoo
Posts: 978
Joined: 2007-09-01 03:42

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

Post by zangoo »

nolods would fix that issue.
Ballistics or Tracers? Please Vote
[DM] member, We are now recruiting!
Xfire:Zangoo
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

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

Post 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.
Image
space
Posts: 2337
Joined: 2008-03-02 06:42

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

Post 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.
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

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

Post 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.
Image
arjan
Posts: 1865
Joined: 2007-04-21 12:32

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

Post by arjan »

Ok thanks guys. :)
zangoo
Posts: 978
Joined: 2007-09-01 03:42

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

Post 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
Ballistics or Tracers? Please Vote
[DM] member, We are now recruiting!
Xfire:Zangoo
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

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

Post 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 ;)
Image
space
Posts: 2337
Joined: 2008-03-02 06:42

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

Post 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.
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

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

Post 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.
Image
space
Posts: 2337
Joined: 2008-03-02 06:42

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

Post 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?
space
Posts: 2337
Joined: 2008-03-02 06:42

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

Post by space »

bump?
space
Posts: 2337
Joined: 2008-03-02 06:42

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

Post 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 :-?
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

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

Post 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.
Image
space
Posts: 2337
Joined: 2008-03-02 06:42

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

Post 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!
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

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

Post by Rhino »

thats cos it goes by the objects size...
Image
Post Reply

Return to “PR:BF2 Community Modding”