Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Blitzwerks Terrain Demo version - flatten deletes terrain

Author
Message
bruceatk
22
Years of Service
User Offline
Joined: 25th Aug 2003
Location: Loudon, NH
Posted: 6th Mar 2011 18:36 Edited at: 6th Mar 2011 18:47
My thread title is wrong, this is about the full version.

I've been really impressed by the full version of Blitzwerks Terrain. It easily works with 2048x2048 displacement maps and textures. I had planned to use it to help me modify terrain and I noticed that it had a FlattenTerrain function that was almost what I want. I want more of a small rectangle then a circle, but I figured I would use the built in function first. When I use the function below, everywhere I use it the terrain disappears. What am I doing wrong?

BT FlattenTerrain g_TerrainID, xpos, zpos, 15.0

A couple of screen shots:





Bruce
kaedroho
18
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th Mar 2011 12:30 Edited at: 7th Mar 2011 13:11
Thats a weird bug. The flatten terrain function does 90% the same thing as raise terrain, just uses a different height. I will look into this and get it fixed by the next update which will be later this month.


For now, you can use a combination of BT GetGroundHeight and BT SetPointHeight to flatten the terrain.

[EDIT] Reproduced this bug already. I will make sure that it is fixed by the update later this month.

[EDIT] Fixed! It was a bug when getting the height of the terrain at that point. The RTTMS plugin and BT were using different data types.


Quote: "I want more of a small rectangle then a circle"


How about a command like BT SetAreaHeight TerrainID,x1,y1,x2,y2,height. Which sets the height of all the points in that box. Will that help?

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
bruceatk
22
Years of Service
User Offline
Joined: 25th Aug 2003
Location: Loudon, NH
Posted: 7th Mar 2011 15:00 Edited at: 7th Mar 2011 15:04
Wow. Quick response. I have played with the SetPointHeight and it has been working for me. The SetAreaHeight is perfect. It's exactly what I want. Is a companion GetAreaHeight possible also? If you need anybody to beta test your updates, I'd love to help.

Again, I must compliment you on this plugin. This thing is screaming fast. I added more levels of LOD and I am getting 500+ FPS while flying around on a 2048x2048 dispmap with complicated terrain without any visible loss of data.

Is there a way to turn off the texturing when you switch to wireframe mode. I think the textured lines make it difficult to actually see the wireframe?

Bruce
kaedroho
18
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th Mar 2011 18:02
Thanks

Get area height will be difficult if the area has lots of different heights. An average of the heights is possible but most people won't use that.

Quote: "Is there a way to turn off the texturing when you switch to wireframe mode. I think the textured lines make it difficult to actually see the wireframe?"

Try:

BT SetTerrainTexture TerrainID,0
set object light TerrainObjectID,0

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
bruceatk
22
Years of Service
User Offline
Joined: 25th Aug 2003
Location: Loudon, NH
Posted: 7th Mar 2011 20:19 Edited at: 7th Mar 2011 20:19
Thanks, I can now toggle the texture with the wireframe. Works perfectly and instantly. I was able to use that increased visibility, to fine tune my LOD and get my FPS up to 800-900 without loss of visible detail. That gives me plenty of room for doing extra processing.

In order for the GetAreaHeight to work for me I would need a list of the points modified, but because this plugin is so fast, I'm actually taking a snapshot of the original terrain data before I start modifying it, and I'm keeping track of all the center points that were modified. I can quickly undo or commit changed areas using that info.

Login to post a reply

Server time is: 2026-07-15 03:38:47
Your offset time is: 2026-07-15 03:38:47