Page 3 of 6

Re: The amazing triangle drawer!

Posted: Sun Nov 06, 2016 22:28
by dpJudas
What is the difference between normal BSP nodes and GL BSP nodes? Right now the problem with removing shearing is that all the current clipping is based on always being axis aligned.

Rendering models will probably be the best use case for the triangle drawer. Maybe with luck Eruanna will feel inspired to add this once the triangle drawer is ready. :)

Re: The amazing triangle drawer!

Posted: Sun Nov 06, 2016 23:21
by Graf Zahl
GL nodes contain closed subsectors so that they can be drawn with a polygonal renderer. Normal nodes contain open subsectors where only the parts that belong to a linedef contain actual segs. For software rendering that is enough but a hardware renderer needs the added info, the textured automap, too.

Re: The amazing triangle drawer!

Posted: Sun Nov 06, 2016 23:48
by dpJudas
This info is needed to draw the floor and ceiling, right? Or is there more to it?

Re: The amazing triangle drawer!

Posted: Mon Nov 07, 2016 0:06
by Graf Zahl
No. GZDoom also uses it to traverse subsectors for dynamic lights but that can be done differently if required.

Re: The amazing triangle drawer!

Posted: Mon Nov 07, 2016 0:14
by dpJudas
Thanks for the info. Looking at the code I can see that zdoom already generates them on the fly if the renderer's RequireGLNodes() returns true. That's nice to know. :)

Re: The amazing triangle drawer!

Posted: Mon Nov 07, 2016 0:29
by Rachael
Eruanna wrote: I don't know what my week looks like, this week
On this little topic, I have absolutely no hope to have adequate time to sit down and do this for the next two months. Some people don't have *ANY* clue what you mean when you tell them "respect my time" - they refuse to do it and put you on their schedule. That being said, my schedule for the next two months is completely unpredictable. By that time, I don't know if I'll still have the motivation to do this. :( Though I may pick it up again, time will tell...

Re: The amazing triangle drawer!

Posted: Mon Nov 07, 2016 3:54
by dpJudas
No worries, there's no obligation to do any of this. It is just a hobby. My triangle stuff is mostly just toying around anyway - might never amount to a pull request in the long run. We'll see. :)

Re: The amazing triangle drawer!

Posted: Mon Nov 07, 2016 10:25
by Rachael
Amazing indeed. I saw what you just did there. :D

I am impressed. XD >_>

Re: The amazing triangle drawer!

Posted: Mon Nov 07, 2016 11:01
by dpJudas
Haha, I'm assuming you're referring to my latest commit. I didn't plan that post to align so nicely with the commit, I promise. :D

Re: The amazing triangle drawer!

Posted: Tue Nov 08, 2016 3:14
by Talon1024
Is this triangle drawer going to be used to draw walls and flats to make true freelook a thing for the software renderer?

Re: The amazing triangle drawer!

Posted: Tue Nov 08, 2016 4:03
by Rachael
I am amazed with what I see so far. :)

Re: The amazing triangle drawer!

Posted: Tue Nov 08, 2016 6:14
by dpJudas
Thanks. :) It is a shame that clipping bug in the triangle drawer makes those hall of mirrors. If that bug wasn't there I'd have made some screenshots. :D

@Talon1024: toying with it at the moment actually, but a fully featured version is a lot of work. Mostly just for fun right now. :)

Re: The amazing triangle drawer!

Posted: Tue Nov 08, 2016 6:25
by Rachael
I've been trying to search the code for the freelook limits but haven't had any luck. If I knew where to look, though, I'd have that turned off so you can get full 90-to-90 up and down.

There's always someplace one can look, though - am trying to search that now. :)

Re: The amazing triangle drawer!

Posted: Tue Nov 08, 2016 6:30
by dpJudas
It must be there somewhere, since GZDoom activates it. :) Maybe it is controlled by vid_renderer, directly, or indirectly via FRenderer. Just guessing tho.

I really really need to find that clipping bug. It will probably just get even worse if you look straight into the ceiling!

Re: The amazing triangle drawer!

Posted: Tue Nov 08, 2016 6:33
by Rachael
It appears to be a class function "GetMaxViewPitch" - if I can hack that for the software renderer, then it should finally be possible to have full pitch control. :)

I'll toy around with this while you tackle the clipping bug. Hope to have this done for you quickly. :)