svictor
Registered
This is a prove of concept for creating some real 3D animation without using commercial software, which could help expand possibility for creating RF2 contents using only free & open source software.
The main idea is to use a sequence of 3D models of an object in combination with sequenced texture animation, which shows only one frame of the real 3D models at a time.
The example here is a simple seagull model I made for Dundrod 1955.
The seagull's wings are made into multiple copies of 3D models, each model represent a frame of the object animation. And then each model's UV is mapped at specific coordinates which reveals one of the wing models only at specific texture frame.
In this example, there are 12 frames, which results 12 wing models(as frames), and the corresponding texture is split into 4x4 grids. 4x3 rows are used for paint wings. Each wing frame will take one grid of the texture, and is saved to one of the texture sequence while other frames are set invisible.
Final model & single wing UV map:
Final UV map & texture of all wings objects in GIMP:
Final exported texture sequence:
And material(JSON) setting for wings:
"FrameCount" is the number of available texture sequence, which is 12 in this case.
"Rate" is playing speed, high number faster.
"Sequence" is playing order and sequence, the number is each texture's last digits, and can be repeated.
"Texture" is the texture file name without last digits.
(alternatively, 3dsimed can be used to setup animation frames in GMT file.)
Example of animation code in JSON file:
Full JSON sample code:
For details about how to add or edit JSON animation, see guide:
https://forum.studio-397.com/index....-opensource-free-software.70938/#post-1085292
How animation plays in Dundrod 1955 (with additional pivot point rotation animation):
Finally, if there are a pack of seagulls, the above material can be duplicated with different "Rate" or "Sequence" setting for different seagulls to generate more randomness and dynamic animation, which also makes this method more flexible.
A working GMT+DDS+JSON example files can be found in attached ZIP file, and additional info is included in readme file inside ZIP.
The main idea is to use a sequence of 3D models of an object in combination with sequenced texture animation, which shows only one frame of the real 3D models at a time.
The example here is a simple seagull model I made for Dundrod 1955.
The seagull's wings are made into multiple copies of 3D models, each model represent a frame of the object animation. And then each model's UV is mapped at specific coordinates which reveals one of the wing models only at specific texture frame.
In this example, there are 12 frames, which results 12 wing models(as frames), and the corresponding texture is split into 4x4 grids. 4x3 rows are used for paint wings. Each wing frame will take one grid of the texture, and is saved to one of the texture sequence while other frames are set invisible.
Final model & single wing UV map:
Final UV map & texture of all wings objects in GIMP:
Final exported texture sequence:
And material(JSON) setting for wings:
"FrameCount" is the number of available texture sequence, which is 12 in this case.
"Rate" is playing speed, high number faster.
"Sequence" is playing order and sequence, the number is each texture's last digits, and can be repeated.
"Texture" is the texture file name without last digits.
(alternatively, 3dsimed can be used to setup animation frames in GMT file.)
Example of animation code in JSON file:
Code:
"textures":[
{
"AnisoLevel":0,
"ChromaColor":0,
"Flags":[
"CUBETF_AUTOMIPMAP",
"CUBETF_TRILINEAR",
"CUBETF_CHROMAKEY",
"CUBETF_OWNEDBYMATERIAL",
"CUBETF_NOZBUFFERREQUIRED"
],
"FrameCount":12,
"Method":"CUBETAM_CYCLE",
"MipBias":0,
"MipLevels":1,
"Name":"albedoMap",
"Rate":15,
"Sequence":[
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
],
"ShaderPass":0,
"ShadowMipBias":0,
"SkipFrame0":false,
"StageType":"CUBETST_SRGB",
"TexChannel":0,
"Texture":"seagull",
"hasDefault":true,
"inactive":false,
"runtime":false
}
]
Full JSON sample code:
{
"dstBlend":"CUBEAB_ZERO",
"flags":[
"CUBEMAT_AMBIENTMAT",
"CUBEMAT_DIFFUSEMAT",
"CUBEMAT_SPECLARDIR",
"CUBEMAT_EMISSIVMAT",
"CUBEMAT_EMISSIVDIR"
],
"name":"SEAGULL_WING",
"parameters":{
"StandardInfo":{
"ambientColour":[
1,
1,
1,
1
],
"blendPercent":0,
"bumpScale":1,
"cubeMapFresnel":{
"Exp":4,
"Max":1,
"Min":0
},
"diffuseColour":[
1,
1,
1,
1
],
"emissiveColour":[
0,
0,
0,
1
],
"refEnhance":0,
"specFresnel":{
"Exp":4,
"Max":1,
"Min":0
},
"specPower":1,
"specularColour":[
1,
1,
1,
1
]
},
"cbParameters":{
"Base_Material":{
"AO":1,
"Metallic":0,
"Roughness":0.5,
"Specular":1
},
"Material_Adjust":{
"AlbedoTint":[
1,
1,
1,
1
],
"FarLight":1,
"Metallic":0.5,
"NormalIntensity":1,
"NormalShadowInfluence":0.5,
"Roughness":0.5,
"Specular":0.7
},
"UV_Animate":null,
"UV_Scale":{
"Albedo":[
1,
1
]
}
}
},
"preprocessorFlags":{
"ALBEDOMAP":"@Null",
"ALBEDOUV":"UV_A",
"ALBEDOUVANIMATE":"@Undef",
"AOSPECALTMAP":"@Undef",
"AOSPECALTUV":"UV_A",
"AOSPECALTUVANIMATE":"@Undef",
"AOSPECMAP":"@Undef",
"AOSPECUV":"UV_C",
"AOSPECUVANIMATE":"@Undef",
"BILLBOARD":"@Undef",
"DETAILALBEDO":"@Null",
"DETAILALBEDOBLEND":"@Undef",
"DETAILAO":"@Undef",
"DETAILMAP":"@Undef",
"DETAILMETALLIC":"@Undef",
"DETAILNORMAL":"@Undef",
"DETAILROUGHNESS":"@Undef",
"DETAILSPEC":"@Undef",
"DETAILUV":"UV_B",
"DETAILUVANIMATE":"@Undef",
"EMISSIVEMAP":"@Undef",
"EMISSIVEMODE":"@Undef",
"EMISSIVEUV":"UV_C",
"EMISSIVEUVANIMATE":"@Undef",
"METALLICROUGHNESSMAP":"@Undef",
"METALROUGHUV":"UV_A",
"METALROUGHUVANIMATE":"@Undef",
"NORMALMAP":"@Undef",
"NORMALUV":"UV_A",
"NORMALUVANIMATE":"@Undef",
"RETROREFLECTOR":"@Undef",
"TRANSLUCENCY":"@Undef",
"TRANSLUCENCYALBEDO":"@Undef",
"VERTEXALPHA":"@Undef",
"VERTEXCOLOR":"@Undef"
},
"refName":"",
"shader":"L2IBLSTANDARD",
"sortOffset":0,
"srcBlend":"CUBEAB_ONE",
"textures":[
{
"AnisoLevel":0,
"ChromaColor":0,
"Flags":[
"CUBETF_AUTOMIPMAP",
"CUBETF_TRILINEAR",
"CUBETF_CHROMAKEY",
"CUBETF_OWNEDBYMATERIAL",
"CUBETF_NOZBUFFERREQUIRED"
],
"FrameCount":12,
"Method":"CUBETAM_CYCLE",
"MipBias":0,
"MipLevels":1,
"Name":"albedoMap",
"Rate":15,
"Sequence":[
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
],
"ShaderPass":0,
"ShadowMipBias":0,
"SkipFrame0":false,
"StageType":"CUBETST_SRGB",
"TexChannel":0,
"Texture":"seagull",
"hasDefault":true,
"inactive":false,
"runtime":false
}
]
}
For details about how to add or edit JSON animation, see guide:
https://forum.studio-397.com/index....-opensource-free-software.70938/#post-1085292
How animation plays in Dundrod 1955 (with additional pivot point rotation animation):
Finally, if there are a pack of seagulls, the above material can be duplicated with different "Rate" or "Sequence" setting for different seagulls to generate more randomness and dynamic animation, which also makes this method more flexible.
A working GMT+DDS+JSON example files can be found in attached ZIP file, and additional info is included in readme file inside ZIP.
Attachments
Last edited: