Where is PhysX Terrain?

Hi All, now I’m learning the last example in Tutorial. But I’m lost at the very beginning.
I shoulde add a PhysX Terrain, but I cannt find it. Thank you for help.

By the way, what does “legacy” suggest? It is what will be abandoned?

Hey @pamgu

First off I think you’re missing having the PhysX Gem enabled so those components aren’t showing up in the Entity Inspector (you’ll need to use Project Configurator to do this) and second, if I remember correctly the PhysX Terrain is a now a level component not an Entity Component (though I could be wrong on this, worth checking both). See there’s a separate tab next to Entity Inspector called Level Inspector. Try searching in there before and after you’ve enabled the PhysX Gem (you’ll definitely see lots more PhysX Components then!)

Hope that helps!

Tom

1 Like

Hi @tom-hh
Thank you for your remind. Yes, after enabling PhysX Gems, now PhysX Terrain is available. And, it appears in both Entity and Level Inspector.
I put the snap shot here for future fresh.

Cheers
Gamp

1 Like

Hi @tom-hh
My problem now is that I don’t have "terrain " as height field. No matter how I click the textedit, or click the three dots beside, just no responce. Seems some trouble when updating height field. I also tried to disable/enable the PerForce, but no effect. I don’t have Perforce account.
So I will go on with the terrain absent to see how it will be.

Terrain is neccessary. I run my demo without terrain, just see the sphere dropping:

Now the No. 1 Problem is terrain.

Here are other problems:

  1. the instruction in Pg 35 is different from that in Pg 39:

  2. Is it wrong in Pg 43?

  3. According to the tutrorial, CameraRigforPhysX should have two children: Camera and Head. But after I operate following the tutorial, the children becomes to be other’s.

  4. Shall I still keep CameraRig? Or replace it with CameraRigforPhysX? The best way is just disable it, but no such option.

  5. Now when I “open in script canvas editor”, the default file in Script Canvas Editor possibly be another file, but not the file I want to open. It will be better that the default is what I want to open. However, since sooner or later I will switch to Lua, this won’t be a big problem.

Hi @pamgu,

Hmm that does sound like a pain :frowning:

I must admit this is a little outside my knowledge area but luckily I know a number of the physics team very well so I can bug them tomorrow to have a look into this issue :slight_smile:

I don’t think Perforce should be related so I wouldn’t worry about that for now. One thing you can try in the meantime is to enable PhysX debug drawing (in the text entry field in the Console where the arrow is pointing in your first image, type physx_debug 1 and hit enter (I forget if it’s exactly called that but if you start typing physx and hit Tab then you can cycle through the other completions. With that you should be able to see if the PhysX Terrain is where it’s supposed to be (it’ll be rendered as a wire grid near where the camera view is).

I can’t speak to the documentation/tutorial, I’ll see if I can get someone to look into it tomorrow though.

Keep at it, hopefully you’ll be able to work out what the issue is, if not I’ll try and update this thread tomorrow :+1:

Thanks,

Tom

1 Like

Hi @tom-hh
Yes, it is physx_debug, but I don’t see any difference, maybe because I don’t have physX Terrain at all.
I have enable the PhysXSample Gem. I think I can learn from the sample.
Thank you and I will go on.

Hi @pamgu,

First of all, many thanks for the detailed list of problems that you listed above – your feedback will be very valuable as we review the issues in the tutorial. I’ll get the relevant team to look into them.

I’ll also work with the PhysX team to try to get to the bottom of the terrain issue you’re seeing. Will keep you updated.

Hi @pamgu,

I had a chat to a member of the PhysX team and they explained that in order to get the HeightField Asset to appear you first need to save the level (Ctrl-S) and then enter Game Mode (Ctrl-G). When you return to the asset you’ll see terrain appear in the text field. It’s not particularly intuitive and we’re working to improve it in an upcoming release.

The one other issue may also be related to the fact you’re missing a Legacy Terrain Component (if it’s not listed in the Level Inspector you may need to enable the Legacy Terrain Gem in order to get it to show up). This will draw a large plane with a grid texture in the level that the PhysX terrain will be aligned with. You can then use the Terrain Editor to adjust the height of the terrain and the PhysX terrain will move with it (make sure to enable debug drawing to check this).

We’ll follow-up about the tutorial information to ensure it’s refreshed and up to date.

Thanks for your time, hopefully you’ll be able to get things working now :+1:

Tom

1 Like

Hi @tom-hh @ian
Thank you for your help. After adding Legacy Terrain, “terrain” appears. But my terrain is not flattern, so you can see the ball rolling down. I’m very happy and thank you very much!
4443

Hi @pamgu,

That’s great to hear! Thanks for letting us know :slight_smile:

I think there is a Camera Component which has a button on it called ‘Be this camera’ (or something similar) which will align the Editor Camera to that view. You might be able to take advantage of that to help setup the various camera positions in the Editor.

Best of luck on your future creations!

Thanks!

Tom

Thanks for the docs feedback! We’ll investigate and get it updated.

Sorry for the confusion, but happy Tom has been able to get you this far.

The Terrain system was moved to the Legacy Terrain Gem in 1.24 and there was a bit of a transition between 1.24 and 1.25. Things to be aware of:

  • Levels created in 1.24 do not have the Legacy Terrain level component added automatically. You have to add the terrain as a level component. Note you add Level Components through the Level Inspector, not the Entity Inspector.

  • In 1.25, new levels will have the Legacy Terrain level component added automatically.

  • For compatibility sake, it’s possible to add a PhysX Terrain component to an entity in the entity inspector, however, the preferred method is to use the PhysX Terrain LEVEL component and add it through the Level Inspector. Only one PhysX Terrain component should be added per level.

  • Though the Legacy Terrain Component has moved to a Gem, the Terrain tools all work as before. You can use Terrain Editor to paint heightmaps, and use Terrain Tool to paint and sculpt terrain in the Perspective viewport.

The Legacy Terrain level component documentation is up to date, and may help answer additional questions.

https://docs.aws.amazon.com/lumberyard/latest/userguide/component-legacy-terrain.html

Thanks for bringing the documentation issue to our attention. I am creating a task to address this issue.

Since you are using the PhysX components, I’d also suggest taking al look at the White Box and White Box Collision components in 1.25. They are very useful for quickly creating PhysX collision surfaces in the Lumberyard Editor that are more complex than primitive shapes without the overhead of using a 3D modeling package.

Hi @tom-hh ,
In my last post I said “it seems can not control the Observing Direction of Camera”. Now I know why: because I didn’t Set Roatation in script canvas. Having added this to script canvas, now I can see from side:

The button “Be this Camera” is useful but LookAtPoint doesn’t has camera. What I said is “Move the point here”. Now without this function, I have to calculate manully to get the similar vision in game:

Hi @DougEric_AWS @microAMZN ,
Thanks for your information. In fact, Lumberyard is the first Game Engine I learn. I’m so un-experienced that I have made ridiculas mistakes. For example, I added Legacy Terrain days ago and I removed it before the PhysX Demo.
Now I still don’t know the value of CameraRigforPhysX. I will learn the User Guide. I think I can answer the question after knowing more.

This is a a small suggestion FYI:

@pamgu

Thanks for the feedback and for giving Lumberyard a go as your first game development tool.

One thing you can do about the window issue is switch to the UI 2.0 preview. The colors are a bit higher contrast with a thin black border around each window. I recommend first to upgrade to 1.25 if you are using 1.24 or 1.24.1. To enable UI 2.0, enable the switch in the top right corner of the level load/create window that appears when you start Lumberyard. Then restart Lumberyard.

For more information see the release notes, near the top of this page:

https://docs.aws.amazon.com/lumberyard/latest/releasenotes/lumberyard-v1.25.html

As for the value of PhysX camera rig, typically when you make a game you want a somewhat dynamic camera that follows the player. The problem is you don’t want to just attach a camera to the player character because it will probably result in sharp, stuttering camera movements every time the player makes a change in direction. So, you build a camera rig and attach that to the player character. There are limitless possibilities, but generally the goal is to create a rig that will make the camera dynamically follow the player but have some sort of stabilization, lag, and/or damping that will soften sharp changes in direction.

1 Like

Hi @microAMZN ,
Thank you for telling me the value of PhysX camera Rig. I’m downloading 1.25 and eager to try UI 2.0.

1 Like

Hi @microAMZN, UI 2.0 really feels much better.

1 Like