Skip to content

Commit

Permalink
[Version] Bump version to v0.6.0 (#15)
Browse files Browse the repository at this point in the history
Co-authored-by: YANG Zhitao <[email protected]>
Co-authored-by: wangfanzhou <[email protected]>
Co-authored-by: yangzhitao <[email protected]>
Co-authored-by: yangzhitao <[email protected]>
  • Loading branch information
4 people authored Jan 26, 2024
1 parent d81cceb commit fe280e2
Show file tree
Hide file tree
Showing 112 changed files with 3,282 additions and 869 deletions.
3 changes: 0 additions & 3 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,3 @@ For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ src/XRFeitoriaUnreal/Binaries/
**/output/

# Python
scripts/
xrfeitoria/version.py

# Tutorials
Expand Down
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div align="center">

[![Documentation](https://readthedocs.org/projects/xrfeitoria/badge/?version=latest)](https://xrfeitoria.readthedocs.io/en/latest/?badge=latest)
[![actions](https://github.com/openxrlab/xrfeitoria/workflows/lint/badge.svg)](https://github.com/openxrlab/xrfeitoria/actions)
[![actions](https://github.com/openxrlab/xrfeitoria/actions/workflows/lint.yml/badge.svg)](https://github.com/openxrlab/xrfeitoria/actions)
[![PyPI](https://img.shields.io/pypi/v/xrfeitoria)](https://pypi.org/project/xrfeitoria/)
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)

Expand Down Expand Up @@ -75,23 +75,45 @@ The reference documentation is available on [readthedocs](https://xrfeitoria.rea
There are several [tutorials](/tutorials/).
You can read them [here](https://xrfeitoria.readthedocs.io/en/latest/src/Tutorials.html).


### Sample codes

There are several [samples](/samples/).
Please follow the instructions [here](/samples/README.md).

### Use plugins under development

Details can be found [here](https://xrfeitoria.readthedocs.io/en/latest/faq.html#how-to-use-the-plugin-of-blender-unreal-under-development).

If you want to publish plugins of your own, you can use the following command:

```powershell
# install xrfeitoria first
cd xrfeitoria
pip install .
# for instance, build plugins for Blender, UE 5.1, UE 5.2, and UE 5.3 on Windows.
# using powershell where backtick(`) is the line continuation character.
python -m xrfeitoria.utils.publish_plugins `
-u "C:/Program Files/Epic Games/UE_5.1/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
-u "C:/Program Files/Epic Games/UE_5.2/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
-u "C:/Program Files/Epic Games/UE_5.3/Engine/Binaries/Win64/UnrealEditor-Cmd.exe"
```

### Frequently Asked Questions

Please refer to [FAQ](https://xrfeitoria.readthedocs.io/en/latest/faq.html).


## :rocket: Amazing Projects Using XRFeitoria

| Project | Teaser | Engine |
| :---: | :---: | :---: |
| [Synbody: Synthetic Dataset with Layered Human Models for 3D Human Perception and Modeling](https://synbody.github.io/) | <a href=https://synbody.github.io/><img src="https://synbody.github.io/static/teaser.png"/></a> | Unreal Engine / Blender |
| [Zolly: Zoom Focal Length Correctly for Perspective-Distorted Human Mesh Reconstruction](https://wenjiawang0312.github.io/projects/zolly/) | <a href=https://wenjiawang0312.github.io/projects/zolly/><img src="https://openxrlab-share.oss-cn-hongkong.aliyuncs.com/xrfeitoria/pics/zolly.jpg"/></a> | Blender |
| [SHERF: Generalizable Human NeRF from a Single Image](https://skhu101.github.io/SHERF/) | <a href=https://skhu101.github.io/SHERF/><img src="https://github.com/skhu101/SHERF/raw/main/img/SHERF_teaser.png"/></a> | Blender |
| [MatrixCity: A Large-scale City Dataset for City-scale Neural Rendering and Beyond](https://city-super.github.io/matrixcity/) | <a href=https://city-super.github.io/matrixcity/><img src="https://city-super.github.io/matrixcity/img/teaser.jpg"/></a> | Unreal Engine |
| [SynBody: Synthetic Dataset with Layered Human Models for 3D Human Perception and Modeling](https://synbody.github.io/) | <a href=https://synbody.github.io/><img src="https://synbody.github.io/static/teaser.png"></a> | Unreal Engine / Blender |
| [Zolly: Zoom Focal Length Correctly for Perspective-Distorted Human Mesh Reconstruction](https://wenjiawang0312.github.io/projects/zolly/) | <a href=https://wenjiawang0312.github.io/projects/zolly/><img src="https://openxrlab-share.oss-cn-hongkong.aliyuncs.com/xrfeitoria/pics/zolly.jpg"></a> | Blender |
| [SHERF: Generalizable Human NeRF from a Single Image](https://skhu101.github.io/SHERF/) | <a href=https://skhu101.github.io/SHERF/><img src="https://github.com/skhu101/SHERF/raw/main/img/SHERF_teaser.png"></a> | Blender |
| [MatrixCity: A Large-scale City Dataset for City-scale Neural Rendering and Beyond](https://city-super.github.io/matrixcity/) | <a href=https://city-super.github.io/matrixcity/><img src="https://city-super.github.io/matrixcity/img/teaser.jpg"></a> | Unreal Engine |
| [HumanLiff: Layer-wise 3D Human Generation with Diffusion Model](https://skhu101.github.io/HumanLiff/) | <a href=https://skhu101.github.io/HumanLiff/><img src="https://skhu101.github.io/HumanLiff/HumanLiff%20-%20Project%20Page_files/SHERF_teaser.png"/></a> | Blender |
| [PrimDiffusion: Volumetric Primitives Diffusion for 3D Human Generation](https://frozenburning.github.io/projects/primdiffusion/) | <a href=https://frozenburning.github.io/projects/primdiffusion/><img src="https://openxrlab-share.oss-cn-hongkong.aliyuncs.com/xrfeitoria/pics/PrimDiffusion.png"></a> | Blender |

## License

Expand Down
113 changes: 113 additions & 0 deletions docs/en/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<!-- borrowed from https://github.com/Delgan/loguru/blob/master/docs/_templates/layout.html -->
{% extends '!layout.html' %}
{% block document %}
{{super()}}

<div class="github-corner">
<svg width="120" height="120" viewBox="0 0 250 250">
<a fill="transparent" href="https://github.com/{{github_user}}/{{github_repo}}" style="pointer-events:auto">
<path d="M0,0 L250,250 L250,0 Z"></path>
</a>
<g class="octocat">
<path fill="#343131" d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z" ></path>
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
fill="#ffffff" style="transform-origin: 130px 106px;" class="octo-arm"></path>
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="#ffffff" class="octo-body"></path>
<text x="240px" y="-10px" class="octo-click-text" stroke="#ffffff" fill="#ffffff">CLICK</text>
<g class="octo-glasses" visibility="hidden">
<svg fill="#343131" width="640" height="480">
<defs>
<symbol id="glasses" viewBox="0 0 512 512">
<path d="m465.4,247c-2.2,-22 -12.4,-43 -28.9,-58.4c-17.1,-15.9 -39.3,-24.7 -62.7,-24.7c-41.5,0 -77.3,27.4 -88.5,67c-7,-7 -18.5,-11.7 -29.3,-11.7c-10.8,0 -22.3,4.7 -29.3,11.7c-11.2,-39.6 -47,-67 -88.5,-67c-23.3,0 -45.6,8.7 -62.7,24.6c-16.5,15.5 -26.7,36.5 -28.9,58.5l-14.6,0l0,18l14.6,0c2.2,22 12.4,43 28.9,58.4c17.1,15.9 39.3,24.7 62.7,24.7c50.8,0 92.1,-41.2 92.1,-92c0,-0.1 0,-0.1 0,-0.1l0,0c0,-9.9 11.5,-21.6 25.7,-21.6s25.7,11.7 25.7,21.6l0,0c0,0 0,0 0,0.1c0,50.8 41.3,92 92.1,92c23.3,0 45.6,-8.7 62.7,-24.7c16.5,-15.4 26.7,-36.5 28.9,-58.5l14.6,0l0,-18l-14.6,0l0,0.1z" />
</symbol>
</defs>
<g>
<use x="530" y="-70" xlink:href="#glasses" transform="rotate(45 100,75) matrix(0.185,0,0,0.185,0,0) " />
</g>
</svg>
</g>
</g>
</svg>
</div>

<style>
.github-corner {
pointer-events: none;
position: absolute;
top: 0;
right: 0;
border: 0;
mix-blend-mode: darken;
}
.github-corner:hover .octocat{
transform-origin: center;
animation: octocat-grow 5s ease-in-out forwards;
}
@keyframes octocat-grow{
16%, 66%{
transform: scale(1.2);
}
33%{
transform: scale(1.1);
}
50%, 100%{
transform: scale(1.3);
}
83%{
transform: scale(1.4);
}
}
.octo-click-text {
font-weight: normal;
text-anchor: middle;
font-family: 'Avenir', Helvetica, Arial, sans-serif;
font-size: 20px;
stroke-width: 2px;
transform: rotate(45deg);
opacity: 0;
}
.github-corner:hover .octo-click-text {
animation: octocat-text 5s linear forwards
}
@keyframes octocat-text {
99% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.github-corner:hover .octo-arm{
animation: octocat-wave 400ms linear infinite;
}
@keyframes octocat-wave {
0%,50%,100% {
transform: rotate(0)
}
25% {
transform: rotate(-25deg)
}
75% {
transform: rotate(10deg)
}
}
.github-corner .octo-glasses{
visibility: visible;
opacity: 0;
transition: opacity 5s;
}
.github-corner:hover .octo-glasses{
opacity: 1;
animation: octocat-glass-wiggle 400ms linear forwards;
animation-delay: 4s;
}
@keyframes octocat-glass-wiggle {
0%, 50%, 100% {
transform: translateX(0px) translateY(0px);
}
25%, 75% {
transform: translateX(3px) translateY(-3px);
}
}
</style>
{% endblock %}
14 changes: 8 additions & 6 deletions docs/en/apis/sequence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ xrfeitoria.sequence
xrfeitoria.sequence.sequence_base.SequenceBase
xrfeitoria.sequence.sequence_blender.SequenceBlender
xrfeitoria.sequence.sequence_unreal.SequenceUnreal
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperBase
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperBlender
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperUnreal
:parts: 1
:align: center
:skip-classes: abc.ABC
Expand All @@ -22,6 +19,11 @@ xrfeitoria.sequence
xrfeitoria.sequence.sequence_base.SequenceBase
xrfeitoria.sequence.sequence_blender.SequenceBlender
xrfeitoria.sequence.sequence_unreal.SequenceUnreal
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperBase
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperBlender
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperUnreal

----

.. autosummary::
:toctree: generated/
:template: custom-module.rst

xrfeitoria.sequence.sequence_wrapper
10 changes: 10 additions & 0 deletions docs/en/apis/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ Remote Functions
xrfeitoria.utils.functions.blender_functions
xrfeitoria.utils.functions.unreal_functions

Animation utils
---------------

.. autosummary::
:toctree: generated/
:template: custom-module.rst

xrfeitoria.utils.anim.motion
xrfeitoria.utils.anim.utils

RPC runner
----------

Expand Down
5 changes: 4 additions & 1 deletion docs/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_context = {
'github_user': 'openxrlab',
'github_repo': 'xrfeitoria',
}
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_css_files = ['override.css'] # override py property
html_theme_options = {
'navigation_depth': 3,
Expand Down
91 changes: 90 additions & 1 deletion docs/en/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,97 @@ We list some common troubles faced by many users and their corresponding solutio
Feel free to enrich the list if you find any frequent issues and have ways to help others to solve them.
If the contents here do not cover your issue, do not hesitate to create an issue!

-----------

API
----

.. _FAQ-Plugin:

How to use the plugin of Blender/Unreal under development
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

First you should clone the repo of XRFeitoria, and maybe modify the code of the plugin under ``src/XRFeitoriaBlender`` or ``src/XRFeitoriaUnreal``.
Then you can use the plugin under development by setting ``dev_plugin=True`` in :class:`init_blender <xrfeitoria.factory.init_blender>` or :class:`init_unreal <xrfeitoria.factory.init_unreal>`.

You can install the plugin by:

.. tabs::
.. tab:: Blender
.. code-block:: bash
:linenos:
git clone https://github.com/openxrlab/xrfeitoria.git
cd xrfeitoria
pip install -e .
python -c "import xrfeitoria as xf; xf.init_blender(replace_plugin=True, dev_plugin=True)"
# or through the code in tests
python -m tests.blender.init --dev [-b]
.. tab:: Unreal
.. code-block:: bash
:linenos:
git clone https://github.com/openxrlab/xrfeitoria.git
cd xrfeitoria
pip install -e .
python -c "import xrfeitoria as xf; xf.init_unreal(replace_plugin=True, dev_plugin=True)"
# or through the code in tests
python -m tests.unreal.init --dev [-b]
Build plugins
^^^^^^^^^^^^^^

If you want to publish plugins of your own, you can use the following command:

.. code-block:: powershell
:linenos:
# install xrfeitoria first
cd xrfeitoria
pip install .
# for instance, build plugins for Blender, UE 5.1, UE 5.2, and UE 5.3 on Windows.
# using powershell where backtick(`) is the line continuation character.
python -m xrfeitoria.utils.publish_plugins `
-u "C:/Program Files/Epic Games/UE_5.1/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
-u "C:/Program Files/Epic Games/UE_5.2/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
-u "C:/Program Files/Epic Games/UE_5.3/Engine/Binaries/Win64/UnrealEditor-Cmd.exe"
Please check the path ``./src/dist`` for the generated plugins.
``XRFeitoriaBlender`` will be archived by default, and ``XRFeitoriaUnreal`` will only be built when you specify the Unreal editor path.
Make sure you have installed the corresponding Unreal Engine and Visual Studio before building the unreal plugin.

Find out the plugin version in ``./xrfeitoria/version.py``. Or by:

.. code-block:: bash
>>> python -c "import xrfeitoria; print(xrfeitoria.__version__)"
0.6.1.dev10+gd12997e.d20240122
You can set the environment variable ``XRFEITORIA__DIST_ROOT`` and ``XRFEITORIA__VERSION`` to change the plugins used by XRFeitoria.
Run your code ``xxx.py`` like:

.. tabs::
.. tab:: UNIX

.. code-block:: bash
XRFEITORIA__VERSION=$(python -c "import xrfeitoria; print(xrfeitoria.__version__)") \
XRFEITORIA__DIST_ROOT=src/dist \
python xxx.py
.. tab:: Windows

.. code-block:: powershell
$env:XRFEITORIA__VERSION=$(python -c "import xrfeitoria; print(xrfeitoria.__version__)")
$env:XRFEITORIA__DIST_ROOT="src/dist"; `
python xxx.py
.. _FAQ-stencil-value:

What is ``stencil_value``
Expand Down Expand Up @@ -59,10 +147,11 @@ you can set the environment variable ``BLENDER_PORT`` or ``UNREAL_PORT`` to chan
.. tab:: Windows

.. code-block:: bash
.. code-block:: powershell
$env:BLENDER_PORT=50051; python xxx.py
-----------

Known Issues
-------------
Expand Down
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ dependencies = [
dynamic = ['version']

[project.optional-dependencies]
all = ["xrfeitoria[doc,vis]"]
all = ["xrfeitoria[anim,doc,vis]"]
anim = [
"scipy>1,<2"
]
doc = [
"autodoc_pydantic==2.0.1",
"docutils",
Expand All @@ -60,7 +63,7 @@ doc = [
"sphinx-tabs==3.4.1",
"enum-tools[sphinx]",
]
vis=[
vis = [
"matplotlib>=3.4,<4",
"opencv-python>=4,<5",
"flow_vis==0.1",
Expand All @@ -72,7 +75,9 @@ vis=[
"Documentation" = "https://xrfeitoria.readthedocs.io/en/latest/"

[project.scripts]
xf-render = "xrfeitoria.cmd.render:app"
xf-render = "xrfeitoria.cmd.blender.render:app"
xf-install-plugin = "xrfeitoria.cmd.blender.install_plugin:app"
xf-smplx = "xrfeitoria.cmd.blender.vis_smplx:app"

[tool.black]
line-length = 120
Expand Down
1 change: 1 addition & 0 deletions samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ python -m samples.blender.03_basic_render [-b] [--debug]
python -m samples.blender.04_staticmesh_render [-b] [--debug]
python -m samples.blender.05_skeletalmesh_render [-b] [--debug]
python -m samples.blender.06_custom_usage [-b] [--debug]
python -m samples.blender.07_amass
```

## Unreal
Expand Down
Loading

0 comments on commit fe280e2

Please sign in to comment.