View Issue Details

IDProjectCategoryView StatusLast Update
0004165The Dark ModDef / Setuppublic24.07.2015 21:13
ReporterSteveL Assigned Tograyman  
PrioritynormalSeveritynormalReproducibilityN/A
Status closedResolutionwon't fix 
Product VersionTDM 2.03 
Summary0004165: Make alternative weather materials that have a constant density irrespective of size
DescriptionTDM's weather patches have a constant number of particles per surface irrespective of size. That means that if you double the size of a rain patch, the density of the rain halves.

This could easily be fixed with an alternative set of weather materials that have a constant density irrespective of how they are stretched. From issue 0004132:
//
There's an easy workaround for the density problem. In the material def (tdm_weather.mtr), change line

deform particle2 tdm_rain_splash_heavy

to

deform particle tdm_rain_splash_heavy

There are 2 settings for weather patches in the engine, "deform particle" and "deform particle2". Deform particle2 is a variant of the original that specifically ignores the actual area of the patch when calculating particle densities. For some reason presumably lost in history, TDM weather materials have always used particle2.

It's too late to change the original def files unfortunately... mappers will probably have layered rain to get the right density.
//
TagsNo tags attached.

Relationships

related to 0004132 resolvedSteveL Weather particle distribution should be more random 

Activities

grayman

grayman

19.07.2015 01:51

viewer   ~0007643

I created a new set of weather textures with the suggested change.

There's a caveat: a limit to the size of the patch. If the patch is too large, we get an overrun ERROR on MEMORY_BLOCK_SIZE (100000) and the game crashes.

I've found that a patch size of 106,496 square units works, but much larger patches don't. I didn't bother to determine where the boundary is. This is probably why the game has always used particle2 instead of particle in the material defs.

So probably a good recommendation would be to use patches of size 100,000 square units or less.

Now, this is for rain_drizzle. 100,000 might be too large for materials that generate more particles. Recommendations need to be established.
grayman

grayman

19.07.2015 02:13

viewer   ~0007644

As I suspected, changing the 106,496 patch from drizzle to downpour crashed the game.

Just going by the number of particles these two materials generate, I'd need to scale the patch down to around 80x80 to avoid the crash. That's way too small for a mapper to work with.

It might be better to leave things as they are and use patch layering to achieve the effect.
SteveL

SteveL

19.07.2015 19:04

reporter   ~0007647

Ack :( But I think you're right. That'll be why particle2 was invented. I don't know what limit is causing the crash, but it might be the size of a single vbo (list of vertices uploaded to the gpu). Getting close to limits usually means some cards will crash and others won't, which is even nastier.
grayman

grayman

19.07.2015 19:41

viewer   ~0007648

I'm layering my rain patches, so I think you can close this one. AFAIK, no one else has brought up the problem. At least now I can walk from one area to the next and see similar rain densities. Most of my map is covered with rain, so this was important.

Issue History

Date Modified Username Field Change
19.06.2015 18:33 SteveL New Issue
19.06.2015 18:33 SteveL Relationship added related to 0004132
19.06.2015 18:37 SteveL Summary Make alternative weather particle decls that have a constant density irrespective of size => Make alternative weather materials that have a constant density irrespective of size
19.07.2015 01:43 grayman Assigned To => grayman
19.07.2015 01:43 grayman Status new => assigned
19.07.2015 01:51 grayman Note Added: 0007643
19.07.2015 02:13 grayman Note Added: 0007644
19.07.2015 19:04 SteveL Note Added: 0007647
19.07.2015 19:41 grayman Note Added: 0007648
24.07.2015 21:13 grayman Status assigned => closed
24.07.2015 21:13 grayman Resolution open => won't fix