Code Monkey home page Code Monkey logo

Comments (14)

ziriax avatar ziriax commented on May 28, 2024

Thanks! We are not yet using the plugin at WonderMedia, so it's nice to see people testing it out already 👍

The GLTF 2.0 spec doesn't have lights unfortunately, and we don't directly need this at WonderMedia, we only use GLTF for exporting meshes.

That being said, a draft extension for lights does exist, KHR_Lights.

@donmccurdy Do you think the KHR_Lights extension will undergo major changes?

from maya2gltf.

donmccurdy avatar donmccurdy commented on May 28, 2024

The draft KHR_lights spec is unlikely to change much between now and ratification, excluding the proposed addition of a range property. There are still some missing implementation details like lighting equations, which we plan to clarify.

from maya2gltf.

ziriax avatar ziriax commented on May 28, 2024

@donmccurdy Thanks for fast reply!

@samubiquity6 So the extension for supporting lights is rather stable, however looking at the conversation, animated lights are not yet ready in the spec. Also Maya2glTF is using the GLTF library from COLLADA2GLTF, so I must first check if that library supports the KHR Lights extension. Anyway, since my employer doesn't need support for lights in the short term, I will have to code this in my spare time, so don't expect this to be added very soon. I'll put in the backlog.

from maya2gltf.

samubiquity6 avatar samubiquity6 commented on May 28, 2024

Thanks for looking into this! Blender has an experimental export for the KHR_lights which I think will be my work around for now. But not having to move the asset through Blender would be awesome.

from maya2gltf.

ziriax avatar ziriax commented on May 28, 2024

So I guess you animate the lights in code then? So you only need static light export?

from maya2gltf.

samubiquity6 avatar samubiquity6 commented on May 28, 2024

Yea we will be animating lights in code. Static would be fantastic =)

from maya2gltf.

aguaviva avatar aguaviva commented on May 28, 2024

+1 for the light support :)

from maya2gltf.

ziriax avatar ziriax commented on May 28, 2024

PR always welcome :)

from maya2gltf.

aguaviva avatar aguaviva commented on May 28, 2024

eheh indeed! I don't have Maya and I am asking for a friend, but if I can help with stuff that is in my area of expertise I'd be glad to do so. (I wrote Cauldron, a VK and DX12 GLTF 2.0 visualizer)

from maya2gltf.

ziriax avatar ziriax commented on May 28, 2024

Wow Cauldron looks impressive!

The problem with exporting lights is that GLTF 2.0 doesn't define a standard for that yet.

So we would have to pick an extension.

The most obvious one - KHR lights - doesn't seem to support animation, which imho is important to have.

So the first thing to consider is what extensions will need to be supported.

Because writing the code for exporting the lights and animations itself is very easy to do; we already export cameras, so supporting lights is very similar...

from maya2gltf.

donmccurdy avatar donmccurdy commented on May 28, 2024

KHR_lights_punctual is the glTF standard for analytical lights, and it's fully ratified at this point.

While it doesn't support animation, that's sort of an independent issue, and would probably be fixed with an advanced animation extension (like KhronosGroup/glTF#1301 (DRAFT)), rather than a brand new lights extension.

from maya2gltf.

aguaviva avatar aguaviva commented on May 28, 2024

Thanks Ziriax! The status of the KHR_lights_punctual extension is complete since November 2018. Blender for example fully supports it and in Cauldron spotlights automatically cast shadows. .

This extension does support animation of the position and the target (for spots), but the color and other attributes are fixed, so yeah it is very similar to a camera.

from maya2gltf.

ziriax avatar ziriax commented on May 28, 2024

Thanks for all the feedback!

It seems the GLTF module from the COLLADA2GLTF project has no support for this extension yet, so the first thing needed is to add this to our customized fork at https://github.com/Ziriax/COLLADA2GLTF

As soon as that is completed, exporting lights would be a trivial task

from maya2gltf.

fire avatar fire commented on May 28, 2024

I know how to do this, but I think we should first migrate to the official version of collada2gltf.

from maya2gltf.

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.