Jump to content
Sign in to follow this  
Αplion

Laggy model ingame

Recommended Posts

I have a vehicle model (car) ready and workable ingame ... my problem is that when I'm looking this vehicle external as unit (unmount), it gives me lag (only when I'm looking the model).

There is no problem when I'm either in gunner or driver positions ... just when I'm looking it after been unmounted.

The vehicle is about 13500 polygons and 20 sections so I don't believe that this is an issue (I also tried to reduce the polygons in lod 0 to about 8500 but nothing changed).

My lods are:

lod 0

View Gunner

View Cargo

ShadowVolume 0

Geometry

Memory

LandContact

Hit-points

View Geometry

Fire Geometry

View-Cargo-Geometry

View-Gunner-Geometry

Any thoughts of what may cause this issue ?

thanks in advance.

Aplion

Share this post


Link to post
Share on other sites
Gnat;2125992']Whats it like with the shadow lod deleted ?

If you are asking me to delete the shadow lod and check, I did it already without success mate.

Share this post


Link to post
Share on other sites

Then its difficult to say. Potentially some twisted faces or something. But 20 sections is also not helping.

Try EXPORT to UNIVERSAL BISTUDIO TXT, save, then restart O2, IMPORT UNIVERSAL BISTUDIO TXT

Share this post


Link to post
Share on other sites

Also a strange situation ... when I'm by default in driver position and dismount there is no lag until I'll kill the gunner !!

But when I'm in gunner position there is always lag when dismounted.

---------- Post added at 13:07 ---------- Previous post was at 13:02 ----------

Gnat;2125994']Then its difficult to say. Potentially some twisted faces or something. But 20 sections is also not helping.

Try EXPORT to UNIVERSAL BISTUDIO TXT' date=' save, then restart O2, IMPORT UNIVERSAL BISTUDIO TXT[/quote']

I did that but it gave me 22 sections instead 20 now ... I'll give it a try in game just in case.

Gnat regarding sections I know that are too much but to be honest I've seen model with 99 sections in game (not mine) without having similar issues.

---------- Post added at 13:14 ---------- Previous post was at 13:07 ----------

Well I did that with UNIVERSAL BISTUDIO TXT and also at same time with shadow lod deleted ... no luck unfortunately.

Share this post


Link to post
Share on other sites
...(car)... 13500 polygons and 20 sections...

You mention you reduced your 0.0 LoD to about 8.5k... Approx. how many sharp edges?

Also, are there many Alpha portions on the model?

20 Sections is getting abit high imo, if you have double sided glass with 20 sections that can easily turn into Hundreds of sections in the ODOL.

Section counts & glass are the killers. I know it can be a shame to squeeze it so hard but try getting the section count down to around 10 maybe 15 at the most.

Share this post


Link to post
Share on other sites
You mention you reduced your 0.0 LoD to about 8.5k... Approx. how many sharp edges?

Also, are there many Alpha portions on the model?

20 Sections is getting abit high imo, if you have double sided glass with 20 sections that can easily turn into Hundreds of sections in the ODOL.

Section counts & glass are the killers. I know it can be a shame to squeeze it so hard but try getting the section count down to around 10 maybe 15 at the most.

To be honest I don't know about "sharp edges" ... first time I'm reading about such an option ... can you point me regarding that please ?

There no Alpha for the moment in the model as I have only basic texture applied ... you see I prefer first to have the model fully functional in game and the textures will come after that.

Just for the record this vehicle will have also all doors working (they are openable by user action through aminations and I've used some scripting to open the appropriate door when a player is getting out).

Now about sections ... "black hole" for me as I don't know how to reduce them ... but regarding glasses are single sided.

Thanks for helping mate ...

Share this post


Link to post
Share on other sites

"Sharp edges" and "Smooth edges" define how lighting is calculated. Say on a 10 sided cylinder with smooth edges, the lighting is calculated like the it would be prefectly round while with sharp edges it keeps it's edgy look. Sort of "hard edges" and "rounded edges".

Share this post


Link to post
Share on other sites
Myke;2126010']"Sharp edges" and "Smooth edges" define how lighting is calculated. Say on a 10 sided cylinder with smooth edges' date=' the lighting is calculated like the it would be prefectly round while with sharp edges it keeps it's edgy look. Sort of "hard edges" and "rounded edges".[/quote']

Aha now I understood what synide was ment with that "sharp edges" ... well all my faces are sharped then.

Share this post


Link to post
Share on other sites
but regarding glasses are single sided

Does that mean yes, you do have some glass? If so, a glass texture will be a '_ca.paa' meaning it 'should' have an alpha channel. Alpha/Glass textures and high'ish section counts when you look at it in O2 can end up being much higher than you anticipate in the final ODOL.

Whether this actually ends up being more drawcalls when you're in-game I'm not entirely sure but I'd imagine it probably does.

I take it you know where to see the section count when you're looking at your model in O2 (Window>Resource Library). If you look closely it's essentially saying the combination of 'texture' and 'rvmat' equates to a 'section'.

Eg. If you had a square cube and the cube had the exact same 'texture' on all 6 faces but each face pointed to a unique 'rvmat' then that LoD would have 6 sections.

What you want to try and do is reduce this list of unique combinations of 'texture' & 'rvmat' to a minimum. However, this can sometimes be very difficult to do and still keep the quality you want. Hence I used the word 'try'. Sometimes to reduce your section count you have to combine or condense some of your textures (and there associated rvmat's) into one.

Eg. You may have 4 faces each pointing at unique 1k textures and there respective unique rvmats. You might try mapping these 4 textures into 1 x 2k texture & it's single rvmat... Thus going from 4 sections to 1 section.

Regarding 'sharp edges'... there should be alot of posts in the forums regarding this but using the 'cube' as an example. If it had no sharp edges then it'd be rendered with 8 verts and the normals averaged giving a smooth look. But, if all the edges were sharp then it'd be rendered with 24 verts and the edges would look hard & sharp.

This shouldn't be a problem with your model though.

Share this post


Link to post
Share on other sites

ok just one thing ... when I reported about sections number I was looking the number at th bottom left of the O2 and was saying 20 ... now I've opened the sections in "Window>Resource Library" and ... my sections are 14 now !!

Furthermore that seems not to change my issue.

@ Synide ... let me read closer your explanations - suggestions and I'll come back to you.

---------- Post added at 15:12 ---------- Previous post was at 14:24 ----------

ok let me give the last status ...

points : 9471

faces : 13547

sections : 12

Regarding glass ... yes I have glasses but I haven't yet any texture applied except just the #(argb,8,8,3)color(0.0,0.0,0.0,0.12,co) in lod 0 texture area. So I'm assuming that they are treated by the game engine as normal polygons without any problems.

One more thing that I must make clear is that so far I've only a basic texture for each section without any rvmat .... is there any case that causing the problem ?

Still my issue remain ... :(

Edited by Aplion

Share this post


Link to post
Share on other sites
Furthermore that seems not to change my issue.

Oh sure... it might be something else related to your model. That's the thing about modding A2/OA. There are alot of moving parts. Sometimes a problem is just the result of 1 issue, sometimes it's a combination of a lot of issues. As such, a common methodology is to work through a process of elimination. You slap & tickle a bit until it falls within BIS observed norms, then you move onto another bit and massage that. The only reason sections were mentioned was 'cause usually that's a good starting point with optimizing a model.

If you go through the process of reducing your section count then at least you can feel confident that this area should in theory not be contributing to poor performance.

Share this post


Link to post
Share on other sites

Synide ... right now I can't go lower than the 12 sections and I think that this is a fair number.

Regarding moving parts as I said my model has openable doors exactly as it was at HWM vehicles back to ArmA 1 (if you can recall) ... also I must say that I have imported these HWM vehicles to ArmA 2 and especially one of them (the GD240) has 40 sections and still is working like a charm without issues.

But I must agree with you that the only way to find the problem is through elimination process and I'm already working to this direction.

Share this post


Link to post
Share on other sites
There is no problem when I'm either in gunner or driver positions ... just when I'm looking it after been unmounted.

Ok, so we're starting to get confident that's the sections are looking cool (probably) it's good you looked at them even if it ends up not being the culprit.

Tell us, when you are in the gunner or driver position are you in 1st person or 3rd person? And, what are you doing next? Are you just doing a 'Get Out' then looking back at your vehicle? Again, are you in 1st or 3rd person when doing this?

What build of the game are you using?

Are there any leads to problems in your build.log file?

Share this post


Link to post
Share on other sites

Either as driver or gunner I'm in 1st person and when I'm getting out and looking at the vehicle then I have lag (only when I'm looking the vehicle).

As long as I'm in driver or gunner position without getting out there is no problem ... also at both positions when I'm using 3rd person view there is no problem ... just when I'm getting out and looking the vehicle either in 1st or 3rd person view.

There also several error reports into my build.log file but I'm not sure that these are significant as basicaly conserning some ST for points (I'll have a more detailed look on that).

---------- Post added at 16:51 ---------- Previous post was at 15:49 ----------

Well I've been tried erasing one by one all lods except lod 0 (also I made just a cube as all geometry lods just in case) ... no change.

I've checked model build.log file and among others I found these ...

Warning: CfgVehicles missing in PreloadConfig - may slow down vehicle creation

Warning: CfgAmmo missing in PreloadConfig - may slow down vehicle creation

Warning: CfgNonAIVehicles missing in PreloadConfig - may slow down vehicle creation

... to be honest I don't know how to fix these errors or if these errors have something to do with my lag issue ... any thoughts - help on that will be much appreciated.

Share this post


Link to post
Share on other sites
That's nothing, it has nothing to do with your problem AFAIK.

Yes I thought so ... thanks for help Max ..

Share this post


Link to post
Share on other sites
Well I've been tried erasing one by one all lods except lod 0 (also I made just a cube as all geometry lods just in case) ... no change.

Can you send me the .pbo that is being loaded in-game or post it here so other's too could look at it too... many eyes make lighter/quicker resolution. synide at rocketmail dot com or if your on skype... also, what version of the game.exe are you using?

Share this post


Link to post
Share on other sites

Synide I'm not sure that I understood what you ask me to do ... the .pbo file is binarized so the only think anyone can see is just the lag problem ingame.

---------- Post added at 09:19 ---------- Previous post was at 08:15 ----------

I think I found the problem !! a wrong path of a material in damage class of my config seems that was responsible for that lag !! after I correct the path the lag problem dιsappeared !!

Thank you all for the help and please excuse me for wasted your time.

Share this post


Link to post
Share on other sites

That's cool... I didn't do anything dude. It was all you. Btw, the reason I wanted the .pbo was to see if I too got the 'lag'... and I did. Was about 50%. s'good you got it sorted.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×