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 / Terrain vs. Matrix vs. object?

Author
Message
Broken_Code
15
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 16th Sep 2010 19:27
Hello there! Another noob-ish question from me:

What exactly is terrain and what makes it different to a matrix or an object?

The reason I ask is because I'm at the point in my game's development where I need to start thinking about a level editor. The plan was to use a matrix in the editor then on saving the level convert it to a .dbo object via a mesh (as I believe objects are less resource hungry than matrices due to culling, correct me if I'm wrong), that object could then be loaded in-game and have the whole level in one easy object.

I looked onto the forums and didn't find anything definitive. After looking at the help files of the commands in DBP it seems terrain manipulation isn't possible, but loading from a heightmap is, so if terrain is better than a matrix or an object, how do you generate the hieghtmap needed for a terrain?

Thanks,
Broken_Code
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 16th Sep 2010 19:41
The way I see it:

Terrain( Blitzterrain )

Advantages
Very Fast
Has LOD
Well supported
Lots of commands

Disadvantages
Caves are impossible. That's all I can really think of.

Object
Advantages
You can do pretty much anything you want with it, because it's just an object.

Disadvantages
I see no way to create an object easily, without using a matrix, in which case I think you should use terrain.
Overall, ID'd say forget matrices.

You can make terrain heightmaps using a program called L3DT, google it.

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 16th Sep 2010 21:25
I'd say if you want your game to look nice, use objects previously made with a 3d modeler program, textured with a 2d drawing app, put that in as the level, and put there a hidden collision matrix what you have created automatically by analizing the level model's heights tile by tile with for example the intersect object command.

At least i do this method, and it's amazing how it can look (though i'm a professional 3d artist... you have to learn it to make it look good) AND how fast it is. I get thousands of height values for every kinds of things on the level per sync without a single fps lost, which would be impossible with using only the level model plus a collision method for getting the heights. At least i guess. Maybe with a special plugin, but i'm not in favour with those...

Other advantages of object as ground level, is that you can work out texture streching with adjusting the UV in your modeler, what ugly strechings tend to appear if you lift up a matrix's / terrain's tile just a little bit more than... a little...

An other big advantage to object levels are the baked in shadows and lights. I don't mean shadow and light mapped second/third/whatever additional objects, can be done if wanted, but absolutely not necessary.

But to simply put it, terrains are so ugly... at least i haven't seen once i said it was nice. With that washed out pixelated surface, and nonsense detail mapping, pff..
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 16th Sep 2010 21:33
Quote: "But to simply put it, terrains are so ugly.."


Not true. -.-

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 16th Sep 2010 22:42
Sorry that may was a little hard on you, i saw your developing RTS also using that method.

But to my eyes, spoiled from finals renders in Max, this is how it feels..
Fatal Berserker
16
Years of Service
User Offline
Joined: 2nd Jul 2010
Location:
Posted: 16th Sep 2010 22:55
Quote: "But to simply put it, terrains are so ugly... at least i haven't seen once i said it was nice. With that washed out pixelated surface, and nonsense detail mapping, pff.."

You dont need to put someone down because of your opinion, terrain can be done extremely well, objects would be far too laggy compared and would actually have less quality.

Quote: "Caves are impossible. That's all I can really think of."
Im pretty sure blitz terrain made caves possible, tile exclusion.

I would actually complain that objects look far worse than a decent terrain for the speeds you will accomplish.

Smoke me a kipper, ill be back for breakfast.
Broken_Code
15
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 16th Sep 2010 23:43 Edited at: 16th Sep 2010 23:47
Thanks for the replies! I wasn't expecting it to be so quick.

I should probably give you some more detail about my game to help with a more objective argument:
*The game is an multi-player, online only FPS so the levels will be small (not unlike COD4 or Halo in level size).

*I'm using Newton to handle the collision between the players and the level (if you haven't used Newton, it can auto-wrap any shaped object ready for collision, which is what I use to create the collision data for the level).

I had forgotten about level collision, as I say above, I'm using Newton and I'm not sure if it can wrap a terrain , so would a possible solution be to generate a mesh from the terrain, make an object from the mesh then wrap that and hide it. This would mean that you'd have the visual effect of the terrain and the Newton collision data from the object without the drag of drawing the object to the screen?

[ EDIT> ]
You could even delete the object after the collision data has been generated, removing the drag of the object altogether?

Thanks
Broken_Code
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 17th Sep 2010 00:59
Berserker you are putting me down just as much as i had put anybody down with that comment...
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 17th Sep 2010 01:08
Well it was about damn time to declare the type of game in question.

An average FPS's terrain doesn't need to be that artistic as i was thinking about the issue.

Sorry i'm developing an RTS and i want to use all the tricks possible to make it look awesome. Which includes paint it pixel by pixel with my bare hands if necessary. I don't care if the most superb terrain editor pops up, they will still have strong disadvantages for many years from now. At least if we are talking about an upview RTS.
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 17th Sep 2010 20:04
Quote: "Sorry that may was a little hard on you"


No offence taken, I just wanted to stress my point.

Quote: "Im pretty sure blitz terrain made caves possible, tile exclusion."


I don't see how tile exclusion would make folds in the terrain possible, which is what a cave would essentially be.

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 17th Sep 2010 20:19
Two terrains over the top of each other. One with the floor, and the other as the roof?

My signature is NOT a moderator plaything! Stop changing it!
Brendy boy
21
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 17th Sep 2010 20:38
Quote: "I don't see how tile exclusion would make folds in the terrain possible, which is what a cave would essentially be."

you exclude the part of the terrain where the cave should be and insert the cave object at that place

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 17th Sep 2010 20:39
I don't think the undersides of the terrain are culled. But fair point, maybe you can, I didn't think of that.

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 18th Sep 2010 02:53
Quote: "@Mobiius
-Two terrains over the top of each other. One with the floor, and the other as the roof?"


Yeah !!, I remember old darkbasic use this method to make a cave...pretty good indeed.


Cheers.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-22 12:41:19
Your offset time is: 2026-07-22 12:41:19