Taubenangriff made a new version of the rdm4-bin.exe which now supports the vertex format P3f_N3f_G3f_B3f_T2f_C4b
when converting from .gltf/.glb to .rdm
(atm not from .rdm to .gltf/.glb
).
This format is required for Clothes
, which are usually used for flags, sails and all other models which are supposed to not to be stiff.
In comparison to the simple Wind_Ripples
effect which is available for the common assets (T2h
and I4b
), Clothes
allow much bigger meshes and targeted deflections for each vertice. If you just need a small awning which should fake
motion through wind, then the Wind_Ripples
effect should be sufficient (simply enable it in the corresponding cfg material and adjust its values).
As an easy example for this guide we recreate one of the ornamental airport flags but apply less deflections: data/dlc11/graphics/buildings/ornaments/airport/airport_flag_02.cfg
You can…
P3f_N3f_G3f_B3f_T2f_C4b
as an export option yet anyway.In this case, import via option 2 is faster, so I used that one here.
Object Data Properties
tab on the right. There you click on Color Attributes
(picture 1). With +
you add a new attribute to our mesh.Domain
should be Vertex
and DataType
should be Color
. The color you select below is the default color all your vertices of this mesh will be assigned to:
Viewport Shading
and select Attributes
. Then switch into Vertex Paint
mode:Strength
slider to get any grey tone.
This is how it looks like in Edit mode
:
Before export, make sure your face normals are continuous for all areas which should behave as a single piece of cloth ingame. Otherwise each discontinuous area will be affected by the cloth dynamics (set in your cfg) individually and you won’t get a continuous deflection across your cloth surface. In this example this is already the case, so nothing more to do here. However for other (custom) meshes this could not be the case. Therefore:
A
to select all vertices of your mesh (or choose all vertices which should belong to one cloth section)M
, choose By Distance
Shade Smooth
If imported via cfg: Click on the model –> Ctrl A
–> All Transforms
. Alternatively set all Location, Rotation values to 0 (except Rotation W = 1) and Scale to 1. Which option you choose, determines if you have to adjust the
Orientation_Transform in the cfg afterwards or not. If you decided to use Ctrl A
and to export the whole cfg as well, which is probably the way most people here do it, then you have no locations, rotations, scales to adjust afterwards.
However there might be cases, where you don’t want to export the cfg, but just the model. In such cases: If you chose Ctrl A
, you have to manually set all Location, Rotation, Scale values to their default values in the cfg. But if you
set all Location, Rotation, Scale values to their default values in Blender before export, you don’t have to touch the original Orientation_Transform in the cfg (this is, because we export the model via glTF 2.0 not via Addon).
glTF 2.0
as export option with the settings below:
your_path/rdm4-bin.exe -i your_path/your_file.glb -g=P3f_N3f_G3f_B3f_T2f_C4b
and if you imported via .cfg add:
--negative-x-and-v0v2v1
to mirror the model correctly again.
<VertexFormat>P3f_N3b,T2f</VertexFormat>
. Nothing to worry about. Example:<Clothes>
<Config>
<ConfigType>CLOTH</ConfigType>
<Transformer>
<Config>
<ConfigType>ORIENTATION_TRANSFORM</ConfigType>
<Conditions>0</Conditions>
<Position.x>0.073091</Position.x>
<Position.y>1.488325</Position.y>
<Position.z>0.002520</Position.z>
<Rotation.x>0.000000</Rotation.x>
<Rotation.y>0.000000</Rotation.y>
<Rotation.z>0.000000</Rotation.z>
<Rotation.w>1.000000</Rotation.w>
<Scale>0.900000</Scale>
</Config>
</Transformer>
<Materials>
<Config>
<ConfigType>MATERIAL</ConfigType>
<Name>flag_cloth</Name>
<ShaderID>0</ShaderID>
<VertexFormat>P3f_N3b,T2f</VertexFormat>
<NumBonesPerVertex>0</NumBonesPerVertex>
<DIFFUSE_ENABLED>1</DIFFUSE_ENABLED>
<cClothDiffuseTex>data/dlc11/graphics/buildings/ornaments/airport/maps/dlc11_airport_ornaments_flags_diff.psd</cClothDiffuseTex>
<NORMAL_ENABLED>1</NORMAL_ENABLED>
<cClothNormalTex>data/graphics/props/flags/ornamental_flags/maps/ornamental_banners_norm.psd</cClothNormalTex>
<cDiffuseColor.r>1.000000</cDiffuseColor.r>
<cDiffuseColor.g>1.000000</cDiffuseColor.g>
<cDiffuseColor.b>1.000000</cDiffuseColor.b>
<cSpecularColor.r>0.200000</cSpecularColor.r>
<cSpecularColor.g>0.200000</cSpecularColor.g>
<cSpecularColor.b>0.200000</cSpecularColor.b>
<cGlossinessFactor>0.500000</cGlossinessFactor>
<cAlphaRef>0.100000</cAlphaRef>
<DYE_MASK_ENABLED>0</DYE_MASK_ENABLED>
<Atlas>Atlas</Atlas>
<LOGO_ATLAS_ENABLED>0</LOGO_ATLAS_ENABLED>
<INVERSE_LOGO_COLORING>0</INVERSE_LOGO_COLORING>
<RimEffect>RimEffect</RimEffect>
<cRimColor.r>1.000000</cRimColor.r>
<cRimColor.g>1.000000</cRimColor.g>
<cRimColor.b>1.000000</cRimColor.b>
<cRimIntensity>1.000000</cRimIntensity>
<Ripples>Ripples</Ripples>
<RIPPLES_ENABLED>0</RIPPLES_ENABLED>
<cRippleTiling>0.500000</cRippleTiling>
<cRippleSpeed>1.000000</cRippleSpeed>
<cRippleNormalIntensity>0.200000</cRippleNormalIntensity>
<TerrainAdaption>TerrainAdaption</TerrainAdaption>
<ADJUST_TO_TERRAIN_HEIGHT>1</ADJUST_TO_TERRAIN_HEIGHT>
<DisableReviveDistance>0</DisableReviveDistance>
</Config>
</Materials>
<Name></Name>
<FileName>data\dlc11\graphics\buildings\ornaments\airport\rdm\airport_ornaments_flag_01.rdm</FileName>
<AdaptTerrainHeight>0</AdaptTerrainHeight>
<UniqueSimulation>0</UniqueSimulation>
<AllowLocalWind>1</AllowLocalWind>
<LocalWindDirection>0.000000</LocalWindDirection>
<WindStrength>0.500000</WindStrength>
<Gravity>0.010000</Gravity>
<LineSize>1.000000</LineSize>
<CollisionIndex>0</CollisionIndex>
</Config>
</Clothes>
Result ingame: