first time kd back

(L) [2006/04/28] [_greenhybrid] [first time kd] Wayback!

[IMG #1 ]


It's the first time I am using a kd-tree. This shot was made using a naive implementation.


I improved performance using SAH. Using naive, this image costs 4.5 secs at 600x600 (btw there's a great bottleneck on converting the float colors [0..1] to integer colors [0..FFFF], that neck costs me 1/4 of rendering time, and it's in there due a "I'll fix it later"-problem )

Using SAH, I [ironic]proudly[/ironic] pushed it to 4.2 seconds,.... [SMILEY Sad]


And even worse, when I try to find the optimal splitting axis, it totally f**** up.


I'm gonna write a little kd-tree-visualizer to get better analysis; showing me where the leafs are, which axis a node uses, which cost it would have had on the other axii....heh, I'm a bit sad.


Some data on the scene: the floor's made of 100*100*2 tris, the pyramide-things are made of 8 tris, the wall in the back is made out of 10*25*2 tris, so totally there's a count of, ...., emmm, 20524 triangles I think. Don't forget the three simple point lights.


Using no lights I get 1 FPS. There's no use of SIMD.



btw dear tbp, when will my account be activated?
[IMG #1]:Not scraped: https://web.archive.org/web/20061004012942im_/http://www.root-engine.net/greenhybrid/images/glass_log_0024.jpg
(L) [2006/04/28] [Ho Ho] [first time kd] Wayback!

Nice picture [SMILEY Smile]


As for the SAH implementation, have you taken a look at some of the code about the subject that has been posted here around the forum?
(L) [2006/04/28] [Phantom] [first time kd] Wayback!

Nice! Btw, 1fps is not so bad for a first try, considering the amount of polygons and lack of SIMD tracing. What's your rig?

I'll also activate your account right away. Welcome to the forum!
_________________
--------------------------------------------------------------

Whatever
(L) [2006/04/28] [Phantom] [first time kd] Wayback!

As far as I can see, your account already has been activated?
_________________
--------------------------------------------------------------

Whatever
(L) [2006/04/28] [Guest] [first time kd] Wayback!

thx in forward, hmm, when I try to login, I get "name incorrect, account inactive or somewhat" or something like that.

When I try to push "I forgot my password" I get that error message, too [SMILEY Sad]

Maybe you can clear my account and I re-register?
(L) [2006/04/28] [Phantom] [first time kd] Wayback!

Not neccessary, I activated your account (finally found the toggle). Enjoy.
_________________
--------------------------------------------------------------

Whatever
(L) [2006/04/28] [greenhybrid] [first time kd] Wayback!

big thx mr. bikker!
_________________
[LINK http://greenhybrid.net/] | [LINK mailto:root@greenhybrid.net root@greenhybrid.net]
(L) [2006/04/28] [tbp] [first time kd] Wayback!

Gratz,


if you're sure you have bottleneck at that conversion point, i can post some SSE code to do that (in fact i posted it a long while ago on the pixel toaster board if i remember). But i really doubt it's such a hotspot.
(L) [2006/04/28] [tbp] [first time kd] Wayback!

May not compile right out of the box but should give you something to play with.

I've adapted it to be as general as possible regarding your rgb layout; tweak shifts if necessary.
(L) [2006/04/28] [greenhybrid] [first time kd] Wayback!

thank you tbp, but it's truly just because of that "no, not know, I wanna do something else right now" hehe

At the moment I'm coding maximum 5-10hrs a week, a lot of time is spended reading papers and getting knowledge.


So, does someone know good tutorials about SSE. I know, ...what the....?!, ah that forecast-fox is cool, telling me it's 10 degrees out there, argh back to topic, I know how to use MMX using __inline asm, but never used SIMD from within C itself, what do I have to know about it? Where do I get that __mmxx stuff (intel?), I got the feeling rasterizing for the last few years made me ignorant....or it's just that having no intahweb the last years....or how about cache optimizing using for example the 3d-now! prefetch, I never found good stuff about that


I know, I should google it, but some of the best articles in the web about coding are on the 6th or 14th page when googling for it, so the possibility for finding good ones is low. And you guys seem to have a large pot of expirience.




EDIT: I thought about ignoring floats for colors and use fixed point colors instead, would that be a good idea (sure it will for MMX, but for float-SIMD instructions?)
_________________
[LINK http://greenhybrid.net/] | [LINK mailto:root@greenhybrid.net root@greenhybrid.net]

back