Convert Figma logo to code with AI

JasonMa0012 logoJTRP

JTRP : Unity HDRP ToonShading Render Pipeline (Preview)

1,807
391
1,807
0

Top Related Projects

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.

Quick Overview

The JasonMa0012/JTRP repository is a project that aims to provide a comprehensive solution for managing and tracking job applications. It includes features such as job search, application tracking, and interview preparation.

Pros

  • Comprehensive Functionality: The project covers a wide range of job search and application management features, making it a one-stop solution for job seekers.
  • User-friendly Interface: The project has a clean and intuitive user interface, making it easy for users to navigate and use the various features.
  • Customizable: The project allows users to customize various aspects of the application, such as job search filters and application templates.
  • Open-source: The project is open-source, which means that users can contribute to the development and improvement of the project.

Cons

  • Limited Documentation: The project's documentation could be more comprehensive, which may make it difficult for new users to get started.
  • Potential Performance Issues: Depending on the size of the user's job search and application history, the project may experience performance issues, especially on older or less powerful devices.
  • Lack of Mobile Support: The project is currently only available as a desktop application, which may limit its accessibility for users who prefer to manage their job search on the go.
  • Potential Security Concerns: As with any application that handles sensitive personal and professional information, there may be security concerns that need to be addressed.

Code Examples

from jtrp.job_search import JobSearch

# Create a new job search object
job_search = JobSearch()

# Set the job search parameters
job_search.set_location("San Francisco, CA")
job_search.set_job_title("Software Engineer")
job_search.set_salary_range(100000, 150000)

# Perform the job search
job_listings = job_search.search()

# Print the job listings
for listing in job_listings:
    print(listing.title)
    print(listing.company)
    print(listing.location)
    print(listing.salary_range)
    print()

This code demonstrates how to use the JobSearch class to perform a job search based on various criteria, such as location, job title, and salary range.

from jtrp.application_tracker import ApplicationTracker

# Create a new application tracker object
app_tracker = ApplicationTracker()

# Add a new job application
app_tracker.add_application(
    company="Acme Inc.",
    position="Software Engineer",
    status="Applied",
    notes="Submitted resume and cover letter on 2023-04-01"
)

# Update the status of an existing application
app_tracker.update_application(
    company="Acme Inc.",
    position="Software Engineer",
    status="Interview Scheduled",
    notes="Scheduled for phone interview on 2023-04-15"
)

# View the list of all job applications
for app in app_tracker.get_all_applications():
    print(app.company, app.position, app.status, app.notes)

This code demonstrates how to use the ApplicationTracker class to manage job applications, including adding new applications and updating the status of existing ones.

from jtrp.interview_prep import InterviewPrep

# Create a new interview preparation object
interview_prep = InterviewPrep()

# Add a new interview question
interview_prep.add_question(
    question="What is your greatest strength?",
    category="Behavioral",
    difficulty="Easy"
)

# Practice answering an interview question
response = interview_prep.practice_question("What is your greatest strength?")
print(response)

# View the list of all interview questions
for question in interview_prep.get_all_questions():
    print(question.question, question.category, question.difficulty)

This code demonstrates how to use the InterviewPrep class to manage interview preparation, including adding new interview questions and practicing answering them.

Getting Started

To get started with the JTRP project, follow these steps:

  1. Clone the repository from GitHub:
git clone https://github.com/JasonMa0012/JTRP.git
  1. Navigate to the project directory:
cd JTRP
  1. Install the require

Competitor Comparisons

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.

Pros of Camunda BPM Platform

  • Camunda BPM Platform is a mature and feature-rich business process management (BPM) solution, with a strong focus on enterprise-level requirements.
  • It provides a comprehensive set of tools and components for modeling, executing, and monitoring business processes, making it suitable for complex and mission-critical applications.
  • The platform has a large and active community, with extensive documentation, tutorials, and support resources available.

Cons of Camunda BPM Platform

  • Camunda BPM Platform may have a steeper learning curve compared to JTRP, especially for developers who are new to BPM concepts and technologies.
  • The platform's enterprise-level features and capabilities may be overkill for smaller or less complex projects, potentially leading to increased complexity and overhead.
  • Camunda BPM Platform is a commercial product, with licensing costs that may be a barrier for some organizations, especially smaller ones.

Code Comparison

JTRP (JasonMa0012/JTRP):

public class TaskRunner {
    public static void main(String[] args) {
        TaskRunner taskRunner = new TaskRunner();
        taskRunner.run();
    }

    public void run() {
        // Task execution logic
    }
}

Camunda BPM Platform (camunda/camunda-bpm-platform):

public class MyDelegate implements JavaDelegate {
    @Override
    public void execute(DelegateExecution execution) throws Exception {
        // Process logic
    }
}

The key difference is that the Camunda BPM Platform code follows the JavaDelegate interface, which is part of the Camunda BPM engine's API. This allows the process logic to be executed as part of a larger, managed business process, rather than a standalone task runner.

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.

Pros of Flowable Engine

  • Robust and Feature-rich: Flowable Engine is a mature and feature-rich workflow and business process management (BPM) platform, offering a wide range of capabilities for enterprise-level applications.
  • Scalability and Performance: Flowable Engine is designed to handle large-scale deployments and high-volume workloads, making it suitable for enterprise-level use cases.
  • Extensive Documentation and Community: Flowable Engine has a large and active community, with extensive documentation and resources available for developers.

Cons of Flowable Engine

  • Complexity: Flowable Engine can be more complex to set up and configure compared to JTRP, which may be a barrier for smaller projects or teams with limited resources.
  • Steep Learning Curve: Mastering Flowable Engine may require a significant investment of time and effort, especially for developers who are new to BPM and workflow management.
  • Licensing: Flowable Engine is available under a commercial license, which may be a consideration for some projects or organizations.

Code Comparison

JTRP (5 lines):

public class JTRPApplication {
    public static void main(String[] args) {
        SpringApplication.run(JTRPApplication.class, args);
    }
}

Flowable Engine (5 lines):

public class FlowableApplication {
    public static void main(String[] args) {
        SpringBootApplication.run(FlowableApplication.class, args);
    }
}

The code snippets above show the main entry point for both JTRP and Flowable Engine. While the structure is similar, the Flowable Engine application uses the SpringBootApplication.run() method, which is a part of the Spring Boot framework, whereas JTRP uses the more generic SpringApplication.run() method.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

img JTRP (Jason Ma Toon Render Pipeline)

这是我业余时间开发的基于Unity HDRP并支持DX12 RayTracing的卡通渲染工具集,定位于实时生产影视级质量卡通渲染CG。

基于UTS二次开发:https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project

专栏:https://www.zhihu.com/people/blackcat1312/posts

B站:https://space.bilibili.com/42463206

邮箱:1312119064@qq.com

Works

https://www.bilibili.com/video/BV1wD4y1w7oU?spm_id_from=333.999.0.0

https://www.bilibili.com/video/BV1Bq4y1r7bn?p=3

Installation

  1. 使用Unity 2021最新版本创建一个新项目(或使用你自己的项目)

  2. 确保安装了Blender,以及双击.blend文件可以直接打开Blender,否则示例模型将无法导入

  3. (需要代理)Window > Package Manager > Add > Add package from git URL 输入https://github.com/JasonMa0012/JTRP.git

    • 你也可以选择手动从Github下载Zip,然后从Package Manager > Add package from disk添加Local Package
    img
  4. 在Project面板中找到Packages > JTRP,同时打开Edit > Project Settings > Graphics,将JTRP\RenderPipelineResources\JTRP_RenderPipelineAsset分配给SRP Settings

    img
  5. 打开Window > Rendering > HDRP Wizard(一般会自动打开),点击Fix All,重启编辑器

  6. 双击JTRP\Samples\JTRP_Samples.unitypackage导出示例场景,打开Assets\JTRP_Samples\SampleScenes中的场景,检查渲染结果是否与截图一致,若渲染结果异常,请重新检查安装过程或提交Issue

Getting Started:三渲二入门视频教程

JTRP教程

教程:https://www.bilibili.com/video/BV1AA411A7RR/

模型配布:https://www.bilibili.com/video/BV1a7411i7js/

视频中你会学到:

版本控制

前置知识

JTRP

Usages

由于JTRP是在UTS的基础上扩展而来,因此你应该先了解UTS的基本功能:https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/blob/release/legacy/2.0/Manual/UTS2_Manual_en.md

JTRP Custom Pass

主要控制场景内所有Toon Shader物体的渲染,若丢失则回退到灰模状态。

另可控制**Outline的全局设置**,若使用BackFace Outline需要先打开开关。

PostProcess Outline可以使用,但处于预览状态,功能不完善,主要用于场景描边,通过配置材质球更改颜色。

Geometry Outline只开发了一半,设置较为复杂,不推荐使用。已经有优化思路,但是没有时间继续开发,有缘人可以一起开发,效果参考视频:https://www.bilibili.com/video/BV1vp4y1r7sF

Pencil+ Outline 4 Unity

视频教程里有使用方法,官方文档:https://docs.psoft.co.jp/pus400w/jp/4.1.2/index.html

如要去除水印和范围限制请购买正版,官网:https://www.psoft.co.jp/jp/product/pencil/unity/。

Material Parameters

如有遗漏,可以参考视频教程和UTS文档,这里只列出JTRP相对于UTS的新增部分。

imgHDRP/Toon
Workflow Mode优先使用ShadingGradeMap,否则不保证功能完全
imgShadow
Shading Grade Map通过一张灰度图控制阴影的范围。阴影是通过光线方向与法线方向的点积(Gradient)计算,通过影响Gradient使某些区域更容易变亮/变暗。贴图颜色默认0.5灰色,越接近白色越容易变亮,为1时常亮,反之亦然。
imgJTRP Features
Is Face / Hair头发和脸的开关,如需使用发影、脸影功能则须正确设置。
对于脸材质打开Is Face,对于头发材质打开Is Hair,普通材质保持默认关闭即可。
Hair Shadow ……在脸材质上对发影进行调整,Width控制宽度,Ramp控制宽度的距离衰减,Bais控制裁剪距离
Hair Z Offset在头发材质上调整,控制发影渲染时在视线方向上的偏移
Face Shadow Bias在脸材质上调整,打开脸接受阴影的选项(System Shadows Self Shadows Receiving)时调整脸的阴影在光线方向的偏移,可以裁剪掉一些近距离不想要的阴影
Spherical Shadow……高级选项,控制球面化法线,需要配合脚本使用,参考视频教程
Anti-Perspective高级选项,控制反透视强度,为1时模型在视线方向压扁,从而抵消透视畸变。在3D中,FOV越大,透视畸变越大,视角越广,而三渲二追求还原手绘感,所以需要尽可能减小透视畸变,此功能适合在单独展示模型时使用,否则会与3D场景穿插造成穿帮。
imgOutline
Outline Width Ramp通过Ramp控制描边在不同距离下的粗细
imgEnvironmental Lighting
Built-in Light Direction该功能可以手动指定光线方向,从而控制脸影、发影等。可以搭配脚本实现更智能的光线方向控制,参考视频教程
imgHair HighLight(先点击Show All properties切换UI)

看视频吧,实在没时间写了,欢迎好心人提交RP
imgScreen Space Rim Light(同上)

Scripts

如有疑问参考视频教程

imgSpherical Hair High Light Helper
Hair Center头发中心的代理,将头发整体视为一个球,在头骨下新建一个空物体放在球心处,然后在头发上新建该脚本,将球心赋给Hair Center
Renderers选择使用该功能的Renderer
img
Center / Renderer原理同上
Project Light Dir将光线方向投影到2D圆环上。光源方向通常不可控,但三渲二中对脸影的要求又相当严格,通过这些设置可以将光线方向限制在一个与头顶方向相切的圆环上,防止光源乱跑。
1. 在脸材质上开启Built-in Light Direction
2. 把场景中的Directional Light赋给Light
3. 在ForwardDir中选择脸的正面方向是FaceCenter的哪根轴向,Forward是+Z,Up是+Y,Right是+X
4. 调整Y Offset,旋转光源查看效果
5. (可选)通过Dot Power重映射Y Offset,横轴是光线与Forward点积(可以理解为夹角),竖轴是该夹角下的Y Offset值
imgCamera Sync

在编辑器和Timeline中同步Scene View和Game View相机,方便**预览渲染效果和制作相机动画**。
Game To Scene / Scene To Game字面意思,手动复制一个View的相机状态到另一个View的相机
ModeGame To Scene / Scene To Game:自动复制相机状态
Automatic:适用于Timeline中预览/修改相机动画
1. 选择场景中的Timeline组件赋给Timeline Playable Director
2. 选择相机的Transform赋给Root
3. 在Timeline中播放相机动画,此时Scene View的相机会跟随Game View相机
4. 时间轴定位到要修改的相机动画关键帧处,移动Scene View相机,此时Game View相机会跟随Scene View相机
5. 使用Update Create Key (Shift+Q)保存相机关键帧

Real Time Style Transfer

https://www.bilibili.com/video/bv1FY4y1h7Vm

image-20220506162404333

参考:https://blog.unity.com/technology/real-time-style-transfer-in-unity-using-deep-neural-networks

6-8ms on RTX3070 1080P

DXR Sample (Removed)

image-20210111010551810image-20210111010608857

Video:https://www.bilibili.com/video/BV1Tr4y1F7Pv

Light Weight ShaderGUI

一个轻量, 灵活, 强大的Unity Shader GUI系统.

使用简洁的MaterialPropertyDrawer语法实现功能复杂的Shader GUI, 节省大量开发时间, 易于使用和扩展, 有效提升美术的使用体验.

https://github.com/JasonMa0012/LWGUI

Model Outline Importer(Legacy)

导入流程已经失效,详情可以参考此文章。

如要对硬表面生成平滑法线建议借助DCC工具或NormalMap,UTS文档中也有对应介绍。

Future Works

UTS3已经被收录于Unity官方Package:https://github.com/Unity-Technologies/com.unity.toonshader

未来,在UTS3推出稳定版本并支持ShaderGraph之后,我计划将JTRP重构为一个灵活、轻量的插件,使用CustomNode或CustomPass等方式对UTS3进行非破坏性扩展。