Page 6 of 7

Re: GLTF Import Export

Posted: 20 Nov 2023, 19:26
by trueBlue
Post Load Skel Binding Parent Dev script needs: params.SetTerminationFlag()

Code: Select all

	if(importedActorNames == "")

params.SetTerminationFlag()
	return;

Re: GLTF Import Export

Posted: 20 Nov 2023, 20:17
by trueBlue
I accidently pressed the Import button and Canceled the Import after I imported a GLTF file and pressed the Cleanup button
ERR Source object: /Scripts/CustomCommands/GLTFgroup/GLTF End Import Error: Microsoft JScript runtime error Description: Invalid procedure call or argument Error code: 0x800a0005 - (null) Line: 329, Char: 2 Script text: var lightData = Node.Value(light + "/LightData", "data");
Edit: I think the GLTF file gets corrupted!
Had a few crashes trying to re-Import the same exported GLTF file

Re: GLTF Import Export

Posted: 20 Nov 2023, 20:37
by trueBlue
clintonman wrote: 20 Nov 2023, 18:46
trueBlue wrote: 20 Nov 2023, 17:20 Something odd about the Imported Spotlights with No Shadow
Imported Spotlights No Shadow issue.png
temporary workaround for now: change ThresholdAttenuation from 0.05 to 0.005
Setting the ThresholdAttenuation from 0.05 to 0.005 makes the shadows dim

Setting the AttQuadratic = 0.000 looks better IMO

Re: GLTF Import Export

Posted: 20 Nov 2023, 21:07
by trueBlue
Any chance you could add the path to the Export folder and Open button script?
Export - location string and Open script.png
Export - location string and Open script.png (1.71 KiB) Viewed 451 times

Re: GLTF Import Export

Posted: 21 Nov 2023, 21:01
by trueBlue
First try on Exporting and Importing a Character with animation
Worked pretty good! :bananathumb:
Material is very dim
The animation imported with two extra keyframes: 1 & 40
I removed these keyframes, now the animation is as the original
Not sure how the how the Clips are supposed to Import but it looks like a couple of Disabled Clips imported
Note: This is in regard to Disabled Clips supposedly not Exporting
Avatar Female scene
Prep:
Scene Instanced
Removed Pivot from head & body
Disabled all Clips except two

Import with High Complexity
Arm gets brighter when close to the body.png
Note: Arm gets brighter when close to body

Import with Med Complexity
Material is Black

Re: GLTF Import Export

Posted: 22 Nov 2023, 01:40
by clintonman
trueBlue wrote: 21 Nov 2023, 21:01 First try on Exporting and Importing a Character with animation
Worked pretty good! :bananathumb:
Material is very dim
The animation imported with two extra keyframes: 1 & 40
I removed these keyframes, now the animation is as the original
Not sure how the how the Clips are supposed to Import but it looks like a couple of Disabled Clips imported
Note: This is in regard to Disabled Clips supposedly not Exporting
Avatar Female scene
Prep:
Scene Instanced
Removed Pivot from head & body
Disabled all Clips except two

Import with High Complexity
Arm gets brighter when close to the body.png
Note: Arm gets brighter when close to body

Import with Med Complexity
Material is Black
I think the normals of the mesh are not exporting correctly or not importing correctly. If you use any of the normals tools after import the color texture comes back.

Only 2 clips are exporting and only 2 clips import back in, but in script they are duplicated during the transfer of the animation to the actor. This is a weird one. If I import the fox sample I get the clips but no duplicates.

Edit: I have a theory. The animation from the gltf file is not on all the joints of the actor. So maybe the script is creating the duplicate clips to compensate somehow.

Re: GLTF Import Export

Posted: 22 Nov 2023, 02:06
by trueBlue
Confirm using the Normal tools restores the color
The eyes moved :o
Eyes moved.png
Eyes moved.png (81.67 KiB) Viewed 438 times
.
There is only one material texture and no animation for the head or eyes
Edit: BTW... for non-shinny materials, setting Roughness to 0.950 seems to be the magic number

Re: GLTF Import Export

Posted: 22 Nov 2023, 04:40
by clintonman
Did some tests and it looks like exporting an actor with more than 1 mesh has skinning issues but also normal issues. I boolean combined the 2 meshes, reskinned, exported and imported and the normals were ok. The duplicate clips may also be related since I didn't get the dups this time either.

Imported to Blender and the normals look wrong there too for the 2 mesh actor and the 1 mesh actor.

Re: GLTF Import Export

Posted: 22 Nov 2023, 05:22
by clintonman
gltfNormalExportFixed.jpg
Normals export is fixed. The problem was that the actor meshes have to use the WldMatrix for the vertices and normals. The normals adjustment only needs the rotation, so the scale and translation of the matrix was messing them up.

Edit: Duplicate animation clips on actors with more than 1 mesh is fixed

Re: GLTF Import Export

Posted: 22 Nov 2023, 06:39
by trueBlue
Great!
Not sure if you noticed, the character has morphs too
This may be why the eyes got messed up