[Bf-committers] Bf-committers Digest, Vol 746, Issue 1

AlexApps alex.apps99 at gmail.com
Sun May 17 12:10:28 CEST 2020


It's unlikely that your library will replace an industry-tested one that is
already fully implemented, especially since yours has no exporting
functionality.

What I suggest instead, is that you create an addon for this importer and
perhaps if it's successful enough you could add it to Blender's bundled
addons set as an optional addon for users to enable, should they want
better performance, or any other features your library offers.

On Sun, 17 May 2020 at 22:00, <bf-committers-request at blender.org> wrote:

> Send Bf-committers mailing list submissions to
>         bf-committers at blender.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.blender.org/mailman/listinfo/bf-committers
> or, via email, send a message with subject or body 'help' to
>         bf-committers-request at blender.org
>
> You can reach the person managing the list at
>         bf-committers-owner at blender.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Bf-committers digest..."
> Today's Topics:
>
>    1. Proposal: New Importer for both glTF and COLLADA (Recep Aslantas)
>
>
>
> ---------- Forwarded message ----------
> From: Recep Aslantas <info at recp.me>
> To: "bf-committers at blender.org" <bf-committers at blender.org>, "
> foundation at blender.org" <foundation at blender.org>
> Cc: "ton at blender.org" <ton at blender.org>
> Bcc:
> Date: Sat, 16 May 2020 19:44:13 +0300 (TRT)
> Subject: [Bf-committers] Proposal: New Importer for both glTF and COLLADA
> Hi,
>
> My name is Recep,
>
> I was working on library called AssetKit (
> https://github.com/recp/assetkit )
> Recently I have implemented importing Morph Targets and Animation from
> glTF.
>
> AssetKit can import all glTF 2.0 and with
> "KHR_materials_pbrSpecularGlossiness"
> extension. So it can import Metallic Roughness + Specular Glossiness
> materials.
>
> It also supports COLLADA 1.4 and COLLADA 1.5 (common profile).
> It uses single interface for both glTF and COLLADA 1.4/1.5.
>
> AssetKit comes with lot of options (and utils), a few options are (all are
> optional):
> * Triangulate polygons
> * Generate normals
> * Compute Bounding Box
> * Bugfixes for Transparency
> * Compute exact center
> * Convert Coordinate System to Another (Any-to-Any)
> I'm trying to make it faster and more flexible by time. Recently I have
> written a json and xml parser
> to parse glTF and COLLADA fast as possible. These new parsers also reduced
> the binary size and
> make the build time faster and portable. Because these are header-only,
> see my Github https://github.com/recp?tab=repositories to see them
>
> AssetKit is written in C99 and its size is only ~ 240KB + 50KB stb_image.h
> == 290KB, and it can import
> glTF and COLLADA files and load images. This will reduce Blender size too
> and increase build time.
>
> The API interface must be very easy to work with.
>
> AssetKit also tries to make the loading and rendering faster by providing
> utilities and options.
>
> For instance, after you loaded a file with AssetKit like:
>
> AkDoc *doc;
> AkResult ret;
>
> ret = ak_load(&doc, "sample.gltf or .dae", NULL);
>
> you can import morph targets into single buffer with desired inputs with
> desired order:
>
> void  *morphBuffer;
> size_t buffSize, targetByteStride;
>
> static AkInputSemantic desiredInputs[] = {
> AK_INPUT_SEMANTIC_POSITION,
> AK_INPUT_SEMANTIC_NORMAL,
> AK_INPUT_SEMANTIC_TANGENT
> };
>
> ak_morphInterleaveInspect(&buffSize, &targetByteStride, morph,
> desiredInputs, 3);
> morphBuffer = malloc(buffSize);
> ak_morphInterleave(morphBuffer, morph, desiredInputs, 3);
>
> now you can pass morphBuffer to GPU directly. This is optional step of
> course.
>
> AssetKit also provides simple and elegant API like Javascript:
>
> object1 = ak_getObjectById(doc, "object-id")
> object2 = ak_getObjectByUrl(url)
>
> The memory management in AssetKit is awesome. It provides hierarchical
> memory allocator,
> if you free parent node or document then sub nodes or the whole document
> will be freed.
>
> I propose to replace OpenCOLLADA and glTF importer with AssetKit.
> AssetKit will also support additional formats without changed the
> integration if possible
> as extension library like AssetKit-Ext.lib
>
> I can help to integrate it with Blender and feedbacks are always welcome.
> You can propose or request some changes before integration if you like it.
>
> I'll provide CMake build files as soon as possible. The exporter side will
> be available in the future.
>
> Please take a look at the repo and sources at
> https://github.com/recp/assetkit
> and ask any questions if you have any.
>
> You will also get better support for this library than others :) I always
> respond fast as possible on Github.
> Also any contributions/contributors/feedbacks... are always welcome.
>
> Thanks
>
> - Recep
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> https://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list