Jump to content

Photo
- - - - -

Laggy model ingame


  • Please log in to reply
19 replies to this topic
Thread Starter
aplion
aplion

    Master Gunnery Sergeant

  • Members
  • 1054 posts

#1

Posted 29 March 2012 - 12:15

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

aplion_sig555_zpsltn87gsj.png
My PlayWithSix Collection can be found here : HAFM Collection
Stop asking me to share my 3d models. I won't, so don't send me more PMs


-APS-Gnat
-APS-Gnat

    Captain

  • Members
  • 6401 posts

#2

Posted 29 March 2012 - 12:55

Whats it like with the shadow lod deleted ?
Posted Image

Thread Starter
aplion
aplion

    Master Gunnery Sergeant

  • Members
  • 1054 posts

#3

Posted 29 March 2012 - 12:57

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.

aplion_sig555_zpsltn87gsj.png
My PlayWithSix Collection can be found here : HAFM Collection
Stop asking me to share my 3d models. I won't, so don't send me more PMs


-APS-Gnat
-APS-Gnat

    Captain

  • Members
  • 6401 posts

#4

Posted 29 March 2012 - 13:01

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
Posted Image

Thread Starter
aplion
aplion

    Master Gunnery Sergeant

  • Members
  • 1054 posts

#5

Posted 29 March 2012 - 13:14

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, save, then restart O2, IMPORT UNIVERSAL BISTUDIO TXT


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.

aplion_sig555_zpsltn87gsj.png
My PlayWithSix Collection can be found here : HAFM Collection
Stop asking me to share my 3d models. I won't, so don't send me more PMs


Synide
Synide

    Master Gunnery Sergeant

  • Members
  • 1010 posts

#6

Posted 29 March 2012 - 13:14

...(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.
Hibernating (indefinitely/permanently/intermittently)... may respond to email, possibly.

Thread Starter
aplion
aplion

    Master Gunnery Sergeant

  • Members
  • 1054 posts

#7

Posted 29 March 2012 - 13:24

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 ...

aplion_sig555_zpsltn87gsj.png
My PlayWithSix Collection can be found here : HAFM Collection
Stop asking me to share my 3d models. I won't, so don't send me more PMs


-FRL-Myke
-FRL-Myke

    Moderator

  • 6571 posts

#8

Posted 29 March 2012 - 13:32

"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".
Posted Image

Thread Starter
aplion
aplion

    Master Gunnery Sergeant

  • Members
  • 1054 posts

#9

Posted 29 March 2012 - 13:36

Myke;2126010']"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".


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

aplion_sig555_zpsltn87gsj.png
My PlayWithSix Collection can be found here : HAFM Collection
Stop asking me to share my 3d models. I won't, so don't send me more PMs


Synide
Synide

    Master Gunnery Sergeant

  • Members
  • 1010 posts

#10

Posted 29 March 2012 - 14:16

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.
Hibernating (indefinitely/permanently/intermittently)... may respond to email, possibly.

Thread Starter
aplion
aplion

    Master Gunnery Sergeant

  • Members
  • 1054 posts

#11

Posted 29 March 2012 - 15:12

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, 29 March 2012 - 15:16.

aplion_sig555_zpsltn87gsj.png
My PlayWithSix Collection can be found here : HAFM Collection
Stop asking me to share my 3d models. I won't, so don't send me more PMs


Synide
Synide

    Master Gunnery Sergeant

  • Members
  • 1010 posts

#12

Posted 29 March 2012 - 15:22

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.
Hibernating (indefinitely/permanently/intermittently)... may respond to email, possibly.

Thread Starter
aplion
aplion

    Master Gunnery Sergeant

  • Members
  • 1054 posts

#13

Posted 29 March 2012 - 15:32

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.

aplion_sig555_zpsltn87gsj.png
My PlayWithSix Collection can be found here : HAFM Collection
Stop asking me to share my 3d models. I won't, so don't send me more PMs


Synide
Synide

    Master Gunnery Sergeant

  • Members
  • 1010 posts

#14

Posted 29 March 2012 - 15:38

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?
Hibernating (indefinitely/permanently/intermittently)... may respond to email, possibly.

Thread Starter
aplion
aplion

    Master Gunnery Sergeant

  • Members
  • 1054 posts

#15

Posted 29 March 2012 - 16:51

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.

aplion_sig555_zpsltn87gsj.png
My PlayWithSix Collection can be found here : HAFM Collection
Stop asking me to share my 3d models. I won't, so don't send me more PMs


Max Power
Max Power

    Mr. Angry Face

  • Members
  • 12828 posts

#16

Posted 29 March 2012 - 18:20

That's nothing, it has nothing to do with your problem AFAIK.
Posted Image
Posted Image
My inbox is fill and won't be emptied. If your PM is regarding requests to use my work, unfortunately I choose not to grant such permission. My work is for use with CWR2 only.

Thread Starter
aplion
aplion

    Master Gunnery Sergeant

  • Members
  • 1054 posts

#17

Posted 29 March 2012 - 18:30

That's nothing, it has nothing to do with your problem AFAIK.


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

aplion_sig555_zpsltn87gsj.png
My PlayWithSix Collection can be found here : HAFM Collection
Stop asking me to share my 3d models. I won't, so don't send me more PMs


Synide
Synide

    Master Gunnery Sergeant

  • Members
  • 1010 posts

#18

Posted 29 March 2012 - 22:01

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?
Hibernating (indefinitely/permanently/intermittently)... may respond to email, possibly.

Thread Starter
aplion
aplion

    Master Gunnery Sergeant

  • Members
  • 1054 posts

#19

Posted 30 March 2012 - 09:19

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.

aplion_sig555_zpsltn87gsj.png
My PlayWithSix Collection can be found here : HAFM Collection
Stop asking me to share my 3d models. I won't, so don't send me more PMs


Synide
Synide

    Master Gunnery Sergeant

  • Members
  • 1010 posts

#20

Posted 30 March 2012 - 09:59

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.
Hibernating (indefinitely/permanently/intermittently)... may respond to email, possibly.