GLTF Import Export

User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: GLTF Import Export

Post by trueBlue »

Post Load Skel Binding Parent Dev script needs: params.SetTerminationFlag()

Code: Select all

	if(importedActorNames == "")

params.SetTerminationFlag()
	return;
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: GLTF Import Export

Post 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
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: GLTF Import Export

Post 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
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: GLTF Import Export

Post 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 411 times
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: GLTF Import Export

Post 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
Attachments
Avatar Female.RsScn
(1.95 MiB) Downloaded 35 times
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: GLTF Import Export

Post 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.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: GLTF Import Export

Post by trueBlue »

Confirm using the Normal tools restores the color
The eyes moved :o
Eyes moved.png
Eyes moved.png (81.67 KiB) Viewed 398 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
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: GLTF Import Export

Post 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.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: GLTF Import Export

Post 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
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: GLTF Import Export

Post by trueBlue »

Great!
Not sure if you noticed, the character has morphs too
This may be why the eyes got messed up
Post Reply