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.

Dark GDK / huge world, multiple large terrains - QUestion for 3dws and T.ED users

Author
Message
action 9000
16
Years of Service
User Offline
Joined: 27th May 2008
Location: Alberta, Canada
Posted: 5th Oct 2009 23:28 Edited at: 6th Oct 2009 00:19
Hey everyone,
I apologize for the long post, I'm just trying to describe my problem as clearly as possible.

I'm trying to figure out a practical way to make and load a huge world of terrains, because every different procedure I do results in a different kind of problem..and a problem that can't be ignored.

I really need to have some questions answered because I'm totally stuck.

Here's what I've tried so far, in as much detail as I can describe:

I made a 256x256 heightmap for a terrain that is designed to be quite massive, say a few km in each direction. 3000m / 256 = 11.718 m per vertex, which still isn't very good resolution but the poly count is already stupidly high (432k in .dbo format).

Anyway...I have this heightmap which I can cut into smaller pieces if necessary

Procedure 1)
If I make my terrain with 3 textures in 3DWS using that heightmap and export it as a .x file, it eats up about 250k polys in-game AND it only contains the bottom texture layer.

To me, as far as I can tell, .x export from 3DWS is completely useless since I can't get the textures on the terrain. Hence, I have ruled this out.

Procedure 2)
If I make my terrain with the same 3 textures in 3DWS using the same heightmap and export it as a .dbo file, it has all of the texture layers but my poly count increases to about 432k. This is a problem, however it's less of a problem then the collision issue it introduces. It seems that the more texture layers I add, the more invisible walls and collision problems I end up with, in .dbo format.

It is also important to note that the number of sectors I set the terrain to have in 3dws has a massive effect on performance.
I gain ideal performance with 8x8 sectors. using 1x1 or 2x2 causes my collision code to fail miserably, resulting in falling through the terrain. Using 4x4 or 8x8 causes me to crash into invisible walls randomly in certain. Using 16x16 or 32x32 has the same problems as 4x4 and 8x8, except the framerate is about half to a quarter of the FPS that 8x8 gives me.

Different sector amounts give me very different results in-game, from overly "holey" terrain to overly "wally" terrain, but there is no happy medium. I can get rid of the invisible wall problem with .dbo files if I use only 1 texture layer, but as soon as I add another from 3dws, my collision has issues.

To me, this says I can't have a .dbo file with more than one texture layer in a terrain resolution that I need.

Procedure 3)
I used the dbTerrain functions to load the heightmap and create the terrain this way.
This has been the most successful method, by far, however it lacks the flexibility and ability to create more advanced terrain features. I'm stuck with what the heightmap literally gives me and nothing more, with no way to smooth, create overhangs, etc. Also, the fact that I can only have the one texture (base) and detail means I'm going to have a very strange number of heightmaps in a seriously weird configuration in the event that I need to change texture a lot in a relatively small space (such as patches of this or that).

I'm quickly running out of options. .x files lack multitexture support (a vital issue that I don't know how can be overcome) and have wickedly long load times (less important, just a pain).

.dbo files have multitexturing but collision problems as soon as I use more than one texture (a vital issue that can possibly be fixed with collision code changes? I'm using Sparky's and it normally works great until I add the extra textures).

using the Terrain functions will cause problems as soon as I need texture variety or overhangs/other structural elements so they will cause problems in the future.

Bottom line:
Is 3dWS a decent piece of software to be using for large terrains, because it doesn't seem to be able to export anything that DarkGDK likes.

Would a program like T.ED be more suited? would the files it exports be able to solve the problems mentiond above? I played with the demo but I can't see the results of exporting in-game without buying it. I'd just really rather know if it works before I buy it. I see all these terrain creation tools around but I never know which ones will actually work in my game.

As far as I can tell, 3DWS is useless to me because nothing it exports actually works. Are T.ED's exported files more reliable or suited to multiple textures on one outdoor terrain? I don't need buildings, as my entire game takes place outdoors

On a sidenote, would a program like Action3D be able to reduce the number of polys on a .x or .dbo terrain significantly enough to make it worthwhile? If I did so, would I be able to preserve the seamless edges where terrains connect to each other?
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 6th Oct 2009 00:51
Quote: "Is 3dWS a decent piece of software to be using for large terrains, because it doesn't seem to be able to export anything that DarkGDK likes."

No, 3DWS is more for architecture of levels like walls, stairs, ceilings, ect. And yes T.ED would definitely be better suited. As for your other questions I'm not sure because I never used T.ED or Action3D.

Your bedtime story is scaring everyone
action 9000
16
Years of Service
User Offline
Joined: 27th May 2008
Location: Alberta, Canada
Posted: 6th Oct 2009 23:10 Edited at: 6th Oct 2009 23:25
Okay. Thanks for the reply!

For anyone who has used T.ED, would it specifically solve the texturing problem i'm having?

I'm reading around the forum about a command called
dbSetBlendMappingOn()
trying to figure out exactly how its arguements work, but no topic here has clearly discussed it. If I were to apply textures in stages with that command, how would it know where to put which texture on the terrain object? Is there a way to load a grayscale map or something for each texture and just put the texture at those locations on the terrain object in layers in the code?

Or shall I say, is there a command that lets me load a texture and a grayscale map that will apply that texture layer/stage to the terrain in that fashion?

Or is the best way to use the 'supertexture' feature from T.ED, though that sounds like it would get very limiting for quality and textures changes (when tiling a detail texture over the *entire* terrain)?
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 7th Oct 2009 07:14
Here is some info on the usage of dbSetBlendMappingOn() and what it's params are for(its taken from a DarkSource snippet called "good sky clouds")



Here is the class for making clouds that I took the above from(it wont be compilable as it relies on a number of external classes I developed, but you should be able to get an idea of where the blendmapping is and what it's doing.)

Header :


Code :


To see the above class running, download the attachment to this post, it contains my Coding Challenge entry "Eggeroids"(classic Asteroid game clone in 3D with FX and no media) which the above class is taken from. The ZIP has all the source to recompile, but it was written with DarkGDK 7.3, using the March 2009 DirectX SDK. To run the included EXE you will need the latest directX redist installed.

If it ain't broke.... DONT FIX IT !!!

Attachments

Login to view attachments
Essal
18
Years of Service
User Offline
Joined: 15th Jan 2006
Location: inside your webcam, watching YOU.
Posted: 8th Oct 2009 01:40 Edited at: 8th Oct 2009 01:41
When you use 3DWS, use some jpeg or tga textures that you made yourself, or got off the internet, instead of the standard ones, and then when you export the .x file, put the textures you used in the same folder as the exported .x file and it should work.

action 9000
16
Years of Service
User Offline
Joined: 27th May 2008
Location: Alberta, Canada
Posted: 8th Oct 2009 16:26 Edited at: 8th Oct 2009 16:34
Oddly enough, Essal, your advice does work...sometimes.

Correction, I got it to work a grand total of once and I have no idea why I can't reproduce that again.

I just tried making a test terrain in 3dws, using JPG textures (I have been using JPG textures in my game prior as well). My simple test map was just a flat terrain with two texture layers randomly painted around.

When I exported this as .x and loaded into my game, to my surprise, it actually showed up with two textures! Hey, I thought, this will work!

So I loaded up my old 3dws map that I made for the game, made sure all the textures were JPG (which they were), exported to .x, made sure the textures and filenames in the .x file directory matches the names of the textures used in 3dws..which they did.

I loaded my game...and ended up, once again, with 1 texture layer. My other two textures are nowhere to be found in-game, despite being in the same location as the .x file.

So back I go to making more test maps...and strangely enough, I can't repdoruce my first result! No matter how many texture layers I use, no matter if I use textures with all the same resolution, different resolutions, long filenames, short filenames, 10% Paint brush strength with faint textures, 100% brush strength with an opaque texture layer, it didn't matter. When I loaded the .x in-game, I only had the one texture layer.

Nearly a dozen attempts later, I gave up. I have no idea what strange variable I had correct in my first test map that made it magically show both textures in my game but I just can't get it to happen again, no matter what I try. And good luck getting it to actually work on my actual game map.

I'm completely baffled: why did doing (seemingly) the exact same thing, same terrain resolution, same textures, same map file name, same textures exported to the same directory, same DarkGDK code...result in showing me only one texture layer when it worked in a previous attempt? This has me officially confused.
Essal
18
Years of Service
User Offline
Joined: 15th Jan 2006
Location: inside your webcam, watching YOU.
Posted: 9th Oct 2009 20:26
Sounds weird, although i must confess, i have not used it more than a couple of times, just to see how it would look.
I've switched to doing the my levels in 3dsmax for now.

action 9000
16
Years of Service
User Offline
Joined: 27th May 2008
Location: Alberta, Canada
Posted: 11th Oct 2009 08:34
Okay, no worries.

I'm still completely confused on why 3DWS is behaving so oddly but in the end I know it lacks terrain control that I need so it's rather useless to me anyway.

Does anyone here have good experiences with T.ED and exporting multitextured terrain?
action 9000
16
Years of Service
User Offline
Joined: 27th May 2008
Location: Alberta, Canada
Posted: 11th Oct 2009 09:01 Edited at: 11th Oct 2009 10:21
Okay, I discovered a way to make a .x export work consistantly *with my test map*. It looks like it's an export bug.

At the bottom of the text in the .x file, there is a huge list that looks like


If I change the second one to

manually by editing the .x file text, my other texture shows up in my test terrain. I am just about to try this on my main in-game terrain and I'll post back shortly.

[EDIT]
Unfortunately this doesn't really work nicely with larger maps, also the complexity is too great to be able to just change it manually.

Looking at my actual game map's .x file, every material referenced is material_3, in every single location in the file. Materials 1 and 2's locations aren't stored at all.

Seems like an export problem with 3dws that isn't going away anytime soon. Blah.

Either way, I won't be using 3dws so it's not a biggie. Next question then is still, is T.ED's .x export reliable for terrains with more than one texture?
If anyone can give a yes or no to that, it would be greatly appreciated! Thanks!

Login to post a reply

Server time is: 2024-10-01 14:24:23
Your offset time is: 2024-10-01 14:24:23