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

Support for blocks that are not cubes: Placing static mesh instances instead! Like a tree! #36

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

miguelemosreverte
Copy link
Contributor

Fixes #29 by using a cleaner version of my ComplexShapes branch, ComplexMeshes2.

Dont merge the PR yet, I have yet to commit the deletion of the instanced meshes once a render chunk is deleted. Once thats done, we are good to go. Will do so in an hour or two. Cheers!

This change improves compile time, like, for realsies. From minutes to 20 seconds tops.

All credit should go to the french developing team @JohnsonJackblue is part of, they where the ones who discovered this!
…d of cubes. On the next commit I will show how to delete this added static meshes instances when a render chunk is no longer rendered. The reason this is such a clean commit, and the next is coming soon is that this feature had already been developed a few months ago, with the help of @JohnsonJackblue and even the help of @AndrewScheidecker himself, who pointed us both to the obvious: Why try to hardcode the vertex positions like Minecraft did when we could just place UInstancedStaticMeshComponents instead, using the bricks coordinates as grid. Well, that has been done now, and will be updated in the next commit too. Cheers!
@miguelemosreverte miguelemosreverte changed the title Complex meshes2 Support for blocks that are not cubes: Placing static mesh instances instead! Like a tree! Apr 3, 2017
…up to 255 available options, where if the selected material index is bigger than Parameters.Materials.Num() then it is considered the index of a complex brick and then a complex brick is spawned. Now an invisible block is placed where the complex block is, so that new blocks can be placed on top of it as if it were a normal block.
…o avoid changing them later when they surpass the lenght of Paramenters.Materials, to zero.
@miguelemosreverte
Copy link
Contributor Author

Its done! Ready for merge!

Pic where it can be seen that the complex brick is treated as a normal one, and adjacent bricks can be placed on top of it. About the correct deletion and restore of the complex bricks once a render chunk is deleted and restored... you will have to take my word up for it! :)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant