Mesh changing at a distance

Ask questions, discuss ideas, get answers
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Mesh changing at a distance

Post by BotHunter »

Hello all! I have this problem in which if you get far enough away from one of the meshes I put it, It changes to a different mesh. the wierd thing is this will still happen if the real mesh is something not in BF! Any Ideas?
Thanks! :)
Last edited by BotHunter on Wed Apr 10, 2013 11:29 pm, edited 1 time in total.
Walk quietly and carry a sniper rifle
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Mesh changing at a distance

Post by Swaffy »

I think I know what you're talking about. I think it's the SimpleMesh, an object that has a very low poly count and is used for far-away rendering. At first, the 3D object might look like a shadow mesh.

For example, "Shad_MP67_m1" or "Shade_MP67_m1" could be the simpleMesh.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Mesh changing at a distance

Post by Apache Thunder »

You might have accidentally included a second LOD mesh while exporting the mesh file. Import it into gmax/3dS max making sure to uncheck the import main lod only option so that it imports all other lods that may be present and check to see if there is any LOD02 meshes and so on. Your object won't switch to another mesh unless it's coded to use a lod object that does so. But the second lod on the main mesh it self may end up operating without the help of coding and thus might be what is causing your issue. Delete the LOD02 meshes and so on if you find any or if you find one that is significantly different then the other LOD meshes.
ImageImageImage
I have cameras in your head!
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Mesh changing at a distance

Post by BotHunter »

I'm using tha BF109 Lod selector. could that be a problem?
Walk quietly and carry a sniper rifle
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Mesh changing at a distance

Post by freddy »

BotHunter wrote:I'm using tha BF109 Lod selector. could that be a problem?
Propably, the BF109 is the only plane in bf42 that has no objectTemplate.cullRadiusScale 5 not saying that is the problem, but if you based the code on the BF109 you might want to check it out
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: Mesh changing at a distance

Post by Senshi »

cullradius is irrelevant for LODs. cullradius describes the distance after which objects get entirely culled out (no longer rendered/"invisible"). By increasing the radiusscale you can practically remove the annoying "object gets invisible all of a sudden at a certain distance". Obviously you gotta test for perfomance, as this will increase the load a bit.

Meshchange on distance is either wrongful LODs in the .sm, an entirely wrong LodSelector or a wrong simplemesh :/ .
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Mesh changing at a distance

Post by BotHunter »

Here is an example (Top photo):

http://battlefieldarea51mod.weebly.com/photos.html

The BF109's in the background is actually the same thing as the plane up close
Walk quietly and carry a sniper rifle
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Mesh changing at a distance

Post by BotHunter »

Where is the BF109 lod selector defined?
Walk quietly and carry a sniper rifle
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Mesh changing at a distance

Post by freddy »

That must be in Geometries.con ?
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Mesh changing at a distance

Post by Swaffy »

I know, I have this same issue with my HandFireArms. I had my 870 showing up close then at a distance it looked like a No4 rifle.

I'll use the M10 tank as an example. If you open up its Objects.con and scroll to the bottom, you will see this:
  • rem *** M10Simple ***
    ObjectTemplate.create SimpleObject M10Simple
    ObjectTemplate.geometry M10_Hull_L1
That's what you see from long distances, when the main Complex mesh is out of range. This is, in your case, that BF-109 mesh when you see your vehicle from far away.

This SimpleObject is added to the LOD object, seen here:
  • rem *** lodM10 ***
    ObjectTemplate.create LodObject lodM10
    ObjectTemplate.hasMobilePhysics 1
    ObjectTemplate.hasCollisionPhysics 1
    ObjectTemplate.hasResponsePhysics 1
    rem -------------------------------------
    ObjectTemplate.addTemplate M10Complex
    ObjectTemplate.addTemplate M10Simple
    ObjectTemplate.addTemplate M10Wreck
    rem -------------------------------------
    ObjectTemplate.lodSelector M10LodSelector
Also note that "M10_Hull_L1" is a different StandardMesh file than the main meshes. It has all of the tank's parts in one single StandardMesh 3D object (turret, hull, tracks), with a reduced poly count. You don't need high poly counts for a far distant object. I've seen them with varying names, such as "ObjectName_L1", "shad_ObjectName", "shade_ObjectName", "shad_ObjectName_m1", etc.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply