Jump to content

Entity materials/collider saving


Alienhead
 Share

Go to solution Solved by Josh,

Recommended Posts

I just spent many many hours converting, and texturing some rocks. then saved.
I just came back into the editor the following day and loaded my map to find that none of the models/mats or colliders got saved,. 

So I redone a few of the rock formations and exited out the editor again..   To my surprise nothing got saved AGAIN. 
These models are lod 0, 1 to 3 with degrading materials on each LOD level.. the collider is based off the last LOD model.

well3.png

I'm only happy when I'm coding, I'm only coding when I'm happy.

Link to comment
Share on other sites

  • Solution

Okay, so I found that the LOD models contain extra hierarchy. This is bad because the editor can't correlate which limb matches which. Maybe I can improve this, but the easiest solution is to collapse the models first. Once I did this, the LODs loaded and saved with no problems. I generated a convex decomposition collider and that seemed to work fine.

veoneio.zip

(This model contains one additional LOD.)

When importing large numbers (about 100) of complex models, I had the best results writing a script that automated the process. You can call Collapse() and AddLod() in a script and use the Scripts > Run Script menu item to execute it.

image.thumb.jpeg.658fd055cd38963f85113e602e3534e7.jpeg

 

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

The engine supports up to four LODs. It will be important to enforce this when we move culling over the a compute shader, because the data layouts have to be very strict.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Well, that's the maximum I thought would be necessary. The GPU will have to allocate a buffer equal to the number of LODs times the number of instances of the model that exist in the world, times four, which I guess is not that much memory. I could probably support more but four seems like a nice number.

The culling routine might also have to iterate through the number of LODs for each instance in order to be dynamically uniform.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...