Coder Social home page Coder Social logo

Supported image files about gltf HOT 16 CLOSED

khronosgroup avatar khronosgroup commented on June 1, 2024
Supported image files

from gltf.

Comments (16)

tparisi avatar tparisi commented on June 1, 2024

Patrick,

I think BMP is OK to ignore, but are you saying that .gif is hard to deal
with? Obviously it's a native web format.

On Tue, Mar 19, 2013 at 12:12 PM, Patrick Cozzi [email protected]:

Ignoring texture compression for the moment, I currently wrote the spec to
support the following image formats because these formats are natively
supported by modern web browsers: .jpg, .png, .bmp, and .gif.

However, I see little value in supporting .bmp and .gif especially since
it could increase the burden for OpenGL and OpenGL ES users using C++.

Do we agree that just .jpg and .png are sufficient (again, ignoring
compression)?

Also, I believe the spec should explicitly mention the formats since, for
example, COLLADA allows for any image format, which makes it really hard to
write a renderer and know it is going to work on all models.


Reply to this email directly or view it on GitHubhttps://github.com//issues/10
.

Tony Parisi [email protected]
CTO at Large 415.902.8002
Skype auradeluxe
Follow me on Twitter! http://twitter.com/auradeluxe
Read my blog at http://www.tonyparisi.com/

Read my book! WebGL, Up and Running
http://shop.oreilly.com/product/0636920024729.do
http://www.amazon.com/dp/144932357X

from gltf.

pjcozzi avatar pjcozzi commented on June 1, 2024

gif is not hard for web browsers (assuming we ignore animated gif), but it could be painful for developers in other languages. Does it really provide value over png or jpg?

from gltf.

tparisi avatar tparisi commented on June 1, 2024

Only when animated. When animated, it's hugely valuable and a lot of people
use it in their web pages and games, still.

Which, now that actually gets me thinking about another thing. WebGL lets
you put video on a texture. My applications are using that a lot, I have
several places where we are mapping video onto surfaces for movie
thumbnails, videos playing on a virtual computer screen and so on. Given
that WebGL is our primary target it would be BAD if we didn't support
whatever texture types WebGL supports.

Maybe this is a job for profiles?

Tony

On Tue, Mar 19, 2013 at 12:31 PM, Patrick Cozzi [email protected]:

gif is not hard for web browsers (assuming we ignore animated gif), but it
could be painful for developers in other languages. Does it really provide
value over png or jpg?


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-15137709
.

Tony Parisi [email protected]
CTO at Large 415.902.8002
Skype auradeluxe
Follow me on Twitter! http://twitter.com/auradeluxe
Read my blog at http://www.tonyparisi.com/

Read my book! WebGL, Up and Running
http://shop.oreilly.com/product/0636920024729.do
http://www.amazon.com/dp/144932357X

from gltf.

pjcozzi avatar pjcozzi commented on June 1, 2024

We want to do videos, but real videos, not with animated gifs. We haven't thought about it much yet, but it's possible that it would only be in the WebGL profile or a separate extension.

from gltf.

RemiArnaud avatar RemiArnaud commented on June 1, 2024

I think image conversion is out of scope for the glTF spec

-----Original Message-----
From: Patrick Cozzi [email protected]
Date: Tue, 19 Mar 2013 12:12:47
To: KhronosGroup/[email protected]
Reply-To: KhronosGroup/glTF [email protected]
Subject: [glTF] Supported image files (#10)

Ignoring texture compression for the moment, I currently wrote the spec to support the following image formats because these formats are natively supported by modern web browsers: .jpg, .png, .bmp, and .gif.

However, I see little value in supporting .bmp and .gif especially since it could increase the burden for OpenGL and OpenGL ES users using C++.

Do we agree that just .jpg and .png are sufficient (again, ignoring compression)?

Also, I believe the spec should explicitly mention the formats since, for example, COLLADA allows for any image format, which makes it really hard to write a renderer and know it is going to work on all models.


Reply to this email directly or view it on GitHub:
#10

from gltf.

fabrobinet avatar fabrobinet commented on June 1, 2024

If that can be in the SPEC it should be per profile. But not sure if we can/should be aware of all images format here either. We just need to make sure that for a given profile we can convert to what's is known to be the best.

from gltf.

tparisi avatar tparisi commented on June 1, 2024

Agree

On Tue, Mar 19, 2013 at 3:31 PM, Rémi Arnaud [email protected]:

I think image conversion is out of scope for the glTF spec

-----Original Message-----
From: Patrick Cozzi [email protected]
Date: Tue, 19 Mar 2013 12:12:47
To: KhronosGroup/[email protected]
Reply-To: KhronosGroup/glTF [email protected]
Subject: [glTF] Supported image files (#10)

Ignoring texture compression for the moment, I currently wrote the spec to
support the following image formats because these formats are natively
supported by modern web browsers: .jpg, .png, .bmp, and .gif.

However, I see little value in supporting .bmp and .gif especially
since it could increase the burden for OpenGL and OpenGL ES users using
C++.

Do we agree that just .jpg and .png are sufficient (again, ignoring
compression)?

Also, I believe the spec should explicitly mention the formats since, for
example, COLLADA allows for any image format, which makes it really hard to
write a renderer and know it is going to work on all models.


Reply to this email directly or view it on GitHub:
#10


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-15147688
.

Tony Parisi [email protected]
CTO at Large 415.902.8002
Skype auradeluxe
Follow me on Twitter! http://twitter.com/auradeluxe
Read my blog at http://www.tonyparisi.com/

Read my book! WebGL, Up and Running
http://shop.oreilly.com/product/0636920024729.do
http://www.amazon.com/dp/144932357X

from gltf.

fabrobinet avatar fabrobinet commented on June 1, 2024

Related to #18

from gltf.

pjcozzi avatar pjcozzi commented on June 1, 2024

Are we in agreement that the glTF profile should determine what image formats are allowed, and that the WebGL 1.0 profile should only allow png and jpg (again, ignoring compressed textures right now).

The spec cannot leave this open-ended because then it will be impossible to write a renderer that works with all glTF content because a web browser, for example, doesn't support tiff files.

from gltf.

RemiArnaud avatar RemiArnaud commented on June 1, 2024

That's correct.

This said, this also implies the converter need to convert all the images
it gets into the allowed image format... otherwise it would not be
compliant to the spec?

On Wed, Mar 20, 2013 at 5:14 AM, Patrick Cozzi [email protected]:

Are we in agreement that the glTF profile should determine what image
formats are allowed, and that the WebGL 1.0 profile should only allow pngand
jpg (again, ignoring compressed textures right now).

The spec cannot leave this open-ended because then it will be impossible
to write a renderer that works with all glTF content because a web browser,
for example, doesn't support tiff files.


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-15171997
.

from gltf.

mramato avatar mramato commented on June 1, 2024

One thing I'll add to this conversation, that some people may not be aware of. The HTML img tag does not have any specific formats defined. So even if a web browser only supported ppm images, it would be considered 'to spec'. In the grand scheme of things, I think it's a good call to have specific formats hard-coded into the profile, and jpg and png are good choices, but as newer formats, like webP, begin to take hold, it should allow for the possibility of adding additional formats in future profiles.

Meanwhile, the new video element has a different take. While there are no specific video formats in the spec, HTML can specify multiple formats for the same video element and the browser chooses whichever one it supports the best. It will probably be even harder to specify specific formats for video textures because of this, plus browser support for video is still all over the place.

from gltf.

RemiArnaud avatar RemiArnaud commented on June 1, 2024

FYI - There is a http method for asking for specific format, it is in the header, called media-range.

from gltf.

pjcozzi avatar pjcozzi commented on June 1, 2024

This said, this also implies the converter need to convert all the images it gets into the allowed image format... otherwise it would not be compliant to the spec?

Yeap - that is the plan.

from gltf.

fabrobinet avatar fabrobinet commented on June 1, 2024

@mramato you have a very good point, new image format may come up and we do not want to be blocked by early choices. One way to handle this would be add them in minor revision of the spec.
@pjcozzi we can start with just jpg and png as you suggest. and open up this limitation as mentioned above in other spec revision if really needed.

from gltf.

pjcozzi avatar pjcozzi commented on June 1, 2024

OK with me. We also also add extensions if they are needed before minor revisions.

from gltf.

pjcozzi avatar pjcozzi commented on June 1, 2024

Updated schema.

from gltf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.