Open BujusKrachus opened 2 months ago
Bujus,
I’ll try to let you know the status of my work. Most of the discussion takes place on the x3d-ecosystem mailing list @web3d.org.
@dug9 took the blender gltf import/export and adapted it for io_scene_x3dv then added the x3d/x3dv python module so we can export .x3d, .x3dv, and .x3dj (JSON—not ready) outputs. Then we started on the exporter. I developed bone animation exports and some HAnim. The HAnim exporter is here: https://github.com/coderextreme/BlenderX3DSupport/tree/main/io_scene_x3dv it is in a halfway state between being developed for the loader (next) and the importer (after that).
But we didn’t have all of HAnim, just some faked HAnimSite and HAnimSegment
nodes in output, so effort has be placed on a brand new XML loader which
does not load bones, instead it loads Objects of type EMPTY. Many X3D
nodes are loaded this way, and they have Blender names of format <XML
tag>.<DEF/USE attribute>.
Primary things on your Blender priority list should be HAnim (humanoid animation) and animation from .x3d XML. Also a possible simple upgrade to Classic VRML would be nice. I have done some work on import, found here: https://github.com/coderextreme/BlenderX3DSupport/tree/main/io_scene_x3d note that there’s a small amount of added export code for HAnim.
So I think the X3D code should be divided into 2 modules like we are doing. One should be blender oriented, perhaps only using EMPTYs for Transforms and Groups, and making full use of Blender bones for HAnimJoint animations and ask HAnimHumanoid skin and skinCoord fields for skinning. Plus vertex groups for joints will also be involved in joints and skin animations. If you can add EMPTYs to the bones for HAnimSites and HAnimSegments, great! Also modify code from the io_scene_x3dv addon for exporting bone animations along with skinCoordWeight and skinCoordIndex fields in HAnimJoint.
I will continue to work on the non-bones export https://github.com/coderextreme/BlenderX3DSupport/tree/main/io_scene_x3dv and the loader: https://github.com/coderextreme/X3DJSONLD/blob/master/blend/localfinal.py
Another thing I am working on is CoordinateInterpolator to HAnimDisplacer conversions. I don’t think this is handled by Blender yet. Your knowledge of Blender will be useful. Here’s my current repo: https://github.com/coderextreme/ci2had
Note that this only has start and end keys in the interpolator. We will have to do animation chaining (multiple TimeSensors)/concatenation or some other technique. Or just implement both the interpolator and the displacer. I’m at a good point in the ci2had project, but I’m looking for skeletons to add displacers to.
My loader doesn’t currently handle Classic VRML or X3D JSON. We have ways to convert to .x3d.
We’d love to get the full PBR extensions imported and exported from Blender, and this will require Blender expertise. Most of my knowledge is in HAnim. Look at X_ITE’s PBR material extension in addition to the specifications: https://www.web3d.org/x3d4
https://create3000.github.io/x_ite/components/shape/physicalmaterial/
https://web3d.org/pipermail/x3d-public_web3d.org/2024-June/020587.html
Note that these are in the “X_ITE” component:
https://create3000.github.io/x_ite/components/overview/#x_ite
at the bottom.
Lots of PBR stuff could be lifted from the blender gltf addon.
That’s all for now. Please work on PBR (with X_ITE) first, if there are no higher priorities.
John
On Mon, Sep 9, 2024 at 9:46 PM BujusKrachus @.***> wrote:
Hi, i'm currently the new maintainer of the blender Web3D extension (io_scene_x3d) as it got moved to the extensions platform ( https://extensions.blender.org/add-ons/web3d-x3d-vrml2-format/) for blender 4.2+. The blender addons repository ( https://projects.blender.org/blender/blender-addons) is now read-only and most addons don't get shipped by default anymore. At some random google search i stumbled upon this repo (quite hidden if you ask me).
Are you guys planning in supporting newer blender versions and merging the progress anytime, or is your development just for legacy blender versions? I know the version difference between those projects is quite high (blender 4.2 vs 3.5 for x3dv and 2.93 for x3d) but maybe worth a shot, so code is not scattered all around the places; most API calls don't seem to have changed a lot (most breaking changes were from 2.79 to 2.8). Repo can be found here: https://projects.blender.org/extensions/io_scene_x3d
Any contributions on the extension (if you don't plan to create a completely new extension) are welcome, even if it's just some legacy bugfix ports (issues from old repo that need attention are listed here (which i guess you may or may not have already tackled to some extent): https://projects.blender.org/extensions/io_scene_x3d/issues/8) or some docu/insights on what changes are awaiting new readers here in this repo. It's currently quite hard to trace down who made when what changes for what purpose as all seems a bit out of place and at random.
@coderextreme https://github.com/coderextreme, @npolys https://github.com/npolys, @vincentmarchetti https://github.com/vincentmarchetti, @dug9 https://github.com/dug9 as you guys seem to be the main devs here for this project
— Reply to this email directly, view it on GitHub https://github.com/Web3DConsortium/BlenderX3DSupport/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMJ56FQKYCIQ5CQU6LAKDZVZMQ5AVCNFSM6AAAAABN5YH2QOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYTKMRXHA3DONA . You are receiving this because you were mentioned.Message ID: @.***>
Thank you for reaching out to us. I have also submitted a comment to issue forum at https://projects.blender.org/extensions/io_scene_x3d/issues/21 . We do have some fixes that are nearly ready to go and I would like to know the best way to submit them as patches to the io_scene_x3d extension on the new extensions platform. Would it be appropriate for us to prepare pull requests based on branches on github, or is there another route to submit changes? -- Vince Marchetti
Hi Vincent, Copying my answer from https://projects.blender.org/extensions/io_scene_x3d/issues/21
tldr:
Hi Vincent, thanks for reaching out from https://github.com/Web3DConsortium/BlenderX3DSupport/issues/10.
I am working exactly on identifying what in the Consortium's work is ready to be merged into the io_scene_x3d extension.
Happy to hear that. I myself neither have to knowledge nor the time for implementing crazy fancy new IO features like you guys do, as i'm a junior software developer and student in the field of game engineering. Just trying to keep the boat afloat (in terms of fixing bugs, adding minor features, ensuring it works with coming blender versions for basic IO, merging changes made by community), because no one else seemed to do so.
Main aspects here to look out for when attempting in bringing in your changes:
Github repo forked from the https://projects.blender.org/extensions/io_scene_x3d . If I did so, would il be possible to, when appropriate, submit a pull request for review and merging from a github branch, or is there a more appropriate mechanism for submitting changes?
Sure, i'd be glad to see new features and improved old ones. Where the code is located doesn't matter (a local merge works nontheless), so a github fork is fine. Anyways i'll add you as a contributor to the extension, giving you full read/write access to this repo. If the others wish as well, just drop a comment.
What changes are we talking about? If i sumarize the comment from John in https://github.com/Web3DConsortium/BlenderX3DSupport/issues/10 correctly, that would probably be:
Hi John, thanks for the extensive answer, although i have some trouble with good chucks of it.
Your knowledge of Blender will be useful.
Unfortunately i don't have too much knowledge either, doing mainly mobile app development as a junior software dev and 3D-modelling for personal projects. I'm just a regular student, trying to help out a bit in the OSS world. Tbh i never even used vrml/x3d because i stick to other formats for game dev projects when doing modelling stuff inside blender. Only came accros it as i tried to fix some issues in the blender bug tracker when the addons repo became read-only.
adapted it for io_scene_x3dv
is that a seperate addon/extension or does it belong to io_scene_x3d? Does it even make sense to merge your progress sometime into io_scene_x3d or should they be considered seperate projects and thus be released seperately?
But we didn’t have all of HAnim [...]
I'd wish i'd understand at least half of it...
Also a possible simple upgrade to Classic VRML would be nice.
By that i assume ensuring that vrml 1.0 are imported alongside vrml 2.0 as well, if it isn't already?
So I think the X3D code should be divided into 2 modules like we are doing
Again, I'd wish i'd understand at least half of it... Are we talking about frontend (blender) and backend (doing it's magic), seperate addons/extensions? What do they each accomplish?
Sorry that i'm not too much of a help right now :/
Hi Bujus, I must have missed the email. I will try to respond.
On Tue, Sep 10, 2024 at 7:17 AM BujusKrachus @.***> wrote:
Hi John, thanks for the extensive answer, although i have some trouble with good chucks of it.
Your knowledge of Blender will be useful.
Unfortunately i don't have too much knowledge either, doing mainly mobile app development as a junior software dev and 3D-modelling for personal projects. I'm just a regular student, trying to help out a bit in the OSS world. Tbh i never even used vrml/x3d because i stick to other formats for game dev projects when doing modelling stuff inside blender. Only came accros it as i tried to fix some issues in the blender bug tracker when the addons repo became read-only.
adapted it for io_scene_x3dv
is that a seperate addon/extension or does it belong to io_scene_x3d? Does it even make sense to merge your progress sometime into io_scene_x3d or should they be considered seperate projects and thus be released seperately?
It’s separate and makes use of x3d.py. If you want to support VRML output in addition to .x3d, x3d.py might be the best tool to use. If you can make x3d.py work for inputs, great!
But we didn’t have all of HAnim [...]
I'd wish i'd understand at least half of it...
Maybe try to look at my coderextreme BlenderX3DSupport repo. I did some work on io_scene_x3d for Blender bones (HAnimJoint) import. Probably we can do Joint and skin (skin weights). Lots of X3D stuff doesn’t translate to Blender, so just make them EMPTY objects, then name them right so the exporter will know. Provide a way to avoid adding EMPTYs
Also a possible simple upgrade to Classic VRML would be nice.
By that i assume ensuring that vrml 1.0 are imported alongside vrml 2.0 as well, if it isn't already?
VRML 3.0-3.3, VRML 4.0 soon
So I think the X3D code should be divided into 2 modules like we are doing
Again, I'd wish i'd understand at least half of it... Are we talking about frontend (blender) and backend (doing it's magic), seperate addons/extensions? What do they each accomplish?
2 modules, io_scene_x3d and io_scene_x3dv. io_scene_x3dv exports skin weights and other HAnim. Or at least it used to. WIP. io_scene_x3dv import doesn’t do anything? I also have a loader for EMPTY HAnim objects (no Blender bones).
I need to work on adding weights (vertex groups) to EMPTY objects.
Sorry that i'm not too much of a help right now :/
— Reply to this email directly, view it on GitHub https://github.com/Web3DConsortium/BlenderX3DSupport/issues/10#issuecomment-2340540007, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMJ53RIU7IDGJDEXKVTPDZV3PM3AVCNFSM6AAAAABN5YH2QOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBQGU2DAMBQG4 . You are receiving this because you were mentioned.Message ID: @.***>
Vince, should I coordinate with you or work directly with Bujus?
I have some additions for HAnim which may help with skeleton integration amongst different formats. The animation isn't ideal yet, but it might be something to integrate, plus I'll provide a test cases
On Tue, Sep 10, 2024 at 5:47 AM Vincent Marchetti @.***> wrote:
Thank you for reaching out to us. I have also submitted a comment to issue forum at https://projects.blender.org/extensions/io_scene_x3d/issues/21 . We do have some fixes that are nearly ready to go and I would like to know the best way to submit them as patches to the io_scene_x3d extension on the new extensions platform. Would it be appropriate for us to prepare pull requests based on branches on github, or is there another route to submit changes? -- Vince Marchetti
— Reply to this email directly, view it on GitHub https://github.com/Web3DConsortium/BlenderX3DSupport/issues/10#issuecomment-2340318427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMJ56LQRPHJE4HZFG7IKLZV3E3NAVCNFSM6AAAAABN5YH2QOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBQGMYTQNBSG4 . You are receiving this because you were mentioned.Message ID: @.***>
Do people have ideas for incorporating CoordinateInterpolar into Blender. I know we don't do animation import/export, but I thought I'd ask. Python would be great.
Thanks,
John
On Mon, Sep 9, 2024 at 9:46 PM BujusKrachus @.***> wrote:
Hi, i'm currently the new maintainer of the blender Web3D extension (io_scene_x3d) as it got moved to the extensions platform ( https://extensions.blender.org/add-ons/web3d-x3d-vrml2-format/) for blender 4.2+. The blender addons repository ( https://projects.blender.org/blender/blender-addons) is now read-only and most addons don't get shipped by default anymore. At some random google search i stumbled upon this repo (quite hidden if you ask me).
Are you guys planning in supporting newer blender versions and merging the progress anytime, or is your development just for legacy blender versions? I know the version difference between those projects is quite high (blender 4.2 vs 3.5 for x3dv and 2.93 for x3d) but maybe worth a shot, so code is not scattered all around the places; most API calls don't seem to have changed a lot (most breaking changes were from 2.79 to 2.8). Repo can be found here: https://projects.blender.org/extensions/io_scene_x3d
Any contributions on the extension (if you don't plan to create a completely new extension) are welcome, even if it's just some legacy bugfix ports (issues from old repo that need attention are listed here (which i guess you may or may not have already tackled to some extent): https://projects.blender.org/extensions/io_scene_x3d/issues/8) or some docu/insights on what changes are awaiting new readers here in this repo. It's currently quite hard to trace down who made when what changes for what purpose as all seems a bit out of place and at random.
@coderextreme https://github.com/coderextreme, @npolys https://github.com/npolys, @vincentmarchetti https://github.com/vincentmarchetti, @dug9 https://github.com/dug9 as you guys seem to be the main devs here for this project
— Reply to this email directly, view it on GitHub https://github.com/Web3DConsortium/BlenderX3DSupport/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMJ56FQKYCIQ5CQU6LAKDZVZMQ5AVCNFSM6AAAAABN5YH2QOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYTKMRXHA3DONA . You are receiving this because you were mentioned.Message ID: @.***>
Hey, I'm looking into developing some IndexedLineSet code, like:
It seems like colorIndex, etc would be a very good thing to have. Please inspect the import/export code to see if colorIndex is missing for IndexedLineSet.
Then we need to know if someone is already working on it, which branch to work on, etc.
Right now, I'm not seeing colors for IndexdFaceSets.
I'm drawing coordinate axes to determine which way is up with the world coordinate system, to integrate humanoids in the correct coordinates. I don't quite know what to do for the humanoid matrices.
We probably need to discuss what to do if Material node is not provided.
Thanks,
John
Message ID: @.***>
Correction in orange.
On Thu, Oct 17, 2024 at 2:39 AM John Carlson @.***> wrote:
Hey, I'm looking into developing some IndexedLineSet code, like:
It seems like colorIndex, etc would be a very good thing to have. Please inspect the import/export code to see if colorIndex is missing for IndexedLineSet.
Then we need to know if someone is already working on it, which branch to work on, etc.
Right now, I'm not seeing colors for IndexdLineSets.
I'm drawing coordinate axes to determine which way is up with the world coordinate system, to integrate humanoids in the correct coordinates. I don't quite know what to do for the humanoid matrices.
We probably need to discuss what to do if Material node is not provided.
Thanks,
John
Message ID: @.***>
Here is a prominent example.
• X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 06 Geometry Points Lines Polygons, Color Per Vertex Examples • https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons/ColorPerVertexExamplesIndex.html
The parent chapter page provides links to educational materials.
• X3D Graphics for Web Authors, Chapter 6, Points, Lines and Polygons slideset • https://x3dgraphics.com/slidesets/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons.pdf • https://www.youtube.com/playlist?list=PLuSIsM-86silXbPFOJ43Qgn47Pw6RufeB
Here is documentation.
• X3D Tooltips, IndexedLineSet • https://www.web3d.org/x3d/tooltips/X3dTooltips.html#IndexedLineSet • (then following linked name to specification) • X3D4 Architecture, rendering component, 11.4.6 IndexedLineSet • https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/rendering.html#IndexedLineSet
Good luck with your efforts.
I think what I did for my Loader was have a common python def for both LineSet and IndexedLineSet: https://github.com/coderextreme/X3DJSONLD/blob/master/blend/localfinal.py
Search for “line_set”. There should be 3 methods/
As I recall, my results weren’t stellar.
Maybe I have a chance to try again. Or someone can riff on my efforts.
John
On Thu, Oct 17, 2024 at 3:02 AM John Carlson @.***> wrote:
Correction in orange.
On Thu, Oct 17, 2024 at 2:39 AM John Carlson @.***> wrote:
Hey, I'm looking into developing some IndexedLineSet code, like:
It seems like colorIndex, etc would be a very good thing to have. Please inspect the import/export code to see if colorIndex is missing for IndexedLineSet.
Then we need to know if someone is already working on it, which branch to work on, etc.
Right now, I'm not seeing colors for IndexdLineSets.
I'm drawing coordinate axes to determine which way is up with the world coordinate system, to integrate humanoids in the correct coordinates. I don't quite know what to do for the humanoid matrices.
We probably need to discuss what to do if Material node is not provided.
Thanks,
John
Message ID: @.***>
Note that I don’t know if USE works with this code. YMMV. So I’ll experiment with the loader and USE, or just modify for the importer.
The challenge perhaps, is to do the coordinate axes without a gradient.
I appreciate the example, Don.
On Thu, Oct 17, 2024 at 9:31 AM John Carlson @.***> wrote:
I think what I did for my Loader was have a common python def for both LineSet and IndexedLineSet: https://github.com/coderextreme/X3DJSONLD/blob/master/blend/localfinal.py
Search for “line_set”. There should be 3 methods/
As I recall, my results weren’t stellar.
Maybe I have a chance to try again. Or someone can riff on my efforts.
John
On Thu, Oct 17, 2024 at 3:02 AM John Carlson @.***> wrote:
Correction in orange.
On Thu, Oct 17, 2024 at 2:39 AM John Carlson @.***> wrote:
Hey, I'm looking into developing some IndexedLineSet code, like:
It seems like colorIndex, etc would be a very good thing to have. Please inspect the import/export code to see if colorIndex is missing for IndexedLineSet.
Then we need to know if someone is already working on it, which branch to work on, etc.
Right now, I'm not seeing colors for IndexdLineSets.
I'm drawing coordinate axes to determine which way is up with the world coordinate system, to integrate humanoids in the correct coordinates. I don't quite know what to do for the humanoid matrices.
We probably need to discuss what to do if Material node is not provided.
Thanks,
John
Message ID: @.***>
Information request. Does the current import er handle both .x3d and .wrl (.x3dv?) Inlines and PROTOs (and ExternProtos). I did try loading WinterAndSpring MainStage.x3d that has Inlines, but only the stage was loaded.
Note that Katy showed me how to get the Blender grid into the X-Z plane with viewpoints. But the X-Z plane was parallel to the screen. Dang. I think the solution may be to have Transforms around Inlines ultimately.
I noticed that my X3D loader failed to load a Material color (black) and substituted a dull white instead (after getting an X3d appearance node to load with no X3D Material node).
Any knowledge of BSDF loading is welcome, since this is a new area for me. Also knowledge of PBR is welcome. AFAIK, the current importer may not do these, unless I didn’t check 4.2 upgrades carefully.
Katy helped me today with BSDF. My previous experience was with Unreal Blueprints, which was not enjoyable, so I had steered away.
John
On Thu, Oct 17, 2024 at 3:02 AM John Carlson @.***> wrote:
Correction in orange.
On Thu, Oct 17, 2024 at 2:39 AM John Carlson @.***> wrote:
Hey, I'm looking into developing some IndexedLineSet code, like:
It seems like colorIndex, etc would be a very good thing to have. Please inspect the import/export code to see if colorIndex is missing for IndexedLineSet.
Then we need to know if someone is already working on it, which branch to work on, etc.
Right now, I'm not seeing colors for IndexdLineSets.
I'm drawing coordinate axes to determine which way is up with the world coordinate system, to integrate humanoids in the correct coordinates. I don't quite know what to do for the humanoid matrices.
We probably need to discuss what to do if Material node is not provided.
Thanks,
John
Message ID: @.***>
Hi, i'm currently the new maintainer of the blender Web3D extension (io_scene_x3d) as it got moved to the extensions platform (https://extensions.blender.org/add-ons/web3d-x3d-vrml2-format/) for blender 4.2+. The blender addons repository (https://projects.blender.org/blender/blender-addons) is now read-only and most addons don't get shipped by default anymore. At some random google search i stumbled upon this repo (quite hidden if you ask me).
Are you guys planning in supporting newer blender versions and merging the progress anytime, or is your development just for legacy blender versions? I know the version difference between those projects is quite high (blender 4.2 vs 3.5 for x3dv and 2.93 for x3d) but maybe worth a shot, so code is not scattered all around the places; most API calls don't seem to have changed a lot (most breaking changes were from 2.79 to 2.8). Repo can be found here: https://projects.blender.org/extensions/io_scene_x3d
Any contributions on the extension (if you don't plan to create a completely new extension) are welcome, even if it's just some legacy bugfix ports (issues from old repo that need attention are listed here (which i guess you may or may not have already tackled to some extent): https://projects.blender.org/extensions/io_scene_x3d/issues/8) or some docu/insights on what changes are awaiting new readers here in this repo. It's currently quite hard to trace down who made when what changes for what purpose as all seems a bit out of place and at random.
@coderextreme, @npolys, @vincentmarchetti, @dug9 as you guys seem to be the main devs here for this project