Skip to content

HeightFieldShape resolution power of 2 #400

Answered by jrouwe
Pindrought asked this question in Q&A
Discussion options

You must be logged in to vote

The number of samples needs to be a power of 2, so if you create a heightmap of 64x64 samples this gives you 63x63 squares. Note that you can apply any scale to the heightmap, so you if you want it to span 64x64 meters you can do so.

The reason for this is that the heightmap in our case is also used on GPU as a texture so must be a power of 2 and we stretch it so that it fills a power of 2 meters.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Pindrought
Comment options

@Pindrought
Comment options

@jrouwe
Comment options

@Pindrought
Comment options

Answer selected by Pindrought
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants