glTF-Transform icon indicating copy to clipboard operation
glTF-Transform copied to clipboard

Add ability to remove EXT_GPU_INSTANCING usage

Open gkjohnson opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

Right now you can convert a model to use EXT_GPU_INSTANCING instances using the instance command but this is not supported by a lot of engines (Unreal, other tools). It would be nice if it were possible to remove the extension usage in cases where you don't want it / can't use it.

Describe the solution you'd like

  • Add a "--remove-instances" option to the "gltf-transform instance" command
  • Or unpack instances and recompute them based on the settings of the instance command. Ie running a model that already has instances with the following command would remove all instances:
gltf-transform input.glb output.glb --min 10000000

Describe alternatives you've considered

Reading into the three.js editor and unpacking all instances manually.

Additional context

None

gkjohnson avatar Aug 30 '24 06:08 gkjohnson

I like the idea! This would involve:

  • add an uninstance() (deinstance?) transform to the /functions package
  • add a new command or flag to the CLI

I'm not immediately able to work on this, but PRs would be welcome.

donmccurdy avatar Aug 30 '24 09:08 donmccurdy

In progress:

  • https://github.com/donmccurdy/glTF-Transform/pull/1525

donmccurdy avatar Oct 10 '24 03:10 donmccurdy

Awesome! Thanks Don

gkjohnson avatar Oct 11 '24 13:10 gkjohnson