[QUESTION] Error: "Mesh with radius greater then 20km"

I find it difficult to believe that not one of the esteemed “Homeworld Modding Experts” here is familiar with and has conquered this seeming 20km mesh size limitation.

Just checked again and I believe it’s farClip. The game won’t render meshes that far away. If that’s the problem you are having, or not?

1 Like

I made a map in HW2 with a small planet in the middle of the scene. It was small compared to a real planet but huge compared to HW objects. I’m positive it “well exceeded” 20 KM. Can’t remember the true size but I know it was way outside any limits HWRM imposes. I don’t think the STC team is using this map anymore. This limit may be the reason why. @Nathanius may know more about the fate of this map since I dropped out of modding STC shortly after they switched over to HWRM.

1 Like

HWRM maps had a “better” way of doing planets and super large objects (without it exceeding mesh size or draw limits) so we’re not using that map setup any more @herbyguitar

Then could you help @gilligan_f ?

1 Like

This thread should help, I can answer questions here :slight_smile:

Background Hods - Homeworld Remastered Collection / Homeworld Mods and Modding - The Official Gearbox Software Forums

There is also the official example on Steam:
Steam Workshop::[EXAMPLE] Backgrounds #1 (steamcommunity.com)

1 Like

I appreciate everyone chipping in here.

Just to again clarify: I am not speaking of anything related to backgrounds, but of actual environmental Hods (20k +) that can be maneuvered around (e.g. in the center of the map).

I usually create and use rather large maps; thus far up to ‘local UniverseRadius = 10000000’. As I mentioned, the Homefront Halo is a single (not composite) object and that is perhaps hundreds of km in diameter. I do have one map of my own with an object (neutron star) that is several dozen of klicks in diameter that I created about ten years ago, but I don’t remember how I got it to work.

EDIT: Just a heads up: I am working in HW2, not HWRM.

I found the archived files from planet-X.
I’ve uploaded the folder so you can check it out. Not sure if they were archived correctly though. The files seem extremely small, but it’s been several years since I’ve done any HW2 modding. It may help, or it may not…

1 Like

@herbyguitar

The set of files (on MediaFire) for which you provided a link are for a background Hod. Was that what you intended?

No. That’s not what I had in mind. Makes sense though, that the file would be so small. I’ll dig around and find the model file as well… I thought everything was supposed to be in the hod Apparently not. It’s been several years since I modded this that I forgot some of the details.

This may not help at all. I don’t know.

1 Like

@herbyguitar

Thank you Herby…

Yes, that is the actual planet - I will test it upon a new map. However, what might (might) help is the actual map which did not give you an error (provided that planet_x actually has a radius greater than 20 km).

That also begs the question; how do we measure the actual in-game size of objects?

@herbyguitar

Indeed; your Hod for zzz_planet_x did generate the undesirable error:

“Error: Mesh with radius greater then 20km (Joint0 | Joint0_mesh)”.

Now, how do we avoid or side-step this error when inserting Hods larger than 20km… as has been done on occasion?

Between the two uploads you should have all the planet files. Both background and ship.
If there’s something else needed then you’ll have to ask @Nathanius because those two folders are all I had to mod to make it work. I never knew there was a limit.

@herbyguitar @Nathanius

What might be of help is the actual working Level file within which the zzz_planet_x Hod was placed. If that worked, perhaps there is a clue in the Level file itself as to how the 20 km limit was side-stepped. If not then perhaps it was a Lua file that was called by… or the gamefile itself?

@herbyguitar didn’t do anything special to make the planetoid in his map work, it was just a squadron add.

addSquadron("zzz_planet_x", "zzz_planet_x", {0, 0, 0}, -1, {270, 90, 30}, 0, 0)

Looking at the HOD (and using the collision mesh to measure) the planetoid is actually much bigger than 20km

How are you adding your 20km+ object to the map?

Yes, I can see that zzz_planet_x is over 153 km. I too have (usually) just used the basic addSquadron myself, but receive a fatal error in the Hw2.log every time. That is why I wished to examine the actual Level file. I thought that perhaps there was some Level parameter (outside of the actual object insertion [e.g. addSquadron]) that I was overlooking either by omission or inclusion.

I cannot understand why I receive what looks like (as exhibited by the error message itself) a standard error of game limitation when others have no such problem.

I was able to load a quickly “created” map with the custom background and the planet but found I had to rename the planet_x.lua in the background/planet_x folder to -planet_x.lua as the solar flare script caused HW2 to stop responding.

Here is the map code:

–created by maxdamage
levelDesc = “Planet X”
maxPlayers = 2

player = {}

player[0] = {
id = 0,
name = “”,
resources = 5500,
raceID = 1,
startPos = 0,
}

player[1] = {
id = 1,
name = “”,
resources = 5500,
raceID = 1,
startPos = 1,
}

function DetermChunk()
addPoint(“StartPos0”, {0, 0,-850000}, {0, 0, 0})
addPoint(“StartPos1”, {0, 0,850000}, {0,180, 0})

addSquadron(“zzz_planet_x”, “zzz_planet_x”, {0, 0, 0}, -1, {270, 90, 30}, 0, 0)

addAsteroid(“Asteroid_5”, {0, 0, 848500}, 100, 0, 0, 0, 0)
addAsteroid(“Asteroid_5”, {0, 0, -848500}, 100, 0, 0, 0, 0)

setWorldBoundsInner({0, 0, 0}, {1000000, 1000000, 1000000})
end

function NonDetermChunk()
–addPebble(“Pebble_0”, {2904, 2810, 1576}, 0, 0, 0)

fogSetActive(300)
setGlareIntensity(0)
setLevelShadowColour(0, 0, 0, 1)
loadBackground(“planet_x”)
setSensorsManagerCameraDistances(10000, 100000)
setDefaultMusic(“Data:sound/music/battle/battle_keeper”)