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.

3D World Studio / Replacement X exporter

Author
Message
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Aug 2005 00:46
I have just completed work on a new and free X exporter for CShop.

It does everything the original one does, plus allows you the choice of exporting (or not) the following:
- Vertex normals
- Vertex colours (ie per-vertex lighting)
- Texturing information
- Lightmap mesh

In addition you can also:
- Rescale the mesh
- Adjust brightness of vertex colours (if they are active)

All options can be configured using the ini file included in the zip file. It seems to work well - let me know how it goes.

Installation:
Just extract the 2 files from the zip, drop them into your CShop plugins folder, and then start/restart CShop. The exporter name is 'Matrix1 X Exporter'.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk

Attachments

Login to view attachments
FINN MAN
20
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 6th Aug 2005 01:06
this in cool.

some one told me you have a pluge in for INI files that lets you use them in dbp, if you do can you give me a link to the file.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Aug 2005 01:17
Sure : http://www.matrix1.demon.co.uk/DBPro/downloads/Matrix1Data_exe01.zip

If you plan on using the ini-file plugin to update the exporter ini file, make sure that you use the 'OPEN INI STORE' command to open the file, otherwise you'll lose all of the comments in the file.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 6th Aug 2005 11:08
The lightmap still doesn't work properly. Though if you based your version on Josh's it is not your fault. The normals are awesome though

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Aug 2005 12:17
Yes, Josh's code was used as my main reference. If you check the output with the right settings, you will see that they match output character for character - that allowed me to get everything right before I started adding the new stuff.

If you can let me know exactly what is wrong with the lightmap output, I can attempt to fix it.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 6th Aug 2005 14:49
I've added this thread to the tools one. I've not actually added the download link just yet, until Ian is happy with the exporter and that it can be hosted for download on any of the wenspaces or mirrors.

Paul.


Home of the Cartography Shop - DarkBASIC Professional map importer
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 6th Aug 2005 21:21 Edited at: 6th Aug 2005 21:35
Well the lightmap mesh seems to be textured totally black in both exporters though the lightmap textures are not totally black This boggles me as it worked in earlier versions. Almost as if the UV data is messed up.

[edit] The problem is for some reason the lightmap mesh doesn't contain all of the texture names (in my example cshop made 2 lightmap texture files and only one is mentioned in the _lm.x) and DBP isn't auto texturing the mesh. If I do load texture and then texture the object if works great but I can only do this with single texture lightmapped objects. I am using the bedroom example that comes with cshop for my tests.

I am using this code right now to get it to work prettyg good with only 1 texture file on the lightmap mesh.



IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Aug 2005 21:56 Edited at: 6th Aug 2005 22:01
I don't have any problems of that kind with the exporter - Can you ship a small example of a map where you have this problem (both CSM, and exported models)?

I'm testing a modification I've made to lightmaps ATM, so now's the time to get it to me

Attached: A lightmap model as seen in the MeshView utility, using the latest version

[edit]Replace bitmap with png (960k->35k!)

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk

Attachments

Login to view attachments
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 6th Aug 2005 22:12 Edited at: 7th Aug 2005 12:54
Odd I just made a small example and it works fine. I was just using the bedroom.csm that comes with CSHOP. So I thought it might be the prefabs messing it up but my larger level has no prefabs and messes it up. I will do some more research on it this weekend and see if I can find what is messing it up. Also i wasn't loading my model in meshview but in DBP. I will try both during this weekends tests. The problem may be that multiple lightmap textures mess it up because my simple test only had 1 lightmap texture and all that failed had 2 or more. I'll post what I find.

[edit]
It seems there is more than one error. I have been able to replicate the incorrect texturing in DBP, but not the no texturing though they may be linked. When there are multiple lightmap textures it seems to texture the mesh incorrectly. Attached is a .zip containing 2 .csm and the .x exports from them. The .csm's are identicle except test.csm uses very high detail on the lightmap with 512x512 image sizes and produces 1 lightmap image. the test2.csm is the same map but uses very high detail and 256x256 lightmaps creating 3 lightmap images. The test_lm.x works great but the test2_lm.x seems to use all 3 images with the same uv's or something

Attachments

Login to view attachments
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Aug 2005 21:17
Well, I don't know what the original plugin was doing, but I know what mine was doing, and now it's fixed (I hope!)

New big new addition to the plugin - you can now specify that the file contains a frame per mesh, instead of all meshes in a single frame. That allows you to access each frame/mesh as a limb in DBPro.

I had to compromise a bit on this, because there is no centre point specified for the meshes in the CShop data, so the plugin calculates a bounding box for each mesh and assumes that the centre of this box is the centre of the mesh. (Although the mesh structure contains x/y/z, they always seem to be set to zero).

Anyway, check it out and see what you think.


... BTW, how do you generate multiple lightmaps for a level? I can't seem to figure it out.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk

Attachments

Login to view attachments
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th Aug 2005 22:33 Edited at: 7th Aug 2005 23:09
It has indeed fixed both errors it seems, great job CSHOP will create multiple lightmap files when the datail level of the lightmap is too high and the lightmap texture size is too small to hold all of it on one image.

[edit] There is an error now where my larger maps' lightmap meshes seem to be invisible I will try and get a smaller map to cause the error.

[edit] make that the lightmap and regular meshes seem invisible or something

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Aug 2005 23:06
Well, I'm glad that sorted the lightmapping out ... I still have a few more things that I'm considering, so this still isn't the final version of this plugin just yet.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th Aug 2005 23:07 Edited at: 7th Aug 2005 23:35
See my edit above. I'll see what I can come up with.

[edit] NM the new frame settings messed with DBP's autocam. It was placing my camera way too low and pointing off into nowhere. Turning autocam off and manually positioning the camera fixed it. All seems well ATM.

Advancement Games
19
Years of Service
User Offline
Joined: 6th Jan 2005
Location:
Posted: 8th Oct 2005 20:42
Will you be making one for 3dws?

C. Nom De Plum
JoshK
Retired Moderator
20
Years of Service
User Offline
Joined: 17th Jun 2003
Location:
Posted: 8th Oct 2005 20:44
3DWS already has an .x exporter.

WindowsXP Media Center Edition, Pentium 4 2.53 GHz CPU, 512 MB of RAM, GEForce4 MX 440
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 1st Dec 2005 12:22
If this still isn't the final version. Can you totally remove all mesh and material data having to do with "common\caulk.bmp". It seems to be messing up DBP's limb texture name() command. If I delete the faces instead of caulking them, it works fine. If I open up and manually remove all the data pertaining to the caulk texture, it works.

This works:


But this original doesn't:


re faze
19
Years of Service
User Offline
Joined: 24th Sep 2004
Location: The shores of hell.
Posted: 1st Dec 2005 14:24
yes, it would be quite nice to remove the faces that are caulked during x and dbo export, so that i can save some poly's

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 1st Dec 2005 22:13
It already removes the faces, it just leaves the materials list trash that messes up the limb texture name() command.

re faze
19
Years of Service
User Offline
Joined: 24th Sep 2004
Location: The shores of hell.
Posted: 1st Dec 2005 22:35
sorry my bad, the .x exporter removes the faces, however the .dbo exporter retains faces, and just textures them with the caulk texture upon export. please fix this when you get the chance.

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 1st Dec 2005 23:07
What DBO exporter? This is for CSHOP instead of 3dws.

re faze
19
Years of Service
User Offline
Joined: 24th Sep 2004
Location: The shores of hell.
Posted: 2nd Dec 2005 14:58
still dont understand why is wasnt called cshop 5.0 though.

CTF Freak
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location: In your base
Posted: 3rd Dec 2005 23:43
I think he just made it so different that he changed it entirely
that way we have to spend more money. *sigh*

Is there a reason no one has made an x exporter for cshop
that exports lightmaps to the same x model so it is just one model not two?
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 4th Dec 2005 01:35
Quote: "Is there a reason no one has made an x exporter for cshop
that exports lightmaps to the same x model so it is just one model not two? "


Yes there is. DBP doesn't support .x multitexturing properly if the uv info of each texture stage doesn't match. And even the dbo is bugged now it seems.

CTF Freak
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location: In your base
Posted: 4th Dec 2005 20:19
well can someone make a dbo exporter for cshop?
I don't have money for 3dws
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Dec 2005 20:40
Quote: "Can you totally remove all mesh and material data having to do with "common\caulk.bmp""


I'll need to re-read the code to see - it's a long time since I made any changes to it.

Quote: "Is there a reason no one has made an x exporter for cshop
that exports lightmaps to the same x model so it is just one model not two?"


Looked into it, couldn't see a way of doing it. Various people have also told me that it can't be done anyway. I don't know whether they are right or not, but I wasn't too bothered either way really.

Quote: "well can someone make a dbo exporter for cshop?"


Don't need to. Export to X, and use the X to DBO converter available from the DBPro forums

For free Plug-ins and source code http://www.matrix1.demon.co.uk
CTF Freak
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location: In your base
Posted: 4th Dec 2005 21:23
Quote: "Don't need to. Export to X, and use the X to DBO converter available from the DBPro forums"

No,no you didn't see what I was saying.
I want to export to dbo with a lightmap and everything on one object.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 4th Dec 2005 22:02
You can use the csm importer like I told you to load a csm and save it as a dbo.

CTF Freak
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location: In your base
Posted: 5th Dec 2005 04:40
but it like makes six hundred objects how do I make it one object?
do you think you might be able to make a utility for it?
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 5th Dec 2005 11:05
I have alot of stuff going on right now. However, it makes objects based on groups. If you group your entire level into 1 group, it should make 1 object with alot of limbs. I'll try and make a utility when I get time. No telling when that will be.

re faze
19
Years of Service
User Offline
Joined: 24th Sep 2004
Location: The shores of hell.
Posted: 5th Dec 2005 15:33
the .x and .dbo exporter should export like this too.

@ianM
I assume you made this dll in c++ right? can you post your dll.h and the functions pluginClass and PluginLabel, I cant get them to work properly in cs or 3dws.

CTF Freak
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location: In your base
Posted: 7th Dec 2005 04:10
Do you mean selecting the level and then hitting the "group button"?
if I do that then it still makes thousands of objects.
And you are talking about the free importer right?
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th Dec 2005 08:09 Edited at: 7th Dec 2005 08:11
Well I assumed since he updated the free importer for single stage lightmapping that he updated that portion as well. If he didn't then the code may need modifying a bit. It is open source afterall. If you don't get it before I get time, I'll do it. I just don't know when I'll get time I have a couple of things yet to finish first.

[edit] If it will help in the next few days I can write a code to turn all of those objects into 1 object with alot of limbs to save, though it will be very slow and memory intensive.

CTF Freak
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location: In your base
Posted: 7th Dec 2005 14:17 Edited at: 7th Dec 2005 15:05
see I would like to be able to to just make parts of the map
then tell my game where they go with a text file but I either lose the lightmaps when I use .x or I double the polycount and I don't have good enough computers to be satisfied with that.

edit: how do you make them limbs without loosing the multi-texture ?
I already tried making them limbs once. but mabe if you made them limbs before it got to the texture part of the load csm?
Am I on the right track?
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th Dec 2005 18:49 Edited at: 7th Dec 2005 19:08
You would have to rebuild them just as he did pretty much, but instead of using make object use add limb for every one but the first one.

[edit] See in his code he makes 1 object per surface (each face), you just need to modify it to make 1 per mesh. From around line number 1897 to 2027 in his include. I don't know how you would setup blendmapping on an entire object though (with different image numbers poer limb), now that I think about it. And this method will only work if you do not texture different faces of each mesh with a different texture (it would be better to use caulk so it leaves off those faces and use another brush). Maybe I'll get time to check on it this evening hopefully. But no promises.

CTF Freak
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location: In your base
Posted: 8th Dec 2005 13:34 Edited at: 9th Dec 2005 05:28
I've got it to recreate the object structure as one object but not
with the textures.
Is it possible to do blend mapping on a limb?

Edit: Iv'e found a free program that fixes all the problems I have been having.
http://www.delgine.com/index.php?filename=product_deled&menus=off
It's a mapping program that has a cshop importer and a .dbo exporter.
it also has lightmapping. It also has a merge function so if I select the entire map and click merge it all becomes one object and not a bunch of limbs making it faster in dbp.
My fps before I merged them was 30 now its 70!!
And now I can add lightmapping without increasing poly count!!
Skids Cyber
18
Years of Service
User Offline
Joined: 18th Aug 2005
Location: The Foothills of Imagination
Posted: 22nd Feb 2006 16:24
I can't sownload this. can someone give me a link, I REALLY need a good exporter.

Login to post a reply

Server time is: 2024-05-03 20:56:54
Your offset time is: 2024-05-03 20:56:54