RobertBeckebans / RBDOOM-3-BFG

Doom 3 BFG Edition source port with updated DX12 / Vulkan renderer and modern game engine features
https://www.moddb.com/mods/rbdoom-3-bfg
GNU General Public License v3.0
1.38k stars 247 forks source link

[Enhancement] Graphics improvement #145

Closed johnyukon closed 8 years ago

johnyukon commented 9 years ago

I see graphics are already being improved, we have better shadows now.

There are many mods created for DOOM 3 that may help in this task because they already have shaders and other stuff:

http://www.moddb.com/mods/sikkmod http://www.moddb.com/mods/perfected-doom-3-version-500 http://www.moddb.com/mods/parallax-mapping-mod-10 http://www.moddb.com/mods/g-t-x-d3 http://doom3.gamebanana.com/gamefiles/3756

There are probably many other mods around but I think that the most famous one is sikkmod. It comes with source code.

Also I don't know if this might help, but the Tesseract engine, based on cube 2 engine, implements some neat graphics effects, like real time global illumination:

http://tesseract.gg

I don't think graphics are the most important aspect of a game but it's needed to compete with proprietary engines and attract developers.

motorsep commented 9 years ago

For once, all those mods have ARB shaders. Doom 3 BFG needs Cg shaders and it has entirely different rendering pipeline, so directly porting ARB shader into Cg won't work.

Why would you think this engine needs to compete with, let's say Unity/UE4, and attract developers?

BielBdeLuna commented 9 years ago

it does, but not on the technical level.

kortemik commented 9 years ago

I think it should compete with UE4 or Unity as it's only decent gpl licensed engine out there. that's why the id software released it, to win the war against engine selling companies. no gamer would buy an engine but they definitely will buy the assets for nice experience. focusing only on doom3 is not going to give anything nice out.

i read that you are working with your own fork for steelstorm2, motorsep. that's cool, maybe i buy your game :)

but i have to also remind you about the gpl license when working with the said game, if one statically links against gpl code, one has to license the linked object also under gpl. so let's all work towards common goal here, please?

motorsep commented 9 years ago

@kortemik Yeah, I am well aware of GPL license as I already released one game using GPL engine on Steam. Just don't see what's there to link statically or dynamically to the engine - it's self contained engine and doesn't really need anything to be linked to it (I am not using any 3rd party libs that aren't GPL or comply with GPL).

Obviously you haven't dug BFG engine much - it has quite complex code base (although clean enough and understandable) and there aren't too many programmers out there with skills and time to put into this engine with no returns (it's quite hard to find skilled programmers for a paid position to work on GPL engine).

I personally planning on learning UE4's Blueprint, in case I will be having same issues I have now (namely finding programmer for BFG engine/gameplay code), and post-Phaeton (working title was Steel Storm 2) I am going to switch to UE4 most likely (maybe even for Phaeton's chapters past Chapter 1).

I do like this engine, and stood by GPL engines like Darkplaces and idtech 4 / Doom 3 BFG, but at the end of the day it hurts development a lot using these, when it's almost impossible to find contractors for these engines. 99.5% of artists / programmers / level designers refuse to work with these engines. .5% who use these engine work on their own hobby projects.

nbohr1more commented 9 years ago

If I recall correctly, BFG did have an ARB 2 fallback but I'm not sure any fork version uses it. That said, it is possible to covert ARB shaders to GLSL which is what BFG's primary render mode uses AFAIK.

Right now, there is a fork of RBDOOM-3-BFG which has glossmap support and rim lighting:

https://github.com/cs121/TECH4-BFG

so that's a start...

kortemik commented 9 years ago

@motorsep i personally see the problem as this: the current state of idTec4BFG is bit hard to comprehend for most of the gaming motivated programmers. However if we continue to work with it and release our findings publicly there will be more and more people with competence around it. ID didn't release too much of documentation for using it because either they do not have anything they could share or they did think that the sdk info at http://www.iddevnet.com/doom3/ would be sufficient enough. Their way of work has been quite different from majority of open source business as well as the code is more or less in form of "this is what our in-house is" so I don't wonder why there are no skilled people around it yet. Let's transform it into state of decent open source model and in no-time there will be skilled people.

I also read you had a good success around with SWF guis and revamped tools. Would you mind if I asked to put pull request for it? I am working around the header unwinding with assist of dhewgs code.

motorsep commented 9 years ago

@nbohr1more Did you look into his code? It seems bogus. I didn't find anything about rim lighting except cvars added. His gloss shader needs alpha channel in specular image. BFG has no alpha in its specular image because they are DXT1 compressed.

motorsep commented 9 years ago

@kortemik It's not idTech4BFG, it's Doom 3 BFG. "idTech X" didn't get assigned to it because it's not a new engine, and it's not an old engine.

It's not hard to comprehend if a programmer worked on other engines. It is hard to comprehend for out of college students who spent their time working with very basic OpenGL exercises and Unity engine (not to mention people having hard time with any of the idtech 4 engines, unless they modded Quake and other iD games).

With UE4 business model, there is no reason to use BFG. None. By the time UE4 is well rounded and polished, DX11 hardware will be prevalent on Steam. Therefore people don't want to work on BFG engine because they feel it doesn't add any value to their portfolio.

I did, and no, no pull request will come to this fork. When I am ready, I will release source to its own branch. Then people can either add to it, or get from it and add to RBDoom3BFG.

kortemik commented 9 years ago

I don't see a point in a method of working closed gpl source until release because sooner or later one of our commits will cause a nice amount of work in merging and I'd say it's not really counted in as contributing which would be beneficial for all of us

johnyukon commented 9 years ago

I though it wouldn't be too hard to include those shaders since the source is already available. I know ARB is not the best option but the shaders were already written and they work on DOOM 3.

Also both ARB and CG shaders are old, CG is not maintained by NVidia and ARB was "replaced" by GLSL, so the best would be to have everything in GLSL, I don't know how hard/time consuming it would be though.

Like the work that was done on Darkplaces engine, why not improve the graphics for this engine? If any developer is looking for an engine to create his game, he will probably consider graphics as a feature, and I imagine most of them would like to have next gen graphics in their games.

motorsep commented 9 years ago

@kortemik Are you suggesting I should keep compliant to RBDoom3BFG source? I don't think so. As a matter of fact, Storm Engine 2 and RBDoom 3 BFG are already less compatible and only will become less compatible in the future. I have no reason to keep it compatible.

kortemik commented 9 years ago

@motorsep I am suggesting just that if you ever want users for your engine the time would be now to have it open. Otherwise there will be rest of us working on something else which is going to be awesome in different way and perhaps with longer lifespan. I have seen both edges of the gpl blade already :)

motorsep commented 9 years ago

@johnyukon ARB shader were never released for Doom 3 GPL. So you can't even use ARB shaders outside of Doom 3. It's a nightmare to debug and there are a very few OpenGL programmers who bothers with ARB shaders.

Cg shaders are used in doom 3 BFG for a simple reason - write once and engine will compile it for all supported platforms. Kinda like in UE4, where you make shaders with nodes and noodles, and not in GLSL code.

Darkplaces is a "baby" of Lordhavoc. He wanted to learn engine programming, so he took Quake and began the process. 12 years later, we have DP engine with all its bells and whistles. Old school. There are no programmers like Lordhavoc, who is willing to grab BFG engine and make it better. For once, it won't become any better than UE4 and CryEngine 3 and Unity.

If a developer has no experience modding Doom 3, and graphics/performance isn't an issue, going with Doom 3 BFG would be nuts. Poor decision, uneducated choice.

motorsep commented 9 years ago

@kortemik I am not sure if I care for my engine to be used. I am being realistic and seeing how much time and money I already put into the engine, going with UE4 would be a sane choice, if I knew UDK well. I just never used it, and my art pipeline is tied up to idtech X.

kortemik commented 9 years ago

"There are no programmers like Lordhavoc, who is willing to grab BFG engine and make it better. For once, it won't become any better than UE4 and CryEngine 3 and Unity." maybe there are or even if there are no other such a guru there are still teams with way greater resources than he has. It's the mentality of open source.

I am planning to stick with this engine, no matter what you say. Why? Because of what i already said above and because of cross-platform support.

motorsep commented 9 years ago

UE4 runs on Windows, Mac, Linux, Android, iOS, SteamOS, PS4, XB1.

nbohr1more commented 9 years ago

@motorstep:

I believe this is what you are looking for...

https://github.com/cs121/TECH4-BFG/blob/chris/neo/renderer/RenderProgs_GLSL.cpp

motorsep commented 9 years ago

@nbohr1more Yeah, and you look at history, then load the source, all you will see is:

if (r_useRimLighting.GetBool() ) //CHRIS { src.AddDefine("USE_RIM_LIGHTING"); }

nbohr1more commented 9 years ago

OK, I see that he's just using the Half Lambert lighting from Treb and that already has a term for Rim light:

" half rim = 1.0f - saturate( hDotN );\n"

https://github.com/cs121/TECH4-BFG/commit/277964f074ea78fe20c3163109772a01725ad33b

So the only thing he has above that currently is the (questionable?) glossmap work...

BielBdeLuna commented 9 years ago

maybe we can collectively work on enhancing the engine while we get more experience at it. personally I don't know how to add a new glsl shader to the engine. in fact I tried and failed miserably :) but I would like to know more about it. I would love to learn such things.

motorsep commented 9 years ago

@nbohr1more If tr3b added rim lighting with shadow maps, why didn't he exposed it via cvar nor had screenshots? Have you tried it in action?

motorsep commented 9 years ago

@BielBdeLuna I offered several times to the community to join my team. No one cared. Doom 3 community is not willing to work cooperatively on someone's project (worth mentioning Quake's community is about the same nowadays). It's a community of individualists who want to work on their own projects only. Although it could be true for any community nowadays (every one is an indie bound to make a million dollars with their games). I almost wish indie game dev never happened in the scale it happened.

BielBdeLuna commented 9 years ago

that's a problem for indie privative developers, not for open ones, not everyone is bound to make a million dollars with their games.

I shared my knowledge when you asked for the portal-sky thingy. so don't put all of us in your labels.

motorsep commented 9 years ago

Having it open source makes no difference. There is only 1 project based on doom 3 that managed to attract developers (and most of them didn't come from d3w) - The Dark Mod.

On the contrary, look at iodoom3 - stillborn open source project. It's just something about Doom 3 and its followers.

johnyukon commented 9 years ago

Anyways...

I did some search for shaders and methods that can improve the graphics:

There are many more implementations around, but I'm only getting the ones that looks best. I will keep searching and will update with more findings.

motorsep commented 9 years ago

The advantage of Doom 3 BFG engine is that it doesn't need DX11 hardware to run.

If you want to add DX11 exclusive features and limit user base, might as well just jump on UE4 - $19 get you everything and more than you can ever have in D3 BFG engine.

kortemik commented 9 years ago

@motorsep those improvements could be done conditional on the renderer and with opengl.

Please leave the advertisement of Unreal Engine for Epic Games. It's their job, not yours, and even if it was yours, this is not the right place for it :) I hope you understand.

motorsep commented 9 years ago

It's a common sense. And apparently common practice in FOSS communities - asking mindlessly to replicate what's already out there in a better form and shape.

As I was told so many time, inquiring in the past about a way lesser advances, but more useful features - if you want it badly - source is open, grab it and do it yourself.

DanielGibson commented 9 years ago

And sometimes you have to replicate what's already out there, because people don't share their improvements.

motorsep commented 9 years ago

Of course you didn't read what Epic said about their code - you can learn and use that knowledge to implement your own stuff (engine), as long as you don't copy/paste the code ;)

BielBdeLuna commented 9 years ago

before any AO enhancement I would look into regaining the Ambient term that vanilla d3bfg lacks in comparison to vanilla d3. we have two of the three terms of the phong reflection model, diffuse, specular and we lack ambient.

you can see this lack in ambient in the alphalabs2 map in the corridor with an Imp teleporting in and breaking the window. the "vista" outside was achieved particularly with an ambient light, and in d3bfg it displays black (because it doesn't use have the ambient light term)

motorsep commented 9 years ago

Doom 3 never had ambient light working, so I am not sure how could it be.

DanielGibson commented 9 years ago

I wasn't talking about Epic.

BielBdeLuna commented 9 years ago

I guess the simplest way of a ambient term would be to add to the mix a new value of the diffuse material multiplied by the amount of ambient light, what glsl file does the mix of all terms?

BielBdeLuna commented 9 years ago

an also... how do we pass to it a "ambient light level"?

motorsep commented 9 years ago

@BielBdeLuna I would be much more clearer if you can post comparison screenshots :)

motorsep commented 9 years ago

@DanielGibson There are no other fancy rendering implementations (except maybe CryEngine and Snowdrop engine) you'd want to get a hold of. So UE4 is one and only engine that has a ton of eye candy with source open. If you hinting at Storm Engine 2 (I should call it StormTek 2 for easier Googling :P ), we don't have anything fancy in it.

DanielGibson commented 9 years ago

Replicating existing (but inaccessible) code always sucks, doesn't matter if rendering, tools or whatever.

motorsep commented 9 years ago

Please enlighten me, how is UE4 code inaccessible ?

kode54 commented 9 years ago

Isn't it under some sort of proprietary license that would forbid exporting features to add them into FOSS-ware?

motorsep commented 9 years ago

@kode54 You can not copy/paste code. But you can study it, understand it and make your own implementation in any form (FOSS or not).

kode54 commented 9 years ago

So it doesn't have to involve the usual reverse engineering techniques, where one developer is allowed to read it and describe it to another developer, who then makes additions to the target project?

motorsep commented 9 years ago

@kode54 I don't mean to come off rude, but have you lived under the rock? Please Google Unreal Engine 4 and read up their Wiki/Answerhub/ etc. Might want to ask that question Epic directly - they talk to users all the time.

kode54 commented 9 years ago

Why yes, I do live under a rock. It is the rock of being interested in game engine porting for the sole purpose of playing games. I have next to no interest in actual game development, so I don't keep up on the semantics of engine licenses. Perhaps I should unsubscribe from this repository.

DanielGibson commented 9 years ago

Am 28.07.2014 01:58, schrieb Chris Moeller:

Why yes, I do live under a rock. It is the rock of being interested in game engine porting for the sole purpose of playing games. I have next to no interest in actual game development, so I don't keep up on the semantics of engine licenses. Perhaps I should unsubscribe from this repository.

Please note that motorsep doesn't really have to do anything with this repository and its original (and main) goal indeed is porting the game to new platforms.

Cheers, Daniel

motorsep commented 9 years ago

@kode54 Perhaps you should ask Epic directly certain questions that can only be answered by Epic to be sure information 100%.

@DanielGibson Having me here is a good thing as it prevents you, tr3b and other contributors to this fork from patting each other on the back with words "Good job!" without giving it a second though as "Are we really doing this correct way? Will this feature benefit the community or is it just for my portfolio and ego?" ;)

DanielGibson commented 9 years ago

You are in no position to tell us what to do in our free time, how to do it or when to pad each others backs. So no, it is not a good thing, you're generally just pissing people off and casting are very bad light on what's left of the doom3 coding community.

motorsep commented 9 years ago

@DanielGibson And I don't tell you what to do. I just see nonsense ideas and point out why it's perhaps not optimal thing to do. People who come here are overly sensitive for whatever reason they are. I don't use fowl language, or derogatory remarks. So if they get upset without a good reason, that's their problem.

Doom 3 community has cast a bad light upon itself a loooooong time ago. There are a lot of people who warned me against using idTech 4 because of the community - unfriendly, cynical, always criticizing newcomers or outsiders, but not able to take criticism directed at them, etc. (the list can go on).

So don't patronize me, DanielGibson and instead look at your actions.

There are a handful of people from the community who doesn't overreact and get bend out of shape when conversation like this happen, but they either left for TDM, or left Doom 3 modding for good. I Personally only know 2-3 people like that.

DanielGibson commented 9 years ago

You should finally start reflecting on your behavior. I'm not the first person to tell you that your behavior pisses people off (it really seems like you have severe social deficits).

It would really be a huge step forward if you didn't shrug off all criticism as "overly sensitive" or similar but considered instead, that maybe it's not a whole community of idiots but maybe the problem is on your side after all.

(In Germany there is a saying: "What, one ghost driver on the street? Hundreds!")

I don't have a problem with people that just can't see when they're being annoying - some (e.g. autistics) just can't tell. But when these kind of people know about their problem and react to it, it's much more bearable than your "you're all unfriendly, cynical and overly sensitive".

motorsep commented 9 years ago

Hmm... Yeah, that's what I am talking about - point finger at me, but in no way look at yourself. What is "social deficits" ? If you mean I don't know how to socialize, I have to disappoint you as I work in a company ~200 employees and I interact with ~50 on daily basis. Haven't had any issues. However, these people don't create situations like people create online. Thus I don't deal with whole a lot of nonsense at work.

Here I see nonsense all the time, especially within Doom 3 community. And I am not going to say nothing when people like you step in and defend the nonsense.

You can't probably read clearly as it's quite late in Germany, but I think I made it clear there are/were a few good people in the community. Note that you used word "idiots", I didn't. One thing I forgot to mention that "community" consisted of maybe 10 or even less people. The rest were coming in infrequently. But the active members were the ones stirring up shit.

When I asked for features, you and some other folks labeled me as selfish person who doesn't want to do anything himself. But yet when someone else asks for features that are crazy complex to implement - you say nothing, and even suggest it's what has to be done for some bogus reasons.

You don't have "problem" with people because you don't care. You aren't the one adding features. You don't care for indie game dev. You don't care for commercial indie game dev using GPL engines (as I recall you were against it).

Let's rewind back to last year. I was suggesting that going BFG is a way to go. Trying to port BFG into idTech 4 was nonsense, etc. You and a few others did the same thing you doing right now - suggesting I was the one with the issue, I didn't know what the hell I was saying, and I should just shut up.

Guess what - in 2014 somehow going BFG turned out to be the thing. Somehow now everyone is looking into a way to post their work to BFG engine. I don't have anything to add to this conversation.