Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Looking for info] Confused about cmgen usage/outputs #7844

Closed
Froyok opened this issue May 11, 2024 · 4 comments
Closed

[Looking for info] Confused about cmgen usage/outputs #7844

Froyok opened this issue May 11, 2024 · 4 comments

Comments

@Froyok
Copy link

Froyok commented May 11, 2024

Hi !
I'm looking at cmgen provided with Filament, but I'm a bit confused about it usage.
(To clarify the intended use is not for Filament but for another software.)

I was hoping to be able to use cmgen to pre-filter my cubemaps for IBL lighting (radiance notably).
So far I can only output the mip level as individual files using the extract command, I cannot find a way to get a single dds file with all the mips together.

Using:
cmgen -f dds -x ./out cubemap.exr

Is there a way to output a single dds file in cube format that contains all the mip levels ?
Or are we supposed to build that final cubemap file ourselves via another tool ? If so which one ?

The documentation inside BUILDING.md via the section Running the native samples doesn't explain followup steps. Also I saw that the example uses the ktx format, which produce files I cannot inspect (or I don't know tools that allow it). Ideally I would prefer to use DDS in my other software.

Thanks in advance. :)

@romainguy
Copy link
Collaborator

cmgen doesn't output DDS files, only individual files or combined as KTX. KTX is an open format supported by Khronos: https://www.khronos.org/ktx/

@Froyok
Copy link
Author

Froyok commented May 11, 2024

Do you know by any chance a tool that allow to go from KTX to DDS ?
I have tried to find one for a while without any luck.

@romainguy
Copy link
Collaborator

No idea, we live in a world of GL/Vulkan/Metal, so DDS is not really something we ever worried about/looked into. KTX is easy to handle btw (esp. KTX1, it's essentially a direct memory mapping from GL constants to bytes on disk).

@Froyok
Copy link
Author

Froyok commented May 11, 2024

Yeah, after looking around it seems I will have to write something on my own.
Thx for the inputs ! :)

@Froyok Froyok closed this as completed May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants