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.

3 Dimensional Chat / FVF Formats

Author
Message
richardneail
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2003 11:08
Hi,

As you can use FVF formats 274 and 338, how are these numbers derived?

I have looked at the info on MSDN but cant work it out.

Rich

You might never win but if you give in will you ever know ??????
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 14th Nov 2003 12:14
FVF Code versions are just binary flag values...
once i have everything reinstalled i'll grab the values from the dbp help and explain a little further.

but basically put each little clump of binary bits = a value which indicates the size and content of the fvf buffer.

%000 0 0 0 0 000

split like that will make more sense.
from right to left... they're all grouped
XYZ, Normal, Diffuse, Specular, Point, Tex UV

the next 4 indicate Tex BitShift offset size and the last one is the UBYTE Flag.


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
900mhz | 256mb | FX5200Ti 52.16 | Dx9 | WXP-Pro
richardneail
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2003 14:30
So if not to sound totally stupid how do you get the 274 or 338 from that ?

Rich

You might never win but if you give in will you ever know ??????
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 14th Nov 2003 16:25
I don't think there is a relation between the numbers, could be something totally cryptic - the only difference in the formats is the inclusion of vertice colours in 338, which is only a double word. The length of each segment is specified anyway, so I don't think the format specifies that - it's probably some weird internal code for the mesh creation system inside DBPro.


Van-B


I laugh in the face of fate!
richardneail
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2003 18:14
So the numbers are just made up by DB and not a standard format?

Rich

You might never win but if you give in will you ever know ??????
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 14th Nov 2003 21:08
Well FVF stands for Flexible Vertex Format, and they are DX formats, but more internal DX formats - not related to DX files as such. The DX engine uses the same format to handle meshes, so Lee's just giving us similar control to that available in C++, however we don't yet have the same control over how the meshes are created, things like multi-texturing etc is something we'll just have to wait for.


Van-B


I laugh in the face of fate!
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 15th Nov 2003 03:28
you achieve the numbers as each of the sections = a number
i'll show you with 338

338 = 0000 0001 0101 0010

it is made up of XYZ, NORMAL, DIFFUSE and TEX1
these are the only flags that are set to on.

XYZ = 0x002 = 2 = %0010
NORMAL = 0x010 = 16 = %0001 0000
DIFFUSE = 0x040 = 64 = %0100 0000
TEX1 = 0x100 = 256 = %0001 0000 0000

Now all you do is just add them all together with a binary OR routine

XYZ || NORMAL || DIFFUSE || TEX1 = 0000 0001 0101 0010

that this achieves basically is to adds them all together on the binary level effectively doing this ->



so effectively everything slots into place like so

XYZ...... 0000 0000 0010
NORMAL... 0000 0001 0000
DIFFUSE.. 0000 0100 0000
TEX1..... 0001 0000 0000
FINAL.... 0001 0101 0010

hopefully i makes it a little clearer to how it all works now ^_^


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
900mhz | 256mb | FX5200Ti 52.16 | Dx9 | WXP-Pro
richardneail
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 17th Nov 2003 13:07
Ok yes that makes sence and I can see how you get the numbers, so how do I know what the flags are and find them out ?

e.g.

XYZ = 0x002 = 2 = %0010
NORMAL = 0x010 = 16 = %0001 0000
DIFFUSE = 0x040 = 64 = %0100 0000
TEX1 = 0x100 = 256 = %0001 0000 0000

Like could I add another texture coord to my FVF format and if so what would the flag be?

Rich

You might never win but if you give in will you ever know ??????
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 17th Nov 2003 16:37
you can grab back the flags pretty easily with some cunning binary filtering and a nice Select...Case statment ^_^

you want another TEX uv all you do is select the TEX2 flag (0x200) instead of the Tex1, this will now give you 2 textures.
You can have upto 8 Tex Coordinates, and if you used the TexCoordinates flags which i have an old post that explains them pretty well you can even setup the texture declarations for them in how they're paired up.

i've only got a few mins now so i can't explain much atm, and no copy of dbp or dx onhand to pick the data from - but i'll be back sometime at the end of the week to explain


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
900mhz | 256mb | FX5200Ti 52.16 | Dx9 | WXP-Pro
richardneail
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 17th Nov 2003 17:47
Hey,

Ok thanks for the help I put a little thankyou on my demo for your help.

Rich

You might never win but if you give in will you ever know ??????
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 18th Nov 2003 20:42
just a lil thing to say, not forgot about thier ... i'm just have an insane ammount of work and no home system atm


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
900mhz | 256mb | FX5200Ti 52.16 | Dx9 | WXP-Pro
las6
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 19th Nov 2003 11:15
Could you show us a page with some info on those flags. Or where have you gotten the information on those? Meaning that if I'd like to include some other things, like the other texture coordinates you talked about, how would I know what is the position of that flag. Handling them seems easy enough.

Keyboard not detected. Press F1 to continue.
richardneail
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 19th Nov 2003 14:49
Yer thats what I was asking too.

You can get some tech info on it here

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/programmingguide/GettingStarted/VertexFormats/vformats.asp

Rich

You might never win but if you give in will you ever know ??????
las6
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 20th Nov 2003 11:16
I know, I checked that one out before... But I couldn't find the flags anywhere! Perhaps dx SDK has better info on the subject. I have it at home, so if I'd just remember to check it out...

Keyboard not detected. Press F1 to continue.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 20th Nov 2003 12:21
if you have the DirectX SDK (currently i don't on here right now )
you can find a list of the flags and thier 0x hex values within
//DXSDK//INCLUDE//D3D9Types.h

near the bottom it has the whole Tolkens for ASM and EFFECT Shader languages
also has the prototyping that allows you to recreate some things in DBP


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
900mhz | 256mb | FX5200Ti 52.16 | Dx9 | WXP-Pro
las6
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 20th Nov 2003 13:01
(never thought I'd say this, but..)
thanks for the info.

Keyboard not detected. Press F1 to continue.
richardneail
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 20th Nov 2003 13:24
Well thanks for the Info, I dont have the SDK dloaded at the moment but will go get it later and look.

Rich

You might never win but if you give in will you ever know ??????
las6
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 20th Nov 2003 17:39 Edited at: 20th Nov 2003 17:40
hey, guess what I found from DBpro help files?!

I believe these are the correct ones:


`D3DFVF_RESERVED0 0x001
`D3DFVF_POSITION_MASK 0x00E
`D3DFVF_XYZ 0x002
`D3DFVF_XYZRHW 0x004
`D3DFVF_XYZB1 0x006
`D3DFVF_XYZB2 0x008
`D3DFVF_XYZB3 0x00a
`D3DFVF_XYZB4 0x00c
`D3DFVF_XYZB5 0x00e
`D3DFVF_NORMAL 0x010
`D3DFVF_PSIZE 0x020
`D3DFVF_DIFFUSE 0x040
`D3DFVF_SPECULAR 0x080
`D3DFVF_TEX0 0x000
`D3DFVF_TEX1 0x100
`D3DFVF_TEX2 0x200
`D3DFVF_TEX3 0x300
`D3DFVF_TEX4 0x400
`D3DFVF_TEX5 0x500
`D3DFVF_TEX6 0x600
`D3DFVF_TEX7 0x700
`D3DFVF_TEX8 0x800
`D3DFVF_LASTBETA_UBYTE4 0x1000

(from the 3dmath showcase example - scroll down)

Keyboard not detected. Press F1 to continue.
richardneail
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 20th Nov 2003 21:43
Ok here is my next question if you can use multi textures how does DBP know which texture images it should be using?

Rich

You might never win but if you give in will you ever know ??????
las6
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 21st Nov 2003 10:02
it probably doesn't, so that effectively makes it impossible to use those for that.

Keyboard not detected. Press F1 to continue.

Login to post a reply

Server time is: 2025-05-15 02:18:59
Your offset time is: 2025-05-15 02:18:59