Creating custom dynamic models, grass, and plants

I've added guides to creating custom dynamic models (that can be moved and broken), grass, and plants to the Big Book of MudRunner Map Making.

There are a few properties used by the built-in game objects that I wasn't able to figure out. If anyone knows what they do, please let me know with a reply here or a comment on the guide's Steam page. Thanks.

https://steamcommunity.com/sharedfiles/filedetails/?id=1583079240

@Chris-Nelson Very Helpful and Informational for the seasoned and new map makers...Thanks Man.

Awesome work man, I have to read through it ASAP.
Is there a PDF version available (so I can read it at work🤐)?

Sorry, there's no PDF version. I would love to create one and improve all of the formatting beyond what Steam will allow, but I don't relish the thought of keeping the two versions in sync with each other.

@chris-nelson,

DetailMap="models/{filename}"
Unknown purpose. Used by the rock models.

This is what I know about the DetailMap

https://forums.focus-home.com/topic/32465/help-adding-normal-maps-for-logs/5

Also, Light Rays go hand in hand with this texture
sfx_light_ray__s_d.dds
alt text

It uses the alpha of the texture to show a Light Ray coming off a light source. This texture is applied to the X mesh you see on the lamp posts.

last edited by Tattoo

@chris-nelson,

ModelMaterial

<ModelMaterial NoOcclusion="true" IsWheelTracks="true" />
This tag with its own optional properties can be added within the Material tag. NoOcclusion is used by the bridges and individual logs, and IsWheelTracks is used by bridges, individual logs, and rocks. However, neither property seems to have an effect. Bridges still occlude (sometimes badly), and no wheel tracks are generated on these objects. Maybe this tag is here for a future patch?

NoOcclusion="true" is NOT used on bridges. I just looked at each bridge.xml and none of them have this in there. Each bridge uses an Occlusion Texture which can be found in Steam\steamapps\common\Spintires Mudrunner - Editor Beta\Media\prebuild\common

IsWheelTracks="true" Does create tire tracks on a model that uses it but the tires have to be dirty for them to show up, it seems. I use this on most of my models and they only show up after I drive around a bit and the tires are dirty.

What else you can't figure out? You didn't specify. I didn't read the whole thing, just parts of it.

last edited by Tattoo

Thanks for the tips, @Tattoo. You have a good idea for detail. I will investigate and update the guide based on your info.

NoOcclusion isn't exactly in an .xml file; it's in the combined files in MeshCache.zip/models_*
E.g. MeshCache.zip/models_bridge_asphalt_double

Skimming through my property list, here's what I couldn't figure out (not including what you've already addressed):

Custom River Water

  • ColorScatter
  • TintDepth
  • TintBias

Custom Overlay Brush

  • Divergence
  • Perpendicularity

Model Class XML (Physics)

  • NightLightingShadowsAllowCap
  • NoSoftContacts
  • NoSoftImpulse

Model Flares

  • SizeAtDay
  • Reflections
    ... and Lights
  • CreateSuperLight
  • InnerCone

Plant Mesh XML (Material)

  • OcclusionIntensity (only partially understood)
  • OcclusionRadius (only partially understood)
  • IsFoliage (only partially understood)

Plant Class XML (PlantBrand)

  • DistSkipPercentage

Plant Bodies and Constraints

  • GravityFactor
  • IsCapsuleCDT (only partially understood)
  • AllowedPenetrationDepth

Dang. It's kind of embarrassing when I list them all together.

@chris-nelson, Oh wow, you're right. I was gonna look there too and forgot. DOH. I should've known because I use IsWheelTracks="true" all the time. Sorry, my bad. I dunno what that does. Never noticed it. Since it says ModelMaterial and the IsWheelTracks="true" shows up on the textures, maybe the NoOcclusion="true" means that no occlusion shows up on the texture like the other. Maybe?

Oh, and IsGameAsphalt is used in the class XML for materials, road overlays, and models, and it's driving me nuts that I can't figure out what it does.

@chris-nelson said in Creating custom dynamic models, grass, and plants:

Oh, and IsGameAsphalt is used in the class XML for materials, road overlays, and models, and it's driving me nuts that I can't figure out what it does.

I'd say that would have to be something with how the wheels react to the surface when setting wheel settings. That may tell them that it's a hard surface.

And from the little I played with lights on my loop, InnerCone and OutterCone describes the top and bottom of a cone. Inner would be the small, upper part and Outter would be the large, bottom part of the cone created by the light. There's also a length setting but it's been a while since I messed with em and don't remember. I'd have to experiment more. Sorry.

The rest in the list I've never messed with and not sure. Sorry. I've only been making static models and haven't messed with plant or others.

I believe SizeAtDay says how bright the light is during the day. I remember someone said that's how it works on mods for the headlights. Maybe intensity?

last edited by Tattoo

@Chris-Nelson
Flares are strictly visual, they don't actually cast any light.
SizeAtDay dictates the size of the flare during daylight hours. For example the lightbars on my trucks usually have the flare size during the day set to 0 (zero) so they're effectively "off" in the daytime. Larger numerical values result in a larger light flare when viewing the light source from an appropriate angle, so if you want small flares for say signal/marker lights you would use a value of 0.5 or less, but for a large glare from headlights you would likely want to use a value of 1.0 or higher. I believe the same applies when adding lights/flares to static models for mapping (I made a firepit that lit up a while back) but I can't remember for sure.
Reflections does what it implies; if a reflective surface (body panel, puddle/water) is between the camera and the light source that light will be reflected by the object or surface.

last edited by Mexican_420

@mexican_420 Thanks, that's what I would have expected for SizeAtDay. Apparently that property simply doesn't work for models. It's good to know that it works for trucks, so now at least I know where their heads were at.

The story is apparently the same for Reflections. I'd even documented it that way, but in my skimming I accidentally listed it here as one that I didn't know.

@tattoo said in Creating custom dynamic models, grass, and plants:

IsWheelTracks="true" Does create tire tracks on a model that uses it but the tires have to be dirty for them to show up, it seems. I use this on most of my models and they only show up after I drive around a bit and the tires are dirty.

Yay!

0_1548291466966_iswheeltracks.jpg

@tattoo said in Creating custom dynamic models, grass, and plants:

The rest in the list I've never messed with and not sure. Sorry. I've only been making static models and haven't messed with plant or others.

No worries. If it turned out that you already knew everything, I'd be cursing myself for wasting so much time on this. :smiling_face_with_open_mouth_cold_sweat:

@tattoo said in Creating custom dynamic models, grass, and plants:

@chris-nelson, Since it says ModelMaterial and the IsWheelTracks="true" shows up on the textures, maybe the NoOcclusion="true" means that no occlusion shows up on the texture like the other. Maybe?

Indeed, you are correct. Thanks!

@chris-nelson You could try the “SizeMultiAtDay=” code for controlling the size lighting flares on the models. I use it for trucks and it appears to work as expected and I have noticed that this line is present in model XML's.

I don't know if this is what you were looking for, I didn't notice it being mentioned so probably worth a try anyway.

Purely Speculative - The CreateSuperLight="true" line could be to do with when you drive under the light source at night and it darkens everything outside of the light. I'm not able to test this theory, but thats the first thing that came to mind.

last edited by Kingpinn

@chris-nelson
I am just half way through and I can already say: Very helpful!

@kingpinn SizeMultAtDay! Of course! How did I miss that?

And I see that it works correctly in the game, but not the editor. Maybe I should check the other properties that work only in the day or night to see if they behave better in the game as well.

this is amazing... one request.. for reference sections on xml, can you provide a full example of a completed xml file for the different elements? I like to see what a working xml looks like to help validate my entries. thanks!

@pix3lmonkey said in Creating custom dynamic models, grass, and plants:

this is amazing... one request.. for reference sections on xml, can you provide a full example of a completed xml file for the different elements? I like to see what a working xml looks like to help validate my entries. thanks!

This is why the guide points to examples in the built-in assets. They are your completed examples!