|
DeleD Community Edition Forums
|
View previous topic :: View next topic |
Author |
Message |
Il Buzzo DeleD PRO user
Joined: 12 Aug 2004 Posts: 271 Location: Italy
|
Posted: Tue Apr 26, 2005 12:30 am Post subject: |
|
|
Hi Guys,
I've finally released my DBO Exporter Plugin Final Release 1.0 ( RC5), now this release includes the possibility to export textures to a chosen folder, and more of all to export a collision mesh dbo file to use with physics engine like Newton etc....
You can download this version, including a chm help file, from my site at :
http://www.ilbuzzo.net/downloads/DBOExporter.zip
Now this is the fixed final release, so unless there are very bad bugs this will be stable unless the end of my game .
Anyway bye . |
|
Back to top |
|
|
hpesoj DeleD PRO user
Joined: 16 Oct 2004 Posts: 184
|
Posted: Sat Apr 30, 2005 4:48 pm Post subject: |
|
|
It's good, but there seems to be one more problem . DBPro seems to be able to handle it, but my loader can't. When you lightmap a scene (just use a simple cube as an example) the FVF format (786) claims there are 3 texture layers, when only two are actually written. |
|
Back to top |
|
|
Il Buzzo DeleD PRO user
Joined: 12 Aug 2004 Posts: 271 Location: Italy
|
Posted: Mon May 02, 2005 1:06 pm Post subject: |
|
|
Hi hpsoj,
I think you've done a little mistake in your reader that I did at the first with DBO format.
You must notice that tex0 (0x0000) is not used in FVF, cause in theory it's always present, but it's not really true so if you use just say 2 textures, you'll must add to FVF 0x100 and 0x200 (it means tex1 and tex2 used). I don't know why the hell they added texture 0 in their format when DBPro generated files neither use it.
If you want to make sure of this, give a look to DBO reference at page 8 and look what they write, or better create a simple cube in DBPro , texture it with two layers and save it.
Give a look at the result and you'll see what I mean!!!
Bye |
|
Back to top |
|
|
hpesoj DeleD PRO user
Joined: 16 Oct 2004 Posts: 184
|
Posted: Wed May 04, 2005 1:04 pm Post subject: |
|
|
I will try that when I get home, but for the moment, I'm confused. What you're saying is that to define an FVF format as having two textures, you have to do...
FVF = Tex1 | Tex2
But that would imply that you could also have just Tex2, without Tex1 (otherwise, why put Tex1 as well as Tex2?) like so...
FVF = Tex2
But if that is true, then you could also have this...
FVF = Tex3
Which would have a value of 0x300. But when decoding this, how are you to know if 0x300 is...
0x300 = Tex3
0x300 = 0x300
or
0x300 = Tex1 | Tex2
0x300 = 0x100 | 0x200
One texture or two textures??
Also, like you said, with that way having Tex0 = 0x000 makes no sense if Tex0 is an actual texture, but I thought a value of Tex0/0x000 simply meant no textures are in the FVF format, and you define how many textures are there by using the appropriate texture code. Eg...
0 Textures and XYZ: 0x000 | 0x002
5 Textures and Normal: 0x500 | 0x004
8 Textures and XYZ and Normal: 0x500 | 0x002 | 0x004
After all, there is no actual way to define whether a texture is Tex1 or Tex3 or tex4 etc., they simple come one after another in the file. It would make sense to define the amount of textures rather than the individual textures themselves. |
|
Back to top |
|
|
Il Buzzo DeleD PRO user
Joined: 12 Aug 2004 Posts: 271 Location: Italy
|
Posted: Thu May 05, 2005 3:40 pm Post subject: |
|
|
Hi hpesoj,
I'm not the DBO file format creator, I'm only explaining you how it works. And it works this way. If you have two textures why would you like to define them as tex4 and tex5?
Actually in DBO definition if you have a value of tex3 it means you really have tex1, tex2 and tex3, it's not my fault, but it's the way TGC defined their file format.
So don't worry about this and just conform your code to insert a texture after each other just like i did in DBO Exporter using a bitwise OR ( | ), unless TGC change their format.
Bye |
|
Back to top |
|
|
hpesoj DeleD PRO user
Joined: 16 Oct 2004 Posts: 184
|
Posted: Tue May 24, 2005 3:09 pm Post subject: |
|
|
I just had another look at the format and my code and I'll have to disagree with you on this one again. I have tested texturing a cube with up to 5 textures, and each time my loader can manage them. The FVF format does not seem to work how you say it does. Note that in DBPro, texture1 is referenced by a 0, ie.
texture object 1,0,1
That textures object1, texture1 with image1. However, in the dbo format, tex0 means no textures exist, rather than 1 texture exists. Hence, doing this...
texture object 1,1,1
...will indeed create an FVF format 0x200, and texture1 will be filled with a blank texture ("").
I may be mistaken, as I have been before, but I still can't find how your method works. |
|
Back to top |
|
|
Il Buzzo DeleD PRO user
Joined: 12 Aug 2004 Posts: 271 Location: Italy
|
Posted: Thu May 26, 2005 12:55 pm Post subject: |
|
|
Well Hpesoj,
I don't know what's the real problem now, DBO Exporter works good ans I explained how it works.
To tell the truth I've written some comments to DBO Format documentation and you can find them looking at this post:
http://forum.thegamecreators.com/?m=forum_view&t=52271&b=5
Maybe it could help you, but if not, please send me an e-mail and I'll try to help you within my possibilities (remember I've not created DBO Format I'm just a user like you ).
Bye All |
|
Back to top |
|
|
hpesoj DeleD PRO user
Joined: 16 Oct 2004 Posts: 184
|
Posted: Sat May 28, 2005 11:29 am Post subject: |
|
|
Since I'm not sure either of us gets quite what the other is talking about, I emailed Mike, and it certainly clarified my problem. Here is his reply...
Quote: |
You only have to use one of the texture codes. For example, with the advanced terrain the following FVF is used -
D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX2
This gives the mesh the x, y and z coordinates, a diffuse colour ( as a dword ), and 2 sets of texture coordinates ( as 4 floats ). This allows me to have the standard diffuse texture and place a detail texture on top.
If I wanted to add a third texture layer for terrain I would change the FVF to -
D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX3
Here's a list of the available values for the vertex format for reference -
#define D3DFVF_RESERVED0 0x001
#define D3DFVF_POSITION_MASK 0x400E
#define D3DFVF_XYZ 0x002
#define D3DFVF_XYZRHW 0x004
#define D3DFVF_XYZB1 0x006
#define D3DFVF_XYZB2 0x008
#define D3DFVF_XYZB3 0x00a
#define D3DFVF_XYZB4 0x00c
#define D3DFVF_XYZB5 0x00e
#define D3DFVF_XYZW 0x4002
#define D3DFVF_NORMAL 0x010
#define D3DFVF_PSIZE 0x020
#define D3DFVF_DIFFUSE 0x040
#define D3DFVF_SPECULAR 0x080
#define D3DFVF_TEXCOUNT_MASK 0xf00
#define D3DFVF_TEXCOUNT_SHIFT 8
#define D3DFVF_TEX0 0x000
#define D3DFVF_TEX1 0x100
#define D3DFVF_TEX2 0x200
#define D3DFVF_TEX3 0x300
#define D3DFVF_TEX4 0x400
#define D3DFVF_TEX5 0x500
#define D3DFVF_TEX6 0x600
#define D3DFVF_TEX7 0x700
#define D3DFVF_TEX8 0x800
If you need any more help with your loader let me know. I can always send you some C++ examples if they will be of any use.
Regards,
Mike |
|
|
Back to top |
|
|
granada Team member
Joined: 07 Aug 2004 Posts: 1955 Location: England
|
Posted: Thu Jun 02, 2005 4:05 pm Post subject: |
|
|
HI Il Buzzo
Would it be possible to write a DBO importer to,that would be great
dave _________________ AMD Phenom(tm)IIx6 1090t Processor 3.20 GHS
8.00 GB memory
Windows 7 64 bit
Nvida Geforce GTX 580 |
|
Back to top |
|
|
Il Buzzo DeleD PRO user
Joined: 12 Aug 2004 Posts: 271 Location: Italy
|
Posted: Sat Jun 04, 2005 8:36 am Post subject: |
|
|
Hi Dave,
I think it's possible, It's on my list and I'll start It's development after my last exams.
Bye |
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Sat Jun 04, 2005 8:53 am Post subject: |
|
|
Goodluck with your exams btw, hope you pass them! |
|
Back to top |
|
|
granada Team member
Joined: 07 Aug 2004 Posts: 1955 Location: England
|
Posted: Sat Jun 04, 2005 9:41 am Post subject: |
|
|
Quote: |
Hi Dave,
I think it's possible, It's on my list and I'll start It's development after my last exams.
|
Thanks Il Buzzo,& as jeroen says Good luck with your exams
dave _________________ AMD Phenom(tm)IIx6 1090t Processor 3.20 GHS
8.00 GB memory
Windows 7 64 bit
Nvida Geforce GTX 580 |
|
Back to top |
|
|
Il Buzzo DeleD PRO user
Joined: 12 Aug 2004 Posts: 271 Location: Italy
|
Posted: Sat May 27, 2006 9:58 am Post subject: |
|
|
Hi Guys,
As Hpesoj make me notice I did a mistake in interpretation of DBO format
(sorry for having not seen it before ) FVF format that caused some troubles just like the one with bumpmapping in DBPro or potentially some errors in FPSC.
So I've corrected and updated on line a new version 1.1 that is practically the same of precedent but with the removing of bug, as usual you can download from [just 162KB]:
http://www.ilbuzzo.net/downloads/DBOexporter.zip
Well I have no new images for the moment but I've tested it with DeleD 1.44 and DarkBasic Pro 6.0 and it works as usual (I've tested all sample files), now I'm downloading Update 6.1 when I'll test I'll add some new images.
Thanks to Hpesoj (I added a new thank in help file ) and as usual to all DeleD team and all users.
Bye All
@Jeroen or Paul-Jan:
Please because of entity of error update this version as soon as possible. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|