Displaying Terrain in ModelDrawer v0.14.3

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
ntd master
Posts: 10
Joined: Wed Nov 24, 2010 9:29 pm
Location: United States

Displaying Terrain in ModelDrawer v0.14.3

Post by ntd master »

Hey guys, I just wanted to give everyone a heads up regarding a debugging issue I came across. If anyone is using the ModelDrawer to help debug and/or align physics to their graphics and in particular tried to align their terrain heightmap, they might've noticed that in v0.14.3 their heightmap tends to get rather screwed up looking, since only part of it is being drawn. The last version I used before upgrading my code was v0.12.1 so people may have already come across this issue.

Basically in v0.14.3 all of the ints have been converted to ushorts, so with a height of 512x512 or greater, all of your indices will get majorly truncated.

Since the ModelDrawer is only really used for debugging purpose, I just did a quick "find all and replace" for all ushort references to int. Also you'll want to change all of the IndexElementSize.SixteenBits to IndexElementSize.ThirtyTwoBits. Now you should be good to go for using larger heightmaps.
Follow on Twitter: Vulture Games
Official Website: Vulture Games Studio, LLC
Post Reply