Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Dracos on September 30, 2003, 12:04:31 am

Title: Is there any demand for this...
Post by: Dracos on September 30, 2003, 12:04:31 am
Is anybody interested in a DirectX9 renderer?  I've already taken the liberty of pulling the cvs and porting the DX8 renderer on my system.  There isn't any noticable framerate improvements, but I thought it might be fun to do. (And it was, heh.)

Anyway, if anybody's interested, let me know.   Also, I'd like to know how to go about becoming part of the SCP team.  I'm not the greatest coder in the world, but I've been doing it as a hobbyist for about 5 years and Volition's games have been my favorites for years.

(*Braces for beaming*) Oh... and this is only my second post here, so be gentle. heh.
Title: Is there any demand for this...
Post by: ChronoReverse on September 30, 2003, 01:43:42 am
I don't know where the beam is placed so I'll let the next guy do that.  Since you seem to know D3D, HELP WITH HT&L!!!
Title: Is there any demand for this...
Post by: WMCoolmon on September 30, 2003, 01:52:34 am
(http://members.cox.net/~wmcoolmon/images/welcome.gif) :D
Title: Is there any demand for this...
Post by: Dracos on September 30, 2003, 01:56:02 am
Heh.. Sure, I'll help wherever I'm needed.  Just let me know where to sign...  And thanks for the "warm" welcome.
Title: Is there any demand for this...
Post by: Bobboau on September 30, 2003, 07:22:46 am
well if you've done it, I don't see why we shouldn't use it, the HLSL should be a good enough reason for use to swich.
Title: Is there any demand for this...
Post by: Drew on September 30, 2003, 07:43:32 am
bob, do you know were i can find documentation on what DX8 and DX9 do exactly?


(oh, and i never got the beam, so im just gonna welcome myself ok ;D) (http://members.cox.net/~wmcoolmon/images/welcome.gif)
Title: Is there any demand for this...
Post by: Dracos on September 30, 2003, 08:49:29 am
Well bugger.   The way I converted the code the last time was to edit the existing DirectX8 code and replace variables / functions with their DirectX9 equivalants.  After deciding to re-add support for DirectX 8, I ended up breaking stuff, so I'm gonna pull a fresh source tree and start again.  It's gonna take me a day or so to work out, but I'll keep everybody posted.
Title: Is there any demand for this...
Post by: diamondgeezer on September 30, 2003, 09:54:34 am
Er... non-coder posting here, but wouldn't DX9 mean risking breaking stuff for (apparently) little gain?
Title: Is there any demand for this...
Post by: Dracos on September 30, 2003, 11:08:31 am
Possibly, but I'm not removing the current DirectX8 support, just adding DirectX 9 support in addition.  That way, features that are already working should remain untouched.
Title: Is there any demand for this...
Post by: Drew on September 30, 2003, 11:10:41 am
and what exacltaly will DX9 support do?
there havnt been any additions to the SCP that need DX9 yet....
Title: Is there any demand for this...
Post by: Nico on September 30, 2003, 11:24:37 am
but there might be. it's done, so why *****ing?
Title: Is there any demand for this...
Post by: diamondgeezer on September 30, 2003, 01:55:12 pm
We're really, really worried about breakage. Despite the safety precautions.
Title: Is there any demand for this...
Post by: Nico on September 30, 2003, 02:25:02 pm
there will be no breakage of any sort if you don't selt DX9 in the menu, will it?
geez... ( no pun intented )

ah well, why do I post about that, I don't even care :doubt:
Title: Is there any demand for this...
Post by: diamondgeezer on September 30, 2003, 02:25:55 pm
Evidently I didn't emphasize enough just how concerned about breakage we are...
Title: Is there any demand for this...
Post by: Goober5000 on September 30, 2003, 02:34:52 pm
DX5 to DX8 was a major improvement, but came at great cost and with a great deal of mess.  We're still picking up the loose ends.

DX8 to DX9 would be only a marginal improvement.  At this time, the potential cost outweighs the potential benefits.
Title: Is there any demand for this...
Post by: Bobboau on September 30, 2003, 08:35:15 pm
I realy would actualy like the HLSL of DX9 if posable, most of the changes are mearly changing a whole bunch of 8s to 9s,
if you'r going to keep DX8 suport, try and do it in a way that we won't need to maintain two nearly identical API abstraction layers
Title: Is there any demand for this...
Post by: Sticks on October 01, 2003, 01:28:59 pm
We could also use the harware auto mipmap generation of DX9, hardware line drawing also, and yeah, HLSL would own.
Title: Is there any demand for this...
Post by: J3Vr6 on October 01, 2003, 03:21:18 pm
What's HLSL?
Title: Is there any demand for this...
Post by: Unknown Target on October 01, 2003, 03:33:26 pm
Getting DX9 now would mean we could add all the fancy stuff (further down the road) that new games have later, without waiting for the new DX9 engine to be coded.

"Gimme" I say, "Gimme" :D :yes:
Title: Is there any demand for this...
Post by: kasperl on October 01, 2003, 03:34:22 pm
so we would out own games not even in store yet?
am i reading this right?
Title: Is there any demand for this...
Post by: Unknown Target on October 01, 2003, 03:39:16 pm
Ummm....well...uhh...I don't think we could ever get to, say, Half Life 2 or Doom 3 level, but, yea, we could probably beat out some of the games out there, in terms of graphical quality (Freelancer being the first to go :D)
Title: Is there any demand for this...
Post by: Sticks on October 01, 2003, 05:02:32 pm
HLSL stands for High Level Shader Language, and is a higher level language used to code vertex and pixel shaders for a graphics engine.

EDIT: What I'd really like to do is gut the entire rendering engine, keep the physics stuff, and port the whole thing to a new engine.;7
Title: Is there any demand for this...
Post by: Dracos on October 02, 2003, 02:11:06 am
Quote
EDIT: What I'd really like to do is gut the entire rendering engine, keep the physics stuff, and port the whole thing to a new engine.

Well, if you guys want to go that route, I can re-design the renderer from the ground up with more of an object-oriented approach. Something like an IRenderer interface base class which is derived into child classes like an IDirectX9Renderer or IOpenGLRenderer.  We could even load those from an external DLL if you really wanted to push it, but that's more of a major undertaking though, and I really wouldn't want to risk that much of a change with the state of the codebase as it is (Killer, sick... You guys have done a great job).

And yes, porting from 8 to 9 is almost as simple of changing 8s to 9s and calls to SetVertexShader(SOME_FVF) to SetVertexShader(NULL); SetFVF(SOME_FVF); (Not to mention sampler states...)  Just really simple function equavilants.

Pretty simple actually.  And there are a lot of improvements from DirectX8 to 9 namely the HLSL which would give access to some sick effects.  It really doesn't matter to me though, I'm just a guy that's a bit bored and loves coding and FS2....  Just let me know what you guys want to see (or not see), and I'll see if I can do it (or not).
Title: Is there any demand for this...
Post by: Drew on October 02, 2003, 06:49:43 am
Quote
Originally posted by Sticks
We could also use the harware auto mipmap generation of DX9, hardware line drawing also, and yeah, HLSL would own.

harware auto mipmap generation of DX9

wouldnt that help you with your OX effect sticks?

and i heard somwere that DX9 has awesome antialiasing support........

BTW: dont you think this should be stickified?
Title: Is there any demand for this...
Post by: Setekh on October 02, 2003, 07:36:41 am
Well, virtually this entire conversation (save some stuff about shaders) is sailing over my head, but welcome to HLP, Dracos. :)
Title: Is there any demand for this...
Post by: deep_eyes on October 02, 2003, 08:18:13 am
Quote
Originally posted by Unknown Target
Ummm....well...uhh...I don't think we could ever get to, say, Half Life 2 or Doom 3 level, but, yea, we could probably beat out some of the games out there, in terms of graphical quality (Freelancer being the first to go :D)


Ahh yes... the Heratics swore freelancer was the best looking best sci-fi space sim.... where are they now? The heratics are burning in the bright ambers of a true space sim... freelancers own "revolutionary" aspects only helped to bury it...

the third comming of Freespace is on the horizonz! BURN HERATICS BURN!


**now runs into a corner and begins Redbull+Bosch Beer withdrawl symptoms.... braaaa~~ braaa~~ grewlll..~~~~**

:p
Title: Is there any demand for this...
Post by: Falcon on October 03, 2003, 06:11:02 pm
Freelancer awful me sick of Freelancer me go out and set CD on fire!:devil::devil: :devil: :devil:
Title: Is there any demand for this...
Post by: Drew on October 03, 2003, 06:45:07 pm
huh? whats wrong about freelancer?
Title: Is there any demand for this...
Post by: IceFire on October 03, 2003, 07:42:48 pm
Its not terribly well liked.  It was a good game, but it wasn't a hugely impressive space sim.  I did like it for what it was tho.  A space trading/combat game...more expansive than we've seen before.  But it had its flaws and the control scheme is definately not very ergonomic for me...I had to stop playing it.
Title: Is there any demand for this...
Post by: phreak on October 03, 2003, 07:45:15 pm
not to mention vanilla FS2 looked better, except for the nebulas
Title: Is there any demand for this...
Post by: mikhael on October 03, 2003, 08:24:15 pm
Quote
Originally posted by deep_eyes

Ahh yes... the Heratics swore freelancer was the best looking best sci-fi space sim.... where are they now? The heratics are burning in the bright ambers of a true space sim... freelancers own "revolutionary" aspects only helped to bury it..


Bah. Iwar2 is the best looking space sim to date. Freespace comes in second tied with Tachyon.

Yeah. I said  Freespace came in second. AND it tied with Tachyon.
Title: Is there any demand for this...
Post by: terren on October 04, 2003, 03:29:03 am
Quote
Originally posted by Dracos

Well, if you guys want to go that route, I can re-design the renderer from the ground up with more of an object-oriented approach. Something like an IRenderer interface base class which is derived into child classes like an IDirectX9Renderer or IOpenGLRenderer.  We could even load those from an external DLL if you really wanted to push it, but that's more of a major undertaking though, and I really wouldn't want to risk that much of a change with the state of the codebase as it is (Killer, sick... You guys have done a great job).
 


You can do this? More importantly, you Would do this??
All I can say is good luck with FS3.
Title: Is there any demand for this...
Post by: Dracos on October 05, 2003, 01:27:00 am
Yeah, it can be done, but not easily.  Currently, from what I've seen from the current source tree is that renderer functions are called via function pointers that are assigned during initialization.  Instead, if we have one global abstract class (for argument's sake, we'll call that IRenderer) it can be done something like this:

Code: [Select]

IRenderer *pRenderer = 0;

switch (something)
{
     case GR_OPENGL:
            pRenderer = new OpenGLRenderer(constructor args);
     break;

      ...
}


That's the easy part.  Actually interfacing this with the current rendering system would be murder. In fact, if I can browse through the code and learn a bit more about the current rendering system, I can start by wrapping some of the functions into a more OO approach and slowly start to merge the current renderers into separate classes.

If I start on something this big it would either be for my own purposes or if there is really a demand for this after all.  I am a bit uncomfortable with making changes of this magnitude to a working project like FS2 or FS2_open and it has already been voiced that people are worried about breakage.  That's why I say this may be a bit more than everybody wants (although it could vastly simplify expansion of the graphics later on.)

Heh... Once again, I need many more opinions before I butcher the code that has taken years to create, even if the end product is 100 times more powerful.
Title: Is there any demand for this...
Post by: terren on October 05, 2003, 03:22:05 am
well, you have my vote.
Title: Is there any demand for this...
Post by: Taristin on October 05, 2003, 09:20:13 am
Dunno if I want to have dx9 being used. Sure it'd look great, and run smoother for everyone...   else!

I tried benchmarking my PC for a DX9 game... I GOT 20 3D MARKS :hopping:
Title: Is there any demand for this...
Post by: Sticks on October 05, 2003, 01:38:02 pm
What card do you have?

Switching to DX9 doesn't mean that all the features of DX9 will be used, like advanced shaders, etc. 3DMark assumes that because you're benchmarking for DX9, you'd be utilizing all the features, which many cards don't support.

I'm up for this myself, if you'd like to give it a whirl Drac. A quick conversion shouldn't be too hard if we just copy all the render functions to thier OO based equivalents.

It sure would make it easier to run through things and optimize. Especially since we'd be forced to wade through it all.
Title: Is there any demand for this...
Post by: Taristin on October 05, 2003, 01:43:04 pm
I have a Geforce 2 Mx/mx 400
Title: Is there any demand for this...
Post by: Sticks on October 05, 2003, 02:00:17 pm
That'll do it.

The benchmark probably did tons of stuff in software because your card didn't support it. The stuff in 3DMark is really advanced, we'd be doing nothing even close, at the start.

And once shaders were implemented, it'd be an option.

I can't imagine it would be any slower than the current system.
Title: Is there any demand for this...
Post by: Taristin on October 05, 2003, 03:55:48 pm
... I can't look at capships with the current system...
Title: Is there any demand for this...
Post by: Sticks on October 05, 2003, 06:06:51 pm
What version?
Title: Is there any demand for this...
Post by: Taristin on October 05, 2003, 08:19:59 pm
The latest, 3.5.5   And with Kazan's Internet build (now obsoleted)...  


What I mean by 'can't look at capships' is the framerate drops so low that I find myself oversteering during the lag period, and cannot target anything, move smoothly, etc, when a capship is in my FOV...
Title: Is there any demand for this...
Post by: Sticks on October 05, 2003, 09:51:52 pm
My guess is that you have a fairly low speed processor, yeah?
Title: Is there any demand for this...
Post by: Taristin on October 05, 2003, 09:57:06 pm
AMD Duron 600 Mhz. :(
Title: Is there any demand for this...
Post by: Sticks on October 05, 2003, 10:08:37 pm
Have you tried an HT&L build? I wondering if that would help out at all.
Title: Is there any demand for this...
Post by: Bobboau on October 05, 2003, 10:32:02 pm
he might if someone would post a copy
Title: Is there any demand for this...
Post by: Sticks on October 05, 2003, 10:38:37 pm
Didn't you have one up Bob?
Title: Is there any demand for this...
Post by: Bobboau on October 05, 2003, 10:46:34 pm
no I have a corupt lib and any relese build I make of any SCP version locks up when it closes, probly other things, I did just upload a recent build I made in the modding forum
Title: Is there any demand for this...
Post by: redmenace on October 06, 2003, 12:37:10 am
Quote
Originally posted by Raa Tor'h
AMD Duron 600 Mhz. :(

you can swing by pricewatch.com and get a 1.3 mhz duron for 34 bucks(assuming domestic) even for an international. I know you might not have the money but it is rather cheap and easy.
Title: Is there any demand for this...
Post by: Ulala on October 06, 2003, 12:40:51 am
Okay, so I know jack squat about programming, save for being able to make Visual Basic 6.0 throw a "HELLO THERE" message box in your face, but couldn't you just try the dx8-dx9 conversion, and if for whatever reason there's some sort of breakage somewhere, don't you have plenty of previous versions to fall back on? If all you're changing is dx8 to dx9 and it doesn't work out, can't you just fall back on 3.5.5 which is still dx8 anyway?
Title: Is there any demand for this...
Post by: Goober5000 on October 06, 2003, 01:34:09 am
Yes, but that misses the point.  First of all, reverting to an earlier version is a complicated and annoying process.  Second of all, you can't "just try" the DX8-DX9 conversion.  It would involve a sizeable amount of research and coding, something that we're not willing to invest that much work in for so little return.
Title: Is there any demand for this...
Post by: Ulala on October 07, 2003, 01:55:46 am
Oh. Makes sense. :nod:
Title: Is there any demand for this...
Post by: Raven2001 on October 07, 2003, 04:14:45 pm
so little return?!?!?! Imagine the possibilities it would open!! I f he says he can do it, why not giving it a shot???

Draco, my vote is go for it!!
Title: Is there any demand for this...
Post by: aldo_14 on October 07, 2003, 04:17:15 pm
Quote
Originally posted by Setekh
Well, virtually this entire conversation (save some stuff about shaders) is sailing over my head, but welcome to HLP, Dracos. :)


Yeah, me too.... and I'm suppossed to have a degree in computing!
Title: Is there any demand for this...
Post by: Drew on October 07, 2003, 05:30:18 pm
if draco wants to do it, why not? it be an overall improvement
Title: my unresanable demands
Post by: terren on October 08, 2003, 03:31:27 am
I think I missread the subject for this thread, sorry.

[mentoc voice]I DEMAND THIS![/mentoc voice]

Was that more what you were looking for?
Title: Is there any demand for this...
Post by: Dracos on October 08, 2003, 03:46:09 am
Quote
[mentoc voice]I DEMAND THIS![/mentoc voice]


ROFL!!!

Seriously though, considering everything the SCP went through with the DirectX 8 merge, I doubt anything like this would be high on the "to-do" list.  It was, after all, just a thought. Doesn't really matter though, if you guys keep doing what you do FS2 will live on for years to come.

However, I'm fully ready and willing to help anywhere else I may be needed, and if the time comes to re-design the renderer or even just update the API just let me know.
Title: Is there any demand for this...
Post by: terren on October 09, 2003, 04:04:04 am
it's nice that some one finaly apricates my somewhat twisted sence of humor.