Earth Sculptor exporter

Posted By: ecg_limey

Earth Sculptor exporter - 04/20/08 22:38

Hello

I've been working on a little plugin for Earth Sculptor. The plugin is designed to chop up the E.S. mesh into sectors. This combined with the LOD setting on export produces fairly good results (What you get are more polys where you need them and less in flat areas)... You can also then do all sorts of things like make caves, add stuff in wed and weld them to the terrain, etc... etc... etc... I haven't explored all the possibilities this gives (nor the drawbacks) but it seems as though there could be a little more freedom using sectors than HMPs.

The pluses I have found so far:
Automatic management of sectors by 3dgs engine
Can be manipulated in an external 3d package like Max.
No LOD popping (Trees dont appear to float in the air with lower LOD)
Further oportunity to cull sectors by implementing basic occluder culling.
Can have caves (By editing the sector mesh)

Cons:
No LOD, WYSIWYG
More models to manage
Can't touch the outside edge vertices
Completely untested strategy

So why this post?

Three reasons. The first is if this is something that others will use then it allows me to give back to the community. Secondly, I could do with some help on various aspects, from simple info to adding features to testing or ? Last but not least, the team I work with are always looking for talented people and this seems like a decent way of getting to know other ambitious game people without any formal shit getting in the way.

Current features:
The plugin exports all the sectors (models) and (optionally) creates a wmp file that will open in WED and load all the entities. I am having some issues with skins which I'm working on right now but the basic export is almost done.

Planned features:
Add actions for shader integration. (asap)
Absolutely seamless export to 3dgs (asap)
Automatic occluder creation (way off, can be done by hand initially)
Automatic water creation (a little ways off as can be done by hand fairly quickly)

Current bugs:
Problem saving skin info (external skins)
Issue with 16x16 sectors, wmp and models seem fine but WED only loads 225 of them (instead of 256)... (Really wondering about that one.)


Let me know if there is any interest on any of the three points I wrote earlier. Also, If you're a C++/C programmer and feel like you could contribute then please also let me know and we can discuss a way of working together.


Later

Lim3y
Posted By: ecg_limey

Current Exporter Progress - 04/29/08 07:16

Exporter is progressing well. Real work been taking time up but here are a few screen shots to show the exported geometry within 3dgs. Normal maps are created by hand but am working on making this automated during the export.

I'm fairly happy with the results so far, however, I'm working on making distant and close shots look good (ie: Minimise magnification bluring and minimise repeating patterns in the distance).





Posted By: Loopix

Re: Current Exporter Progress - 05/28/08 20:44

I find this exiting...could turn out to be very usefull! Drop me a note if you need a betatester wink
Posted By: Thracian

Re: Current Exporter Progress - 06/05/08 18:52

I agree, this seems to turn out very handy and useful. Keep up the good work wink
And of course, iŽd also apply for betatesting...
Posted By: Kasey_Dee

Re: Current Exporter Progress - 06/16/08 00:53

Ditto. I am interested and I use EarthSculptor.

Be happy to pay for this tool too.
Posted By: bonnet

Re: Current Exporter Progress - 07/03/08 12:15

Im very interested too
Posted By: Nidhogg

Re: Current Exporter Progress - 07/03/08 19:01

Ditto, I would love to use this plugin
Posted By: ecg_limey

Re: Current Exporter Progress - 07/09/08 19:16

Hey. Forgive me for not responding faster but I have just had surgery and I feel damn sore right now!

fyi this will be a free tool.

I am going to zip up the code and compiled dll and put up here very soon along with a basic tutorial (and i mean basic:)).

Loopix: shader advice always welcome.
Posted By: ecg_limey

Re: Current Exporter Progress - 09/22/08 21:00

Arrrr, I'm sorry this project took a back seat... Busy and porting cscript to clite. Is there still an interest in this tool? I am planning on working on it soon for my own project but will make it usable if other people want it (ie: Give it a half decent GUI instead of making it a programmers tool).
Posted By: Nidhogg

Re: Current Exporter Progress - 09/23/08 07:17

Yes I am still interested As I own a reg version of Earth Sculpture and the exporter would be a great assit for me..
Posted By: Anonymous

Re: Current Exporter Progress - 09/23/08 12:33

I am also interested
Posted By: Locoweed

Re: Current Exporter Progress - 10/07/08 00:30

This is getting close to being done all. It is actually a priority for the game at the moment, so hang in there a few more days.

This Earth Sculpture plug-in will be free for the 3dgs community.

The major change to the original plan is that it will now export a single hmp file instead of a group of sectored model files.

//******************* Old Sectored Model Exporter ******************//

We found too many issues with falling through the models at few certain points in the meshes with the sectored model version with our large maps, mainly a very very few mountain sides (like 3 spots on a 512x512 ES map sectored to 8x8 models (64 models)).
What I have linked below the old original sectored model plug-in as is. It won't have all the bells and whistles of the newer plug-in, but it will export the terrain mesh as a grid of models while reducing the number of polies on the flat areas and correctly aligning them in a wmp file.

Place in Earth Sculpture plug-in folder and then you can Export like a 8x8 model grid of the terrain (so 64 models) or whatever you specify. This plug-in will probably not be improved on (but then again, we are trying to find best performance, so we might end up back here again if we can solve the collision issues we encountered with this method), but if you want your terrain exported as a group of models, this might be useful to you because this exporter does work for that.

From Earth Sculpture, go Export - 3DGS Sector Export V1.01. I think it exports blend map also, but that is about it.

OLD VERSION! (Please read above) ES to 3DGS Sectored Model Exporter

For those without Earth Sculpture, this was output from that plug-in on a test map to a wmp file (8x8 sectors).
Sample Output from Sectored plugin

//************************************************************************//

The new hmp exporter plug-in should be done very soon, actually there is a version ready, but we are trying to tweak it and will probably go nuts and do some other test on different methods, but we will put it up soon.

We keep going back and forth when working on this trying to find best method, but we will get final versions of all the crazy Earth Sculpture exporters we create and test linked here eventually.

Later,
Loco
Posted By: Nowherebrain

Re: Current Exporter Progress - 10/07/08 14:46

I am interested as well.
Posted By: Nidhogg

Re: Current Exporter Progress - 10/08/08 01:22

I can't wait, Your efforts and of those that are helping you are very much appreciated "Especialy being a freebie as well"

It's people like you and your team that makes gaming development fun.

Can't wait for the final release.
Posted By: ecg_limey

Re: Current Exporter Progress - 10/08/08 06:54

fun??!?!?!?!?! laugh

Oh yes, that's it fun yes I remember now...
Posted By: Nidhogg

Re: Current Exporter Progress - 10/08/08 17:01

lol, I meant to type easier and enjoyable.
Posted By: Locoweed

Re: Current Exporter Progress - 10/08/08 20:09

This really isn't the right forum, but since we talking about Earth Sculpture here, our team could really use a good level designer. Unfortunately for now it wouldn't be paid work, but a stock options in the company type of deal.

If interested, let me know. Sorry for mentioning that here, but we could definitely use some help in that area.

Thanks,
Loco
Posted By: Nidhogg

Re: Current Exporter Progress - 10/11/08 00:04

I have a quick question, When starting a new map and in the new map specs
that popup, Is it best to tick RGB Lightmap or leave it blank?
Posted By: ecg_limey

Re: Current Exporter Progress - 10/12/08 17:09

Hi Nid,

Leave it blank as I put the lightmap as a grey scale image in the alpha channel of the blend map. Now that you mentioned this, I think I'll add some code to convert the RGB light map (it's really a shadowmap) to 8bpp;grey scale. I'll also pass on a basic shader that shows you how to manipulate the images.

ps2.0 ok?

As of right now the exporter does export an hmp, it exports all the detail images and the blend and shadow map, packs the images together (you'll see when u see the shader). One bug: The scale is wrong on export, trying to fix it now and will post the entire thing later on.

Lim3y

P.S. Sorry this has taken so long, I have a fulltime job and a 2nd fulltime job working on the game!
P.P.S. The reason I pack the images together is it allows me to do 4 textures and shadow by only using 4 texture slots, this leaves you 4 more in the mtl you assign to the hmp (bumps or whatever).
Posted By: Nidhogg

Re: Current Exporter Progress - 10/12/08 22:30

Thanks for the reply Lim3y. Yeah I thought as much about the lightmap but wasn't sure.

ps2.0 wouldn't be a problem as it should be pretty much standard with everybody
these days, Hell it's been around for a while now hasn't it?

Also I would like to suggest a couple of things, They don't have to be included in this release but maybe the next release if you decide to improve on it further.
Option of exporting the water plane and the skycube? Would that be feasable.

It's ok about the time period, We all understand about comitments, The way I look at is "Less likely to have bugs lol" Anyhow your hard work and dedication
is muchly appreciate "And I think I speak for all who use EarthSculptor"
and I can't wait to get my hands on it lol.
Posted By: Nidhogg

Re: Current Exporter Progress - 11/03/08 16:05

Just wondering how goes the exporter and if you have an ETA as yet thanks.
Posted By: Locoweed

Re: Current Exporter Progress - 11/14/08 00:03

Hi Nidhogg, the basic exporter is really done, although we are having to resize the terrain.hmp a bit manually for some reason after export. We still haven't got approval from boss man to release it yet, but I will bring it up at tommorrow's meeting.

Later,
Loco
Posted By: Nidhogg

Re: Current Exporter Progress - 11/14/08 21:02

Thanks Locoweed.
Posted By: Nowherebrain

Re: Current Exporter Progress - 11/18/08 03:59

Yay
Posted By: ecg_limey

Re: Current Exporter Progress - 12/01/08 21:23

Hey guys, sorry about this severe delay. Political issues within the company smile
As loco said, exporter is mostly done however, there have been tweaks going on with it to suit our game. I pack the textures so that I can have 4 terrain textures, blendmap and shadowmap. You will need to use my shader if you use the output as it currently stands (or write your own). I think it's limited on the output too, so if you have a 2kx2k map it will output 2kx2k vertices in the hmp. Again, no biggie but it does mean you have to load the hmp into med and mess with it to reduce faces.

What I'd like to do is put a version up that outputs 257x257 vertices in the hmp regardless of original map size, this should keep everyone happy in the company and also allow you guys to use it to some extent and provide some feedback.

So, are you all ok with me releasing a working/possibly bugy version for now?


Limey
Posted By: ecg_limey

Re: Current Exporter Progress - 12/01/08 21:24

Oh, and yes all the things that need doing arent hard just a little time needed and I'm swamped right now
Posted By: Nowherebrain

Re: Current Exporter Progress - 12/02/08 15:27

Do you have to ask?....of course. My mouth is watering.
Posted By: Nidhogg

Re: Current Exporter Progress - 12/02/08 18:28

Originally Posted By: ecg_limey

So, are you all ok with me releasing a working/possibly bugy version for now?
Limey


No problemo.
Posted By: ecg_limey

Re: Current Exporter Progress - 12/10/08 08:03

Hello

Finally here is a version of the HMP exporter for Earth Sculptor.

http://www.britaccents.com/hmp_utils/HmpExport.dll$
http://www.britaccents.com/hmp_utils/terrain.fx$
You will need to remove the $ from each file extension.

Synopsis:
This tool enables exporting of Earth Sculptors blendmap, 4 terrain textures and terrain mesh to 3d Gamestudio HMP format (Textures are bmp and optionally dds). It doesn't do ANYTHING that you couldn't do by hand in a paint package and MED, it just a lot faster.


Requirements:
Earth Sculptor (duh)
d3d9/d3dx9 runtime (You most probably have them installed).


Installation:
I decided to go with the time tested method of copy and paste smile
Close Earth Sculptor
Copy the dll to c:\EarthSculptor\Plugins or wherever your E.S. plugin directory is.
Run E.S.
Create a new map, don't make an RGB shadowmap 8bit only even though it doesn't use it right now.
Make your terrain, use same size textures, I recommend 1024x1024 or 2048x2048 use 4 detail textures on the terrain. I haven't tested it with anything other than 4 in use.
Click on Menu/Export/Hmp Export vX.XX
Check the appropriate boxes Generate HMP, Export Textures, Generate DDS. I think most of them are unchecked by default but you probably want to check them all for now.
Set Mesh scale, this might not be working perfect btw smile
Click Run
Select the folder and base filename, ie: c:\terrains\ter_new.hmp
Click Ok
Everything will hang for a few seconds whilst the HMP is generated along with the textures.
Explore to folder where you just saved to and check the files, assuming one used the previous path and filename one would see the following:
c:\terrains\ter_new.hmp
c:\terrains\ter_new_sk_0.bmp
c:\terrains\ter_new_sk_1.bmp
c:\terrains\ter_new_sk_2.bmp
c:\terrains\ter_new_sk_0.dds
c:\terrains\ter_new_sk_1.dds
c:\terrains\ter_new_sk_2.dds

xxx_sk_0.bmp/dds - 24bit texture. Blend map
xxx_sk_1.bmp/dds - 32bit texture. Alpha contains 4th terrain texture red channel
xxx_sk_2.bmp/dds - 32bit texture. Alpha contains 4th terrain texture green channel
xxx_sk_3.bmp/dds - 32bit texture. Alpha contains 4th terrain texture blue channel

I always keep textures as external files so artists can edit them without having to carry a model around, therefore, all 4 skins associated with the exported HMP file will be external.

If you download terrain.fx file and assign it in script then you will be able to see a rough version of your terrain (fixed uv coordinates). The fx file really is just a very very simple base to build upon or implement into your existing effect framework.
Posted By: ecg_limey

Re: Current Exporter Progress - 12/10/08 08:23

bool bBabbleMode = true;

printf("\n
I almost forgot to mention...\n
\n
Even though this little tool is small it still took a bit of time to get it working and making sure it didn't crash every 2 seconds. I really do believe in the what goes around comes around philosophy and hence why I decided to release it for everyone to use (hopefully!).\n
\n
Anyway, as I'm newish here (more of a lurker than poster), I offer this in the hopes that someone will enjoy using it. That alone makes it worth while.\n
\n
It would be a nice bonus if any of you happen to have a little time on your hands and think you could help out with our game. If so then please do get in touch. Artists (preferably the non quirky sort) a plus.\n");

bBabbleMode = false;

return 0;
Posted By: Nowherebrain

Re: Current Exporter Progress - 12/12/08 10:45

I will try and tst this when I get home.
Posted By: Loopix

Re: Current Exporter Progress - 12/13/08 12:42

Thanks for your work! Unfortunately after I've copied the dll into the ES plugin folder, there is still no "ExportHMP" menu aviable...any hints?
Posted By: ecg_limey

Re: Current Exporter Progress - 12/13/08 15:17

Hey Loopix. I'm not sure why not. Want add me to msn messenger? redleb_AThotmail~lNOSPAM~DOTcom I'd really like to get it working on another machine...

Also, do you have a registered vrsion of ES? I don't know if the unreg. version loads additional plugins or not.
Posted By: Loopix

Re: Current Exporter Progress - 12/13/08 16:21

No...I don't have the registered version of ES. Nevertheless it should load up to 5 plugins. Strange...the first version of your plugin loaded just fine.
The free version of ES has a texture-size limit of 257x257...can this be the reason?

(Sorry...I don't have MSN. You should know...I'm extremely old school laugh )
Posted By: ecg_limey

Re: Current Exporter Progress - 12/13/08 19:10

Hey, I don't think so. You could try clearing out the plugin folder and seeing what ES shows in the plugin menu (should be empty). Then add the plugins back in one by one running ES each time to see if they appear in the plugin menu.

It's possible it is crashing in DllMain or something.
Do you have the dxsdk installed?

Problem is my machine has just about everything installed on it so I have every version of every dll there is, it could be you are missing something like d3dx9.dll? The program needs that to call some of the d3dx texture functions.


If after clearing the plugin folder and seeing if it's recognizing them being added one by one, it still doesn't show up then I will recompile the dll with commented out code and see if it shows up then. That is, if you don't mind being my guinea pig.

(any IM at all my old skool :))
Posted By: Nowherebrain

Re: Current Exporter Progress - 12/15/08 16:02

does not work here either...registered version though.
Posted By: Nidhogg

Re: Current Exporter Progress - 12/15/08 21:31

Tested and works here, Although I had to copy the d3dx9_30.dll from gamestudio
into EarthSculptor's plugins folder and rename it to d3dx9_36.dll.
I reckomend that the d3dx9_36.dll be included with the plugin.

Loaded the exported hmp into WED no problems.
I haven't tested the exported .hmp in my level as yet though.

I have a registered version of EarthSculptor Beta 1.05 and my map size is 1024.

Great contribution ecg_limey, looking forward to the final release..
Posted By: ecg_limey

Re: Current Exporter Progress - 12/16/08 06:40

Hi

Thanks for that info. Nid. I'll put the dll in the zip file.

Would you guys mind trying again with dxdx9_36.dll?

I'm thinking that on export it should just write out all the bmps, blend, shadow, textures etc... as seperate files. This will allow you to do whatever u want in so far as rendering and shaders. The dds part can stay the same.

There is no final version, it's constantly being modified at the mo for myself.

I was hoping you guys would use it and give me feed back on where to go with it. I personally use it as I can go from ES to in-game within a minute which is great when tweaking stuff.
Posted By: ecg_limey

Re: Current Exporter Progress - 12/16/08 06:48

D3DX9_36.DLL

http://www.britaccents.com/hmp_utils/d3dx9_36.dll$
Posted By: Nidhogg

Re: Current Exporter Progress - 12/16/08 19:02

Originally Posted By: ecg_limey
Hi
Thanks for that info. Nid. I'll put the dll in the zip file.
No problem.

Originally Posted By: ecg_limey

I'm thinking that on export it should just write out all the bmps, blend, shadow, textures etc... as seperate files. This will allow you to do whatever u want in so far as rendering and shaders. The dds part can stay the same.
Sounds like a good idea. Would this also include the water as well as the sky cube?

Originally Posted By: ecg_limey

I was hoping you guys would use it and give me feed back on where to go with it. I personally use it as I can go from ES to in-game within a minute which is great when tweaking stuff.
The only thing I can think of at the moment is to have the option for number of faces upon export, Other than
that I don't think there is to much more that can be done with this fantastic plugin grin
Posted By: ecg_limey

Re: Current Exporter Progress - 12/16/08 20:56

Ok, so briefly.

Export all terrain associated textures seperately as bmp:
Blendmap 0
Blendmap 1 (If 8 terrain textures used)
Shadowmap (RGB or Greyscale)
Textures 0 - 3
Textures 4 - 7 (If used)

Export water plane as hmp
Export associated water textures

Not too sure about the skycube aspect. Seems as though there are many other apps for generating skycube stuff?

If dds is checked I will still put the dds filnames into the relevant hmps (still keeping the files as external) as this allows me (anyone) to just export and run the game without having to do anything else.

If you keep the textures packed the way I do then you can have

1 x blend map
1 x shadowmap (8bit)
4 x terrain textures
4 x terrain normal maps
4 x greyscale detail maps

all packed into 8 textures.


Regards

Justin
Posted By: Nidhogg

Re: Current Exporter Progress - 12/17/08 19:25

Sounds like a plan, Would you also be amending the material.fx so we can
use all 8 textures and water texture?
Posted By: ecg_limey

Re: Current Exporter Progress - 12/17/08 20:33

you mean terrain.fx?
Posted By: Nidhogg

Re: Current Exporter Progress - 12/18/08 10:18

Originally Posted By: ecg_limey
you mean terrain.fx?


That's the one, I was tired and to lazy to look for the proper name smile
Posted By: Loopix

Re: Current Exporter Progress - 12/18/08 16:39

It's still not working here cry
I don't really want to download the dxsdk (over 400 Mb!) crazy
Btw. Im runing XP (SP3), GTS-8800, Intel-Dualcore, latest directX. I never had troubles with missing dx-components so far...and yes I did erase the "$" and copied the files into the proper folders. I also cleared the plugin folder and put the plugins back one by one...diden't help
Posted By: Nidhogg

Re: Current Exporter Progress - 12/18/08 20:18

Hey Loopix how you doing.
Have you tried using EarthSculptor v1.05
Posted By: ecg_limey

Re: Current Exporter Progress - 12/19/08 07:33

Hey loopix, other than using v1.05 I'm really not sure what to suggest. I can put some debug msgbox stuff in to see if and where it's crashing if you don't mind?

Actually, I have a logging class somewhere I'll put that in and put a ton of logmsgs throughout the code, just let me know if you want to do that...
Posted By: GamerX

Re: Current Exporter Progress - 12/19/08 21:14

Do you need the registered version? Because its not showing up in my export menu. I would really like to use this, it looks awesome.
Posted By: ecg_limey

Re: Current Exporter Progress - 12/21/08 12:10

Honestly, I'm not sure if you need the reg version or not. I bought a reg key from day one...

Gamer, did you download d3dx9_36.dll? Look in this thread for the url if you didn't d/l it already.♦
Posted By: GamerX

Re: Current Exporter Progress - 12/23/08 01:41

Yea i put that in but it still seems its not coming up is there any way to get the obj exporter to export so that i can merge the vertexes and convert it? Because every time i try no matter what LOD i put or if i turn it off the vertexes still end up wrong.
Posted By: ecg_limey

Re: Current Exporter Progress - 12/23/08 09:09

I didn't have a problem with the obj exporter, maybe you're in the wrong coordinate system? IIRC you need to flip one of the axis going from ES to 3DGS. I'm really curious about the dll though, weird I'll try to get a real basic dll up and see if it shows up, if it does then I can put some debug code in the hmp exporter and see hat is going on on ur guys' machines.

Justin

P.S. Ping Locoweed and ask him which axis(es)(sp) need to be swapped when importing ES obj files into MED.
Posted By: Darkyyes

Re: Current Exporter Progress - 01/31/09 15:47

I am also having the problem with your exporter, and I've got the regged version, I've tried the dx9 dll fix but it doesnt work.
Posted By: Nidhogg

Re: Earth Sculptor exporter - 03/15/09 15:57

Just wondering if there are going to be any more updates?
© 2024 lite-C Forums