| View previous topic :: View next topic |
| Author |
Message |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Tue Apr 11, 2006 9:09 am Post subject: 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? |
|
| Back to top |
|
 |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Tue Apr 11, 2006 6:00 pm Post subject: |
|
|
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 | Code: | | GU_VERTEX_16BIT|GU_TRANSFORM_3D | work fine for me, and even | Code: | | GU_VERTEX_8BIT|GU_TRANSFORM_3D |
Perhaps it has something to do with the inclusion of the texture fields? |
|
| Back to top |
|
 |
memon
Joined: 03 Oct 2005 Posts: 63
|
Posted: Tue Apr 11, 2006 6:04 pm Post subject: |
|
|
| I ran into the same problem too. I had to specify the color or otherwise there was nothing drawn at all. Maybe the GU_TRANSFORM_3D requires a normal or color set to work correctly? I think I did not try position only data. My SDK is quite old too, maybe something has changed. |
|
| Back to top |
|
 |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Thu Apr 13, 2006 11:29 pm Post subject: |
|
|
Bumped...
Any joy fixing this? |
|
| Back to top |
|
 |
subbie
Joined: 05 May 2005 Posts: 122
|
Posted: Thu Apr 13, 2006 11:46 pm Post subject: |
|
|
| Have you maybe tried specifiying a defualt color via sceGuColor( 32bit color ); ? |
|
| Back to top |
|
 |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Fri Apr 14, 2006 10:17 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
zoret
Joined: 19 Mar 2006 Posts: 22
|
Posted: Sat Apr 15, 2006 8:30 am Post subject: |
|
|
hi starman
that's interesting the good fps you obtain
how many vertices can you display ?
are you using pre generetad command list ?
thanks |
|
| Back to top |
|
 |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Sat Apr 15, 2006 9:29 am Post subject: |
|
|
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 :) |
|
| Back to top |
|
 |
zoret
Joined: 19 Mar 2006 Posts: 22
|
Posted: Sat Apr 15, 2006 10:02 am Post subject: |
|
|
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] |
|
| Back to top |
|
 |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Mon Apr 17, 2006 2:01 am Post subject: |
|
|
| 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 :) |
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).
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 |
|
| Back to top |
|
 |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Mon Apr 17, 2006 4:06 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Tue Apr 18, 2006 9:06 pm Post subject: |
|
|
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! |
|
| Back to top |
|
 |
|