Minimum Vertex size
-
- Posts: 75
- Joined: Mon Sep 19, 2005 5:41 am
Minimum Vertex size
Has anyone noticed that there appears to be a minimum vertex size?
GU_TEXTURE_16BIT|GU_VERTEX_16BIT|GU_TRANSFORM_3D
Does not seem to work for me, but:
GU_TEXTURE_16BIT|GU_COLOR_5551|GU_VERTEX_16BIT|GU_TRANSFORM_3D
does work.
I have made sure my padding is correct for both cases. Has anyone else seen this or is it just me?
GU_TEXTURE_16BIT|GU_VERTEX_16BIT|GU_TRANSFORM_3D
Does not seem to work for me, but:
GU_TEXTURE_16BIT|GU_COLOR_5551|GU_VERTEX_16BIT|GU_TRANSFORM_3D
does work.
I have made sure my padding is correct for both cases. Has anyone else seen this or is it just me?
-
- Posts: 60
- Joined: Wed Jul 06, 2005 7:03 pm
I thought the 'optimal' was 8-12 bytes (here : http://forums.ps2dev.org/viewtopic.php?t=3506 but I know you knew that already).
Not seen an issue with a minimum size though. I have had work fine for me, and even
Perhaps it has something to do with the inclusion of the texture fields?
Not seen an issue with a minimum size though. I have had
Code: Select all
GU_VERTEX_16BIT|GU_TRANSFORM_3D
Code: Select all
GU_VERTEX_8BIT|GU_TRANSFORM_3D
-
- Posts: 75
- Joined: Mon Sep 19, 2005 5:41 am
Yes, that is set in my loop. The problem is not that it draws it with the wrong color, but rather it just draws "all messed up" if I only send UV(16b), XYZ(16b). I am ok becasue I just send along color and it is just a little slower.
This may seem like a tiny detail, but I am fighting to get to 60 fps. Coming into the Game Developers Conference I was running at 32 fps, and since then I have been able to scratch and claw my way to 51 fps so every single bit and byte is important. Unfortuanty with vsync on 51 fps looks just like 30 fps :(
Thanks for the suggestion anyway
This may seem like a tiny detail, but I am fighting to get to 60 fps. Coming into the Game Developers Conference I was running at 32 fps, and since then I have been able to scratch and claw my way to 51 fps so every single bit and byte is important. Unfortuanty with vsync on 51 fps looks just like 30 fps :(
Thanks for the suggestion anyway
-
- Posts: 75
- Joined: Mon Sep 19, 2005 5:41 am
This is around 15k triangles and 20+ textures, plus a skin animated character that is around 2000 triangles. I export my geometry from 3DStudioMax as pre-formated vertex arrays so all I do is point to the list in memory and call drawArray().
I am using triangles, not triangle strips and I am starting to think that I will need to convert to triangle strips in order to get to the next level. It's not rocket science, but it sure is much easier to just emit a list of triangles :)
I am using triangles, not triangle strips and I am starting to think that I will need to convert to triangle strips in order to get to the next level. It's not rocket science, but it sure is much easier to just emit a list of triangles :)
excellent !
i'm very far of your perf ! but like you i read my own format directly pre formated from my maya tool importer
see my post where i try to optimise a very simple cube modified sample
http://forums.ps2dev.org/viewtopic.php?t=5469
do you see anything bad in this code ??
thanks in advance !!
[/url]
i'm very far of your perf ! but like you i read my own format directly pre formated from my maya tool importer
see my post where i try to optimise a very simple cube modified sample
http://forums.ps2dev.org/viewtopic.php?t=5469
do you see anything bad in this code ??
thanks in advance !!
[/url]
-
- Posts: 60
- Joined: Wed Jul 06, 2005 7:03 pm
Not sure if you do it already (I'm pretty sure you would have at least tried, so I'm not trying to teach you to suck eggs or anything), but have you tried using a verticies index array? That way the memory footprint can be much lower, but I'm not sure of the impact on the speed/fps. (If you have, I'd like to know what kind of effect it had).starman2049 wrote:This is around 15k triangles and 20+ textures, plus a skin animated character that is around 2000 triangles. I export my geometry from 3DStudioMax as pre-formated vertex arrays so all I do is point to the list in memory and call drawArray().
I am using triangles, not triangle strips and I am starting to think that I will need to convert to triangle strips in order to get to the next level. It's not rocket science, but it sure is much easier to just emit a list of triangles :)
Does your 3DSMax exporter allow for another array export for a verticies index array? At the moment I use code to import from the 3ds format, rather than using an exporter from 3DSMax... I will have to re-think that as your way sounds much better, even if I use a seperate off-line conversion step to just translate the files to reduce load time.
Good luck at GDC. Where will you be for the most time? I will hopefully be able to get a glance at your game (all depends on my house move if I get to go or not this year).
EDIT - Ah! I just realised you mean a different GDC to me. I go to one in Europe, not the US. As I re-read the thread I realsied you'd already been and got quite confused!
Last edited by white rabbit on Wed Apr 19, 2006 6:04 pm, edited 1 time in total.
-
- Posts: 75
- Joined: Mon Sep 19, 2005 5:41 am
I haven't tried indexed vertex arrays. I didn't consider that, I remember reading somewhere on the forums (I think it was CHP) that this was slower.
Anyway I found a HUGE boost. I switched from 32bit draw/render/zbuffer to 16 bit and now I have a ton more memory so I can preload all my textures into VRAM at level init. Now I am running at 82 fps!! I was worried about the look with 16 bit rendering, but with a good dither matrix the smaller resolution on the PSP, and the LCD display I can barely tell a difference. Booyah!!
This may or may not work for you depending on your game, but in my game I make heavy use of organic textures and it seems to work nicely!!
BTW, my exporter chain exports direclty to binary vertex arrays that are loaded into memalign() memory and referenced directly with DrawArray() - all of my processing is off-line. Of course things like particle effetcs, skin animated characters, and HUD are done at runtime.
Anyway I found a HUGE boost. I switched from 32bit draw/render/zbuffer to 16 bit and now I have a ton more memory so I can preload all my textures into VRAM at level init. Now I am running at 82 fps!! I was worried about the look with 16 bit rendering, but with a good dither matrix the smaller resolution on the PSP, and the LCD display I can barely tell a difference. Booyah!!
This may or may not work for you depending on your game, but in my game I make heavy use of organic textures and it seems to work nicely!!
BTW, my exporter chain exports direclty to binary vertex arrays that are loaded into memalign() memory and referenced directly with DrawArray() - all of my processing is off-line. Of course things like particle effetcs, skin animated characters, and HUD are done at runtime.
-
- Posts: 60
- Joined: Wed Jul 06, 2005 7:03 pm
Wowzers! That's a big increase! I've genreally err'ed away from using the 16 bit buffers (except for z which I found is ok) for the quality I thought they would give.
Looks like I will have to re-think that if it makes that amount of difference.
What pixel-packing format do you use? I always find I have problems with 5650 / 5551 as I get confused over what I'm putting in - maybe I should just use a couple of macros to sort it out for me.
Glad you've got it running so fast!
Looks like I will have to re-think that if it makes that amount of difference.
What pixel-packing format do you use? I always find I have problems with 5650 / 5551 as I get confused over what I'm putting in - maybe I should just use a couple of macros to sort it out for me.
Glad you've got it running so fast!