Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine 2.0.0 (Root ticket) #6666

Open
8 of 10 tasks
mvaligursky opened this issue Jun 5, 2024 · 14 comments
Open
8 of 10 tasks

Engine 2.0.0 (Root ticket) #6666

mvaligursky opened this issue Jun 5, 2024 · 14 comments
Assignees
Labels
feature request V2 Work for initial release of V2 engine 🔥🔥🔥‎

Comments

@mvaligursky
Copy link
Contributor

mvaligursky commented Jun 5, 2024

Overview

This is the main ticket to communicate the plan and major changes for Engine 2.0.0.

Over the years, the engine has introduced many new features and deprecated several obsolete ones, often maintaining them to avoid disrupting existing projects. This maintenance carries a significant cost and slows down the development of new features, as time and resources are diverted to supporting deprecated functionality.

The plan

The plan is to release Engine 2.0.0 (V2), where we will address and remove multiple deprecated features. While many of these changes are breaking, there's no need to worry. Teams that depend on these features can continue using Engine V1, which will remain available. Both Engine V1 and V2 will be supported by the Editor, and by default, your projects will stay on V1 unless you choose to switch to V2 after confirming compatibility. The Editor will maintain backwards compatibility with Engine V1 for as long as necessary.

What do these engine versions mean?

  • V1: This is the engine as you know it, with the latest version being 1.71.4 at the time of writing, containing all existing features. We will primarily release fixes for this version, although occasional larger changes may be included. However, no new major features will be added; for those, you'll need to switch to V2. The code for this version is in the main_v1 branch.
  • V2: This version is contained in the main branch. We will begin by removing some deprecated functionality (see list below) and will also add all new major features here.

V2 changes

Major confirmed changes in V2:

Changes that were discussed but are NOT changing in V2:

  • model component - this is staying for a long time as it is used by many projects
  • animation component - this is staying as it's still popular and widely used, even though the new anim component is more powerful
  • detail maps - not exposed in the Editor, as we're aiming at better ways of exposing those custom shaders to the users, but useful currently
  • json mesh format - keeping it, but will likely start deprecating it in the future

Changes that are still being discussed:

  • parallax mapping support by the Standard Material - the implementation is very obsolete, and could be removed or better replaced by a more modern implementation
  • more generic version of hardware instancing, as the current solution is simplistic and limited
  • handling of the way canvas resizing is being handled
  • deprecation of the PostEffects. Those will still work but the functionality will be in deprecated state
  • Create DrawHelper module in extras for more advanced 'debug' style rendering #6024

New major features in development for V2 only:

  • WebGPU - This is already functioning pretty well in V1, but new features / polish / official support will only come to V2
  • RenderPass based frame architecture. This has been in development for a while, and we're hoping to make this available for general use, including some new post-processing effects
  • ESM scripts - modern javascript support using modules. Note that this will work together with the current scripting system, and both types work together without problems.
@marklundin
Copy link
Member

#6666 ticket of the beast 🤘

@yaustar
Copy link
Contributor

yaustar commented Jun 5, 2024

A bit surprised with the following:

  • model component - this is staying for a long time as it is used by many projects
  • animation component - this is staying as it's still popular and widely used, even though the new anim component is more powerful
  • json mesh format - keeping it, but will likely start deprecating it in the future

This is probably the best time to remove these with a clean break and like WebGL1, those users can continue with v1.

@mvaligursky
Copy link
Contributor Author

This is probably the best time to remove these with a clean break and like WebGL1, those users can continue with v1.

There is so many projects using these, that removing them would force people with existing projects to stay on v1 for ever (or invest a lot of time moving to newer components), which is not ideal for the users (they want new tech), and also for us (we want most people to move to v2 and eventually when v1 is no longer needed, have a chance to remove it without much pain).

@albertvanveen
Copy link

albertvanveen commented Jun 5, 2024

I agree with @yaustar. This will be the perfect moment to remove old components.

Especially new users don't know the difference between old and new components and the confusion will continue. The risk of users starting new projects with old components also remains, perhaps because they are easier to use in some ways.

If users want to use the new features they need to take some effort to make their projects future proof.

@Maksims
Copy link
Contributor

Maksims commented Jun 5, 2024

If there is a switch to a new system, removing model and animation components would be beneficial to engine indeed. Although there is a big difference when working with animation. Old system is way easier, and there are a few things that you can't do easily with a new system, e.g. changing animation speed per node or for a whole component. There should be at least a feature parity and preferably decent QoL improvements in Editor and code features for making users to switch.

Also, worth mentioning that now there are three scripting systems:

  • Legacy Scripts - has been long deprecated, and easily can go.
  • Scripts 2.0 - the current system, and definitely wont go for some time.
  • ESM Scripts - a new and recommended scripting system.

Creating a project in Editor, by default would still recommend engine v1 with scripts 2.0. But if users use engine v2, then it would be beneficial to default to ESM scripts.

Through history, playcanvas engine never broke or forced changes, and provided backwards compatibility while introduced new alternative/better systems. This will be a new shift in the way things are done, and will lead to some docs, api, github, codebases and other segragations. Hopefully through better QoL of new systems and nice gradual migrations devs can more to v2 sooner than later.

@mvaligursky
Copy link
Contributor Author

Creating a project in Editor, by default would still recommend engine v1 with scripts 2.0. But if users use engine v2, then it would be beneficial to default to ESM scripts.

Yep exactly our plan, but we'll see how we go as we discuss it more.

@mvaligursky
Copy link
Contributor Author

The risk of users starting new projects with old components also remains

Yep, we'll definitely look at hiding some of the older tech in the Editor for newly created projects, as have in the past, but details are unclear at this stage.

@SashaRX
Copy link

SashaRX commented Jun 7, 2024

I find the model component to be extremely convenient for props models. It provides a more streamlined appearance and takes up less space in the editor, making it easier to manage and organize assets.

@heretique
Copy link
Contributor

Nice, looking forward for v2 🚀
One other change I would like to suggest is the refactor of the Texture API. There's an issue discussing that #4290.

@SashaRX
Copy link

SashaRX commented Jun 10, 2024

What are the plans for the materials system, will there be master/instance materials?

@mvaligursky
Copy link
Contributor Author

Nice, looking forward for v2 🚀 One other change I would like to suggest is the refactor of the Texture API. There's an issue discussing that #4290.

I think / hope we can do that one without breaking the API (perhaps by adding the API). We really want to avoid breaking too many APIs as that would make it harder for people to move larger projects to V2. But definitely on a TODO list.

@mvaligursky
Copy link
Contributor Author

What are the plans for the materials system, will there be master/instance materials?

There are no plans for this. We're still considering changing the API of the StandardMaterial, to simplify it a bit, a lots of changes under the hood in a way the shader then gets generated, but nothing regarding to what you suggest, even though I do see a value here. Please open a separate issue for it, it could be a good discussion.

@mvaligursky mvaligursky added the V2 Work for initial release of V2 engine label Jun 24, 2024
@cognitiveplus
Copy link

This is probably the best time to remove these with a clean break and like WebGL1, those users can continue with v1.

Still using Model and Animation exclusively since Anim state machines are too overkill to set up for simple loop animations, and Render components don't work will old Animation components. I wish Anim would act / appear as an old Animation by default and then user could opt in to add extra states and complexity to it if needed.

@cognitiveplus
Copy link

cognitiveplus commented Jun 26, 2024

Overall happy with the plan, can't wait for finalized HDR pipeline and render passes! And WebGPU compute shaders are going to open so many new possibilities. Would also vouch for better shadowing techniques (i.e. shadows become softer with distance from the occluder) and built-in standard postprocess passes (AO, DoF, TSAA, HDR + tonemapping, color grading, vignette, etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request V2 Work for initial release of V2 engine 🔥🔥🔥‎
Projects
None yet
Development

No branches or pull requests

8 participants