x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Please Dearly Consider] Exposing Runtime/LandscapeDataAccess.h To Shipping Builds

Dear Friends at Epic,

To work around the landscape collision bugs that still have not been resolved I used Landscape Data Interface to add collision triangles where they were needed, along sloped terrain sections.

You can see videos and even see the source code for my plugin here:

https://forums.unrealengine.com/showthread.php?9215-Videos-Rama-s-Victory-Landscape-Collision-Plugin

My system relies on LandscapeDataAccess.h, which is entirely wrapped in a IF WITH EDITOR

My packaging process failed because of this.


LandscapeDataAccess is indeed located in the Runtime section though!


Request

Could you consider exposing LandscapeDataAccess.h to shipping builds since the proper solution for the Physx 3.3 landscape collision issues has not been found yet?

I have a solution that works for me but I can't use it without LandscapeDataAcess.h

I can't ship my game without a proper solution for Landscape collision Physx 3.3 issues!

Thanks for considering this!

Rama

Product Version: Not Selected
Tags:
more ▼

asked Jun 12 '14 at 12:43 AM in Legal & Licensing

avatar image

Rama
10.3k 440 329 1064

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hi Rama,

As you're probably aware, enabling LandscapeDataAcess.h in Shipping builds is a bit problematic because it drags in a lot of editor-only functionality such as texture source data that really shouldn't be in Shipping builds (for size reasons).

I do have plans enable landscape data deformation at runtime (and by blueprints), so obviously I will need to find a solution to these issues. But until then I do have a couple of other suggestions that I can give you now:

At runtime you do have access to the RBHeightfield which is actually just the height data used by PhysX. You can extract that data to get pretty much exactly what you're getting out of the texture with LandscapeDataAccess. The realtime navigation mesh generation code uses this. Have a look at the ExportPxHeightField function in Engine\Private\AI\Navigation\RecastNavMeshGenerator.cpp which extracts the data. This is called from the ULandscapeHeightfieldCollisionComponent::DoCustomNavigableGeometryExport function.

You could write a similar function that extracts the triangle data you need out of the RBHeightfield stored in the collision component.

An alternative you might like to consider to work around this problem, would be to add a function at cook time which converts the ULandscapeHeightfieldCollisionComponents to ULandscapeMeshCollisionComponents. These are slightly bigger memory-wise but there would be no runtime cost.

Cheers Jack

more ▼

answered Jun 13 '14 at 02:02 AM

avatar image

JackP_oldaccount
1.3k 37 11 46

avatar image Rama Jun 13 '14 at 08:22 AM

"I do have plans enable landscape data deformation at runtime (and by blueprints), so obviously I will need to find a solution to these issues"

Oooh that is going to be awesome!

I want runtime landscape deformation so much!

Thank you for working on this Jack Porter!

:)

And thanks for all your helpful suggestions!

I have copy-pasted your message to my notes files and will work on this!

Thank You Jack Porter!

Rama

avatar image Rama Jun 13 '14 at 10:01 PM

Dear Jack,

You mentioned in your very nice forum post that you have trouble reproducing the landscape collision bug, and I agree, as I shared in the post.

But I can easily and reliably reproduce the bug in my main project, so if you'd like my entire project to aid your debugging let me know!

Rama

avatar image Rama Jun 15 '14 at 05:44 AM

Dear Jack,

I have made a new project in 4.2 and I am able to reproduce the landscape collision bug very reliably.

I also have proven that my plugin method does not work because the dynamic mesh collision is not getting cooked.

So I officially dont have a solution for the landscape collision issue aside from getting further details on what you've recommended in this thread

~~~

Project Available For You

I can give you the packaged and unpackaged version of my new project, which packages quite fast, if you would like a complete example project that can reproduce the bug reliably!

Rama

avatar image JackP_oldaccount Jun 16 '14 at 02:33 AM

Hi Rama,

It would be great to have the 4.2 project that reliably reproduces the problem. If you want you can send me a dropbox link or you can upload it to our write-only FTP server:

ftp.epicgameskorea.com user: Dropbox pass: 723js@dF

Thanks

avatar image Rama Jun 16 '14 at 07:44 AM

My Project for You

Dear Jack,

I am uploading my project to the drop box you mentioned above

ForJackPorter_JoyShapes_FromRama2.rar

the first attempt can be deleted :)

Expected File Size

Total file size should be:

1.03 GB

1,107,251,319 bytes

Important ~ Char Mesh ~ File 2

I didn't finish zipping apparently, to see the character mesh you need this additional Content .rar

ForJackP_TheCharacterMesh_FromRama

It is already done uploading

File size:

750,141 bytes

Time Done

Upload should be finished within 4 hours of me sending you this message.

Source

I've included my source and .sln so you can rebuild the project entirely if you want :)

Running

I left a .bat file that you can run if you edit it to point to your 4.2-Release engine.

In-game Note

I left you an in-game note!

I point you to a great spot to test!

Testing

Just jumping around on the slope I've pointed out leads me to reliable falling through within about 1-3 attempts

Character

It is a simple skeletal mesh with a simple collision capsule, all default settings from Third Person C++ template.

I am not doing anything fancy in the C++ regarding the character movement or collision

All the c++ is actually for the UI and camera at the moment

Verifying

I've re-unzipped this project to an external hard drive and can verify that it will run if you simply set the .bat file to point to your engine

I've also verified falling thru the landscape more than 5 times using the version I am sending you, you just jump around on the slope I pointed out to you and it should not take long, especially at certain spots where it is steeper.

avatar image Rama Jun 16 '14 at 07:56 AM

Good Luck!

Good luck Jack, keep me posted on your discoveries!

Rama

avatar image Rama Jun 18 '14 at 06:57 AM

Dear Jack,

Did my project transfer correctly? Where you able to open it?

Have fun today!

Rama

avatar image JackP_oldaccount Jun 19 '14 at 06:08 AM

Hi Rama,

I was able to download all your content and open your project.

The game code had some problems with FBox and some header rearrangement we've done recently but I'll hack it enough to get it loading.

Cheers Jack

avatar image JackP_oldaccount Jun 19 '14 at 06:42 AM

I was able to get it running easily. I was easily able to fly through the landscape right where your text component indicated, so this should be much easier to track down.

About the source - for FBox2D, you don't need to access Min and Max directly, instead you can use Box[0] and Box[1] respectively. We also recently changed the headers so less stuff is included automatically, so I had to add a few more include files - heads up for when you get 4.3.

With some luck, hopefully I can get a fix for the landscape collision included in it.

avatar image Rama Jun 19 '14 at 11:21 PM

"About the source - for FBox2D, you don't need to access Min and Max directly, instead you can use Box[0] and Box[1] "

Ooh nice, thanks for the tip!

I was actually the one who submitted FBox2D to the engine via GitHub ( at James G's request) :)

So I hope you are enjoying it!


"We also recently changed the headers so less stuff is included automatically, so I had to add a few more include files - heads up for when you get 4.3."

Any chance you can tell me what those headers are so I can prepare in advance? It took me a long time to convert my main project to comply with 4.2 Thanks Jack!


"With some luck, hopefully I can get a fix for the landscape collision included in it."

Pleaaase Thank you Jack P!

Rama

avatar image JackP_oldaccount Jun 24 '14 at 09:48 AM

To give you an update - the problem seems to be highly framerate dependent, with higher framerates cause it to happen more. It's harder to reproduce in debug builds which are generally slower.

If you launch the game with -UseFixedTimeStep, it will tell the physics system you're running at 30 fps regardless of the real frame rate. With that option, you can see it's much harder to make the problem occur.

I'm still trying to work out what to do about it, but it gives us something to go on.

avatar image Rama Jun 24 '14 at 02:02 PM

Woohoo! Jack P is near to Victory!

I can happily verify that I had the same experience you describe Jack!

I tried your suggestion and I literally got bored of trying to get the character to fall through the landscape! I could not get it to happen once!

Woohoo!

You are on to something Jack!

I am wishing you every success!

Rama

avatar image Guy Paddock Mar 02 '15 at 04:11 PM

This is back in 4.7.1...

avatar image JackP_oldaccount Mar 02 '15 at 06:39 PM

Hi Guy, sorry to hear you're seeing issues with collision in 4.7.1. This old thread you replied to is very confusing and contains a lot of old information, and the specific issue it was discussing has been resolved.

Could you please post a new question describing what you're seeing in 4.7.1, and I'll take a look.

Thanks Jack

avatar image Rama Mar 03 '15 at 09:24 AM

Great to hear from you Jack!

Thank you for Landscapes!

I hope dynamic height map changes in packaged builds are still in the works!

Have fun today!

Rama

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi Rama,

I have a fix for the landscape collision issue.

Please replace the entire ConvertOverlappedShapeToImpactHit function in Engine/Source/Runtime/Engine/Private/Collision/CollisionConversions.cpp with the contents of this text file (two functions). This fix will be included in 4.3.

Basically the problem is when you begin to get embedded in an object, PhysX needs to be told how to push you out again. There was special code to calculate the best direction to push out for triangle meshes, but none for heightfields. I added the same kind of handling for heightfields.

(I can't take the credit as one of our engine programmers, Zak Middleton pointed me in the right direction)

Please confirm this fixes the problem for you :-)

Cheers Jack

link text

more ▼

answered Jun 25 '14 at 10:42 AM

avatar image

JackP_oldaccount
1.3k 37 11 46

avatar image Rama Jun 25 '14 at 12:53 PM

Jack Porter You Are Victorious!!

It wooorkkkeed!!!

It woooorks!!!

I've tested my two different projects that experiences the issue and 3 different characters, one who has a positively tiny collision capsule!

They all work!

It wooorks!

Jack P!!!

Rainbow for You!

alt text

Zak Middleton!

Rainbow for you for helping out!

alt text

Jack P!

Another Rainbow for you for finding the solution to this issue! It makes perfect sense in hindsight, it is the perfect and Beautiful solution!

alt text

Victory to You Jack P!

Rama

PS: I am going to go spread the news of your Victory! :)

PSS: Epic, Jack P deserves special rewards for this!!!

rainbow.jpg (8.2 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Still an issue in 4.18.2

more ▼

answered Dec 27 '17 at 05:07 PM

avatar image

Justice777
10 1 3 5

avatar image neighborlee May 28 '18 at 09:57 PM

still in 4.19.2--only 3 areas where it does it, and no, they aren't sloped areas, just areas not on level areas, created via sculpting, and later refined with flatten tool.

I hope that helps narrow down collison issues in ue4 4.19.2..its unnerving ;) Stops dev as I can't risk it anymore without a firm fix. Lumberyard to the rescue,and they have 32bit terrain support. NOt down for the count w/ue4, but I must work around it, for now.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question