• Welcome to MX Bikes Official Forum. Please login or sign up.
 
April 26, 2024, 07:33:16 PM

News:

MX Bikes beta18j available! :)


Softness map for deformation

Started by Ruubs, October 17, 2016, 09:20:12 PM

Previous topic - Next topic

Ruubs

I'm sure i've suggested this before the game even got released. I still think this is the way to make deformation for a motocross game. Mx vs Atv Reflex uses this as well, and it works awesome!

The way I see it is that you sort of have a second heightmap. On this second heightmap (lets call it deformation map) you can make parts deeper than the actual track. If this deformation map is the exact same as the original height map, there won't be any deformation. If the deformation map is 5% more black (so lower heights) you'll have small deformation. If the deformation map is 50% more black you'll have lots of deformation. Offcourse you can make the deformation map however you want. If you want 5% deformation somewhere, just paint 5% black there. If theres a sand section, paint it 90% black. You can even make some great braking bumps with this methode. Just premake the ruts on the deformation map (just like you normally make your bumps on the original heightmap (only on the deformation map make it black, white won't work). Then when riding over this part, the part with 5% black won't deform much, but the little holes with 50% black will dig out the terrain and this way you'll get braking bumps.

Offcourse the braking bump idea isn't the best. It'd be much cooler if the deformation itself actually made braking bumps so every race would be 100% unique. Still I think the softness map is a really cool thing to have. Not every dirt type should deform the same way. There are even a ton of different types of sand and soil. So a default deformation setting on the material types won't work great.

It also doesn't have to be a heightmap. The way MvA Reflex does it is by a colormap. 100% purple is 100% sand. 100% blue is 100% hardpacked soil, 100% yellow is 100% mud, 100% white is 100% no deformation at all (I probably have the colors wrong, I don't know that much about MvA Reflex).

Asdrael

Would be awesome to have deformation ranges set by the track maker, big +1. It is also somewhat realistic, as some tracks have reinforcements below the actual riding surface.
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

Ruubs

Okay I've searched around a bit to find the original information that I read about Mx vs Atv Reflex's deformation. I found this:
http://twisteddirt.com/wiki/SoftnessMapTexture

Red Channel: The red channel determines the speed at which deformation happens. 0 is slow (actually turning deformation off) and 255 is fast.
Green Channel: The green channel determines how deep the deformation happens. 0 is none (actually turning deformation off) and 255 is maximum depth.
Blue Channel: The blue channel determines how much the ground builds up around the deformation. 0 is none, and the ground does not deform outside of your tire path while 255 causes the ground around the deformation to start increasing in height.
Alpha Channel: The alpha channel does not appear to do anything. I tried 0, 255, and even deleted the alpha channel all together. Nothing made a difference. (update Bruce - 0 turns off the deformation. No alpha ends up defaulting to a white alpha)

Sample Softness Image from a track in Mx vs Atv Reflex:


In my opinion this is the best way to implement deformation. Track modders can make a lot of different sections on one track and actually experiment with this. I understand that the current tracks might not work, and need to be reexported if this gets in the game. I don't mind if the current tracks don't work. Eventually this will make the tracks more fun and the game a lot better.

I'd love to know what Piboso and Snappe think of this.

Ps. Credits to twisted dirt and mx vs atv reflex.

[GH]Cody

Quote from: Sandbiter on October 18, 2016, 04:40:27 PM
Okay I've searched around a bit to find the original information that I read about Mx vs Atv Reflex's deformation. I found this:
http://twisteddirt.com/wiki/SoftnessMapTexture

Red Channel: The red channel determines the speed at which deformation happens. 0 is slow (actually turning deformation off) and 255 is fast.
Green Channel: The green channel determines how deep the deformation happens. 0 is none (actually turning deformation off) and 255 is maximum depth.
Blue Channel: The blue channel determines how much the ground builds up around the deformation. 0 is none, and the ground does not deform outside of your tire path while 255 causes the ground around the deformation to start increasing in height.
Alpha Channel: The alpha channel does not appear to do anything. I tried 0, 255, and even deleted the alpha channel all together. Nothing made a difference. (update Bruce - 0 turns off the deformation. No alpha ends up defaulting to a white alpha)

Sample Softness Image from a track in Mx vs Atv Reflex:


In my opinion this is the best way to implement deformation. Track modders can make a lot of different sections on one track and actually experiment with this. I understand that the current tracks might not work, and need to be reexported if this gets in the game. I don't mind if the current tracks don't work. Eventually this will make the tracks more fun and the game a lot better.

I'd love to know what Piboso and Snappe think of this.

Ps. Credits to twisted dirt and mx vs atv reflex.

this. its a great way to do it, when i was making tracks in reflex i would lay it out with various lines for breaking and acceleration bumps using just the green channel overtop the map so it would continue to get worse and worse with bumps like a soft loamy track would in various locations and it felt great to ride from the start when its smooth to the end, it really makes the lap times slower and you couldnt just push wide open into a corner

Ruubs

Piboso, any comments? I know netcode and physics are your main priority at the moment. But will we ever see this for deformation? Or at least braking bumps, acceleration bumps and dirt build up?