brifsttar / OpenDRIVE

Unreal Engine OpenDRIVE plugin
Mozilla Public License 2.0
149 stars 30 forks source link

Issues with Chaos Branch for Unreal +5.1 #12

Open azagh2084 opened 1 year ago

azagh2084 commented 1 year ago

Hey, I noticed several errors with the Chaos Branch in 5.1 and 5.2. I didn't really "fix" them just made it work for me. 5.1: CoordTranslate.cpp throws an error line 16´in the toRotation function. It works however when using the function definition from the master branch. In OpendriveWorldSettings.cpp the Log in Line 46 and 50 threw errors. Comment out "solved" it 5.2 The EUBP_OpenDrive2Landscape.uasset throws a warning because the supportclass function is deprecated. This can be solved by adding the LandscapeProxy Class in the default settings of the BP and deleting the function. The Blueprint still throws an error without any further explanation but the sculpt function worked again after that, which was all I needed

Except for the 5.2 warning I didn't really look into the causation of the errors but if you want to I can send you the exact error messages. Maybe I forgot to install something. But because of the relatively specific errors I don't think I am missing something.

brifsttar commented 1 year ago

Hi, thank you for those reports!

For the EUBP_OpenDrive2Landscape, it's been discovered recently and is scheduled to be fixed soon (I'm waiting for the PR from a colleague).

The other bugs however, I'm not really sure, so I'm indeed interested in the error messages. I've been using the plugin with UE 5.1 and 5.2 without any issue.

For the CoordTranslate.cpp error, maybe it's due to you pulling changes from the remote without doing a git submodule update after? I think I had to change some thing in a third party lib for this specific method, so that could be it.

For the OpendriveWorldSettings.cpp, I'm guessing it's related to OpenDriveLog being undefined or something? I have this issue on another plugin, but only when building for Mac, for Windows it works fine. Do you maybe have the plugin installed on the engine folder? I did all my testing with it in a project. In any case, I'll add the proper include to make sure the log is properly defined.

azagh2084 commented 1 year ago

Hey,

oky nice! The ToRotation error in CoordTranslate was solved with the submodule update. The Logging issue was mostly solved by your commit. I still have however a missing Log define in \Source\OpenDRIVE\Public\OpenDriveScriptActor.cpp. Including the define in the header file solved that.

The errors thrown by the log define are a bit random. I don't know why it just now has problems with the OpenDriveScriptActor class even though the LogDefine wasn't there in the first place...... I think there is a way to globally define them but I never bothered to look and I am not sure if thats the best idea in a plugin.

The Plugin is installed in the project dir.

I still have problems with the EUBP_OpenDrive2Landscape.uasset. The error message is sadly not very meaningful. First, I always get this message when starting the project via Visual Studio. grafik

After rebuilding and after fixing the supported class warning I still get this error message:

grafik

[2023.06.29-08.19.40:208][708]EditorErrors: New page: Scripted Actions [2023.06.29-08.19.40:210][708]EditorErrors: Error: /OpenDRIVE/EUBP_Actor.EUBP_Actor needs to be re-saved and possibly upgraded.

Resave, delete temp files etc didn't really work for me.

Maybe you have a better idea whats happening.

Despite the message, Create Road Spline and and Sculp Landscape still works. The third function (Apply Spline?) is not visible however.

As a side question: Did you test your plugin in combination with the new PCG features of Unreal 5.2? This looks really promising

brifsttar commented 1 year ago

Thanks for the update :)

Apparently I can't fix one bug without adding a new one :P To fix the previous issue, I moved the log declaration from OpenDriveScriptActor to the main class, which is why the former is now complaining. I'll remove that whole class, it's been deprecated for a while.

About the startup message, I think it's related to your project, and not the plugin. Is your project BP only? That could explain the message: Unreal sees that there's a C++ plugin that needs to be built, be if your project doesn't have C++ configured, it tends to not work (and not just throw a warning, which is why I'm surprised about the message).

About the EUBP, I'm guessing that EUBP_Actor has the same issue that you found in EUBP_OpenDrive2Landscape: it uses the old way of declaring compatible classes, and needs to be updated to instead use the new class setting. I'll fix that tomorrow probably.

I didn't test anything PCG at the moment. But now that you mention it, it could be very interesting to be able to sample the road network from a PCG graph. In the latest Inside Unreal, they mentioned that adding a sampler for a custom object wasn't that difficult (a very basic interface to implement, IIRC). I'll add that to the todo-list, next to the OpenDRIVE to ZoneGraph conversion.

brifsttar commented 1 year ago

First of all, I merged chaos into master, so the repository is now UE5 by default.

For the log errors, I managed to reproduce them by building manually from Visual Studio. Somehow, when building with command line (using UE's Build.bat), those don't appear. In any case, I removed OpenDriveScriptActor.

Regarding the EUBP_Actor.EUBP_Actor, I didn't have the warning/error and it doesn't implement GetSupportedClass, so no need to update it. It also seems to be working fine, so I'm not sure what the issue is here.

azagh2084 commented 1 year ago

You are correct the ODRTest screenshot is a problem with my project. Its a C++ project but it still has nothing to do with your plugin.

The error for the EUBP_Actor.EUBP_Actor is also gone after resaving it. I only resaved the EUBP_OpenDrive2Landscape before.

As a test I pulled the master on a clean 5.2 project and everything works fine now as far as I can tell :)

Thanks for the great work btw.