ShootersForever.com Forum Index

GoldenEye 007 Nintendo 64 Community, GoldenEye X, Nintendo 64 Games Discussion
GoldenEye Cheats, GoldenEye X Codes, Tips, Help, Nintendo 64 Gaming Community


Triangulation Benchmark
Goto page 1, 2  Next
 
Post new topic   Reply to topic    ShootersForever.com Forum Index -> Mapping and Modelling
View previous topic :: View next topic  
pavarini
00 Agent
00 Agent


Joined: 07 May 2015
Posts: 479

 PostPosted: Mon Apr 30, 2018 3:13 pm    Post subject: Triangulation Benchmark Reply with quote Back to top

Hi, I did a test of different triangulation to see what is the fastest way to render a room. I've seen people say zigzag triangles are faster to rasterize on other platforms. The only thing I found on this topic was http://www.humus.name/index.php?page=News&ID=228 but it isn't about the N64 so I am not sure if it is applicable.

So I made 4 models like the site above.


I placed 39 copies of this model in a empty level with 8 BG polygons, and placed the player spawn directly in front of the objects. I then enabled debug stats and tested each model. You can read more about the debug speed here, thanks to Trevor. Here are the results (tested on console).



Command count



Last edited by pavarini on Fri May 04, 2018 4:51 pm; edited 6 times in total
 
View user's profile Send private message
Sogun
General
General


Joined: 15 Dec 2010
Posts: 659
Location: Valencia, Spain

 PostPosted: Wed May 02, 2018 11:18 am    Post subject: Reply with quote Back to top

It's quite surprinsing indeed, that the figure with the most triangles will render faster. I guess those were ordinary textured triangles, with no shading.
I wonder if adding shading will make a difference (like shade half of the exterior vertices and leave the one in the center for the fan triangulation.

What do UTX, RSP and TEX mean and how are they supposed to affect performance? Just a brief description will be nice.


As for aesthetics I would always recommend the fan triangulation because it let's you simulate some kind of ambient occlusion with shading.
And I wouldn't recommend the max area approach because very large triangles do weird things with fog.
Zig zag might limit you with texture UVs.


Also, I wonder if this 'shell' figure would have different numbers. I think it will perform similar than zigzag, but you never know.


Last edited by Sogun on Wed May 02, 2018 2:58 pm; edited 1 time in total
 
View user's profile Send private message Visit poster's website
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6118

 PostPosted: Wed May 02, 2018 11:47 am    Post subject: Reply with quote Back to top

Maybe a shared vertex makes a big difference? Also, how big were displaylists and ge file vertices in each attempt.
 
View user's profile Send private message
pavarini
00 Agent
00 Agent


Joined: 07 May 2015
Posts: 479

 PostPosted: Wed May 02, 2018 12:07 pm    Post subject: Reply with quote Back to top

The model was given a single texture, with a generic projection. Shading was fullbright. Unfortunately I don't have the model file anymore as I overwrote the ROM with another test, so I don't know how large the models were.

I can do the benchmark again with the shell this time. I also clicked 'group primary triangles' for each model, do you think this had something to do with the results?
 
View user's profile Send private message
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6118

 PostPosted: Wed May 02, 2018 1:09 pm    Post subject: Reply with quote Back to top

It's more about what the final results looked like (how many triangles, how big displaylist, how many vertices, etc). The group primaries will help optimize the files.
 
View user's profile Send private message
pavarini
00 Agent
00 Agent


Joined: 07 May 2015
Posts: 479

 PostPosted: Wed May 02, 2018 3:49 pm    Post subject: Reply with quote Back to top

I redid the benchmark with the shell design and with a higher polycount. Turns out max area is the fastest design.
 
View user's profile Send private message
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6118

 PostPosted: Wed May 02, 2018 3:54 pm    Post subject: Reply with quote Back to top

pavarini wrote:
I redid the benchmark with the shell design and with a higher polycount. Turns out max area is the fastest design.


I'm curious how editor turned out though. Because # triangles may not equate to the same amount after optimizations. It could just be lowest tri count (most shared vertices).
 
View user's profile Send private message
pavarini
00 Agent
00 Agent


Joined: 07 May 2015
Posts: 479

 PostPosted: Wed May 02, 2018 5:50 pm    Post subject: Reply with quote Back to top

Here are the filesizes for each model's template
Fan: 3.69 KB
Shell: 3.64 KB
ZigZag: 4.41 KB
Max Area: 3.98 KB

And the summary for each model from the editor
Fan Shell ZigZag Max Area

I think the biggest takeaway is to share as many vertices as possible, as the editor can group them more effectively.
 
View user's profile Send private message
Trevor
007
007


Joined: 15 Jan 2010
Posts: 926
Location: UK, Friockheim OS:Win11-Dev PerfectGold:Latest

 PostPosted: Fri May 04, 2018 4:03 pm    Post subject: Reply with quote Back to top

pavarini, you didn't post the command count...

oh well, wait, you still have to jump through some hoops, but under "visual" there is "Calculate DisplayList Size"
it will ask for roompositions (though ive asked before why this is and cant remember answer or if possible to skip this part) and then show a print of

Vtx : 138
Tri : 2
Tri4 : 11
GeometryMode : 1
Rendermode : 1
etc...

Trev
_________________
 
View user's profile Send private message
pavarini
00 Agent
00 Agent


Joined: 07 May 2015
Posts: 479

 PostPosted: Fri May 04, 2018 4:32 pm    Post subject: Reply with quote Back to top

Aak, sorry about that! Embarassed I've updated the first post with the extra information.
 
View user's profile Send private message
Wreck
Administrator
Administrator


Joined: 14 Dec 2005
Posts: 7197
Location: Ontario, Canada

 PostPosted: Fri May 04, 2018 5:15 pm    Post subject: Reply with quote Back to top

I don't want to get off track, though this is related to optimization of background files. I began updating the Storage Facility map, made by GERage, since it had serious slowdown issues on console, and I believed it had potential as a multiplayer level. I used the Visual Editor to delete polygons, and adjust others. Such as reducing a wall from six tris to only two. However, the vertice files are still big (outside area is huge). Is there any easy way for the Editor to optimize the files, while not causing any issues with the current polygons and texturing? If so, what is recommended?
 
View user's profile Send private message Visit poster's website
pavarini
00 Agent
00 Agent


Joined: 07 May 2015
Posts: 479

 PostPosted: Fri May 04, 2018 5:23 pm    Post subject: Reply with quote Back to top

My process is to group primary triangles, then reorder all triangles for transparency/topflag/alpha. You could try doing that and see if it helps performance.

For those who would like to use the debug speed easily on console, I've made a patch which will replace no radar [multi] with the display debug speed stats. https://files.catbox.moe/p9vz7u.zip
 
View user's profile Send private message
Entropy Soldier
Secret Agent
Secret Agent


Joined: 13 Feb 2009
Posts: 263
Location: GE:S

 PostPosted: Sun May 06, 2018 11:46 am    Post subject: Reply with quote Back to top

If that doesn't work you could try your luck with Blender.

-Apply the Decimate modifier using Planar mode with a 1 degree threshold. (Be sure to delimit UVs otherwise they'll get messed up)
-Apply the triangulate modifier to make all the n-gons triangles again.
-Select the entire mesh in edit mode (press the a key) and use the remove doubles operator on the left panel to fuse all vertices occupying the same coordinates. Depending on the complexity of the shading you may need to avoid fusing certain vertices that are meant to form the boundary of a hard shadow.


http://www.goldeneyevault.com/viewfile.php?id=350
(Or try the native FBX plugin if that format works better for you)

The editor seems to struggle with its own obj format when it comes to the fancier stuff like transparency and reflections, but I can't imagine such an old custom level uses anything like that.
 
View user's profile Send private message Visit poster's website
pavarini
00 Agent
00 Agent


Joined: 07 May 2015
Posts: 479

 PostPosted: Mon Jun 11, 2018 10:21 am    Post subject: Reply with quote Back to top

I've done another test, this time using max area. I was curious to see what speed increase non-textured primaries compared to textured primaries. I've set the disc to texture FFFF (untextured) and grouped primary triangles, along with another ROM with a color shaded disc. Here are the results.
Code:
Textured:
UTZ 68%
RSP 27%
TEX 5%
30 Hz (2 frames)

Untextured:
UTZ 46%
RSP 51%
TEX 3%
30 Hz (2 frames)

Untextured with color shading:
UTZ 46%
RSP 51%
TEX 3%
30 Hz (2 frames)

If the stats are to be trusted, by forgoing textures you get decrease of RSP utilization and increase of RSP stall. If you are unsure about the debug stats there is a helpful thread by trevor that goes more into this.

I did another test, this time comparing mipmap levels. Again I used the max area model but this time I set the mipmap level for the texture (0x0A89) to 1, and then disabled completely. Here are the results.
Code:
Mipmap level 6 (original):
UTZ 68%
RSP 27%
TEX 5%
30 Hz (2 frames)

Mipmap level 1:
UTZ 68%
RSP 27%
TEX 5%
30 Hz (2 frames)

No mipmaps:
UTZ 68%
RSP 27%
TEX 5%
30 Hz (2 frames)

There is no difference in performance when lowering or disabling mipmaps, which is good to confirm.

I then tested the difference between texture color palette, I compared the original 32x32 texture (198 colors), and a white 32x32 texture (1 color) using the same texture settings as the original.
Code:
Original:
UTZ 68%
RSP 27%
TEX 5%
30 Hz (2 frames)

Single color texture:
UTZ 67%
RSP 29%
TEX 4%
30 Hz (2 frames)


Another texture test, but this time comparing 8 bpp vs 4 bpp. I exported the original texture and imported as 4 bpp with the editor. Here are the results.
Code:
8 bpp (original):
UTZ 68%
RSP 27%
TEX 5%
30 Hz (2 frames)

4 bpp:
UTZ 74%
RSP 22%
TEX 4%
30 Hz (2 frames)
 
View user's profile Send private message
Trevor
007
007


Joined: 15 Jan 2010
Posts: 926
Location: UK, Friockheim OS:Win11-Dev PerfectGold:Latest

 PostPosted: Tue Jun 12, 2018 8:00 am    Post subject: Reply with quote Back to top

mip-mapping shouldn't affect rendertime, though it should affect tmem fill time.

Colours should make 0 difference (except for the texture size in bytes, the bigger the longer to load)

Textured and untextured also makes no difference unless you change cycle type to 1 cycle, however, as GE has to wait on other things it turns out it doesn't make much difference unless a triangle fills a large portion of the screen.

None of the other features should make any difference either, although if you force GE to drag at 1fps then you might start seeing some differences - that said, some features only affect high speed elements because they are not part of render stream...

What I mean is you have 2 bottlenecks within drawing the screen.
the RSP - Building dlists, filling tmem etc
the RDP - actually painting the Framebuffer, calculating z etc.

If the RSP is slow, them both are slow (RDP cant do anything without rsp info) but if the rdp is slow then it simply renders slow and the rsp fills with next frame before stalling waiting for rdp to catch up.

Trev
_________________
 
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ShootersForever.com Forum Index -> Mapping and Modelling All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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

Cobalt 2.0 BB theme/template by Jakob Persson.
Copyright © 2002-2004 Jakob Persson


Powered by BB © 01, 02 BB Group

 


Please Visit My Other Sites: GoldenEyeForever.com | GrandTheftAutoForever.com

Got kids? Check out my Dora The Explorer site with games and coloring pages!

Our forums feature Nintendo 64 games, GoldenEye 007 N64 New Maps and Missions, GoldenEye Cheats, N64 Emulator, Gameshark, GoldenEye Multiplayer and more!

[ Privacy Policy ]