Git Product home page Git Product logo

pasgltf's People

Contributors

bero1985 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pasgltf's Issues

Cant build

Hello.
I have Lazarus 2.2.2 and FPC 3.2.2
I try to build but stoped - no PasDblStrUtils in '....\externals\pasdblstrutils\src\PasDblStrUtils.pas',
I git clone it and place to ....\externals\pasdblstrutils
Recomple
And I have an error
image
How to fix it?

One more question. Is pasgltf out with OpenGL or Vulkan?
Can output be with Vulkan? RTX also?

UnitOpenGLImagePNG + UnitOpenGLImageJPEG issues with freepascal

This unit does not compile under freepascal 3.0.4:
UnitOpenGLImagePNG.pas(259,9) Error: ENDIF without IF(N)DEF

Working around that, compilation later fails at UnitOpenGLImageJPEG:
UnitOpenGLImageJPEG.pas(237,16) Error: Identifier not found "TFPReaderJPEG"

[feature request] Support lights defined in glTF

There are glTF 2.0 extensions to define lights inside glTF file. It would be very useful for me (and Castle Game Engine :) ) if PasGLTF supported reading such lights.

  1. Punctual lights (point, spot, directional) are defined in
    https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual .

    Blender can export such lights. I made example in CGE demo-models, https://github.com/castle-engine/demo-models/tree/master/gltf/punctual_lights . The test_lights.gltf inside defines 3 lights (point, spot, directional).

  2. Image-based lighting is defined in
    https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_lights_image_based .

    Example of it is in
    https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/EnvironmentTest .

For perspective camera, specifying zfar is not required

Loading a model from https://poly.google.com/view/9Vq_-HEtIHA (downloaded version using "Updated GLTF file") raises an error

Invalid GLTF document, missing "zfar" field

Indeed, glTF file doesn't specify zfar:

   "cameras" : [
      {
         "perspective" : {
            "yfov" : 0.7853981633974483,
            "znear" : 0.1000000014901161
         },
         "type" : "perspective"
      }
   ],

Looking at glTF 2.0 specification, zfar is not required for perspective cameras: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-perspective . It says "Required: No" and "If zfar is undefined, runtime must use infinite projection matrix." . But PasGLTF requires it, by reading it through Required function,

result.fPerspective.fZFar:=TPasJSON.GetNumber(Required(....

on https://github.com/BeRo1985/pasgltf/blob/master/src/PasGLTF.pas#L4050 .

Also aspectRatio is not required, according to the glTF 2.0 specification, but PasGLTF code makes it required.

Note that zfar is still required for orthographic cameras, which may explain why this bug appeared :)

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.