glTF File Support

free scripts, plugins, models, textures
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

glTF File Support

Post by clintonman »

Read and write glTF files.
Supports glTF 2.0 files in the form of gltf plus bin files.
Does not read glb binary, compressed or embedded formats.
It will read in actors but will not properly write actors.

It can load most of the samples found here:
https://github.com/KhronosGroup/glTF-Sa ... master/2.0

It supports glTF extensions for texture transform and punctual lights, which just means "lights". None of the other extensions are supported since trueSpace doesn't have pbr(physically base rendering) support they wouldn't be visible anyway.

http://clintons3d.com/plugins/truespace ... n_out.html

The rsx plugin used will not run on Windows XP.

IMPORTANT: Clintons3dplugin rsx version v1638446, released Oct 26 is required to avoid a crash bug when running one of the scripts.
http://clintons3d.com/plugins/truespace ... index.html
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 File Support

Post by clintonman »

Update:

lots of fixes/improvements

The 2 biggest fixes are that large mesh exports has been fixed. It was limited to 65536 vertex indices.
The second was to add a warning for large numbers of large texture imports that will crash tS. There is nothing in the SDK to indicate D3D is running out of memory, so a hack is in place to basically count the total number of pixels in all the images and if it reaches a certain point give the abort option.
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 File Support

Post by clintonman »

Update:

installer fix - it was not updating the custom material files
material exports more panels
rsx plugin version 1638404
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 File Support

Post by clintonman »

Update: Nov 19

v1638406 plugin
bind pose fixed so actor export is all good now
major changes to the lights and materials
animation exports interpolation linear and step, all other interps export as linear
increase the number of joints a skeleton can have for exporting
can export selected objects from inside a group
clean morph helper nodes for import and export
morphs export with names
remove the unused mesh instance nodes during cleanup
light intensity multiplier for the scene - increase intensity for dim imports, decrease when import scene with lights but using medium material complexity option
fixed 2 morph export bugs
new actor animation conversion script to use on actors before exporting - transfers animation from the actor and skeleton nodes into the skeleton root node
imports light intensity
don't export disabled animation clips
updated the material details button
will import glb format files - but without any textures
reflection environment to selected item or to all materials if no renderable scene item is selected
option to import gltf directional light as tS directional or tS infinite light types

The new materials need to know how many lights are in the scene, so if the number of lights changes there is a "Set Material Light Count" button to update the count.
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 File Support

Post by clintonman »

Update Nov 26

fix mesh normals export
fix duplicate animation clips on actor import
tune light intensity export values
use specular strength in the roughness export calculation
use specular color to control metallic value export, more saturated => more metallic, 0 saturation(black, gray white) non-metals
defaults the export file name from the selection or scene name
fixed export select bug
fix multi mesh actor export
easier morph import
reset morph values on import - they were all maxed out
remove extraneous joint and make the root bone thin - still looks weird but doesn't get in the way anymore
clean more temporary nodes
script to set light attenuation for gltf pbr materials
non-gltf material export adjust roughness and metallic values
use specular strength in the roughness factor export
frame skip option - read baked keyframes faster and prevents a source of crashing, any animation with more than 300 keyframes will skip every other keyframe (anti-crash measure)
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 File Support

Post by clintonman »

Update Dec 13


rsx plugin v1638408
fix import first frame always at zero time bug
morph animation export fixes
added scripts to convert morph animations into gltf compatible forms before exporting

Mostly fixes for morph animation export.

Added a button for transferring the morph animations assigned to meshes inside actors from the mesh to the actor. Actor morph animations must be assigned to an actor animation clip, not to animation clips inside the mesh(es).

A second button will do a kind of bake process on the morph animations so that all the morphs are keyed together. If any morph has a key at a certain time then all the morphs will get a key at that same time whether or not the morph value was originally animated or not. This is how the glTF format stores morph animations, as a collection of morph weight values, if one morph is keyed they all get keyed.
Clinton Reese

http://clintons3d.com
User avatar
Emmanuel
Chief Warrant Officer
Posts: 651
Joined: 14 Jun 2009, 06:47

Re: glTF File Support

Post by Emmanuel »

Trying to export a fish.

glTF_error01.jpg
User avatar
Emmanuel
Chief Warrant Officer
Posts: 651
Joined: 14 Jun 2009, 06:47

Re: glTF File Support

Post by Emmanuel »

Clinton, may your glTF export allow to send and render animations in LightTracer render engine ?

This tool looks interesting, and very affordable (99$ for perpetual licence) !
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 File Support

Post by clintonman »

Emmanuel wrote: 14 Dec 2023, 14:56 Trying to export a fish.


glTF_error01.jpg
Did you install the rsx plugin? RsGLTFPlugin.rsx
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 File Support

Post by clintonman »

Emmanuel wrote: 14 Dec 2023, 14:59 Clinton, may your glTF export allow to send and render animations in LightTracer render engine ?

This tool looks interesting, and very affordable (99$ for perpetual licence) !
Maybe. It says it imports "(zipped) glTF2.0". So maybe it works if you zip the resulting files.
Clinton Reese

http://clintons3d.com
Post Reply