Jump to content
The Dark Mod Forums

GTKRadiant


Recommended Posts

While looking for some information about projected lights and the frustum calculation, I found this:

 

- (TODO) Texture sizes sometimes vary wildly. New texture browser option: View -> Fixed Size.

Code parts taken from DarkRadiant. (Shaderman)

 

Seems like the GTKRadiant developers (or at least Shaderman) are well aware of our fork.

Link to comment
Share on other sites

Yes, I saw that a while ago when it came out as part of a svn-commit email to the mailing list.

 

I actually made Shaderman aware of our Model Selector as well, when it came up in a user request. I think they might have some difficulty integrating it though with all of the application-wide changes we have made.

Link to comment
Share on other sites

I think it is inevitable that there will be a fork: DarkRadiant for Doom 3 and its brethren (Q4, Prey etc) and GtkRadiant for the pre-Doom 3 crowd (Quake 3, ET, HL etc). We already have much better support for Doom 3 than vanilla GtkRadiant and once we achieve feature parity with DoomEdit, we will have de facto the best Doom 3 editor available (which is why I am keen to have a particle editor and dynamic shadows, although these are not priorities for TDM).

Link to comment
Share on other sites

  • 3 weeks later...

I subscribed to the GtkRadiant developer mailing list last week and now I'm receiving nothing but spam-o-fied bug reports (and the gmx filter sends most of the GtkRadiant mails into the spam folder, although I added the email address to my white list). First I thought there would be some discussion going on, but it really gets tiresome to sort out all of the useless "car insurance" bug reports...

Link to comment
Share on other sites

Yes, there is very little discussion on that list. It is useful if you want notifications of SVN commits, but the bugreports seem to be a combination of spam and stupid "hay guys gtkradiant dosn't wrko on my computar!!!111" submissions from John Q Public.

Link to comment
Share on other sites

Yeah, I've been meaning to unsubscribe myself but haven't got round to it yet. It was useful during the early development when backporting bugfixes from the mainline was important, but now we are so far ahead of GtkRadiant that merging their bugfixes would be more effort than just fixing them.

Link to comment
Share on other sites

Well there is certainly a place for Half-life 1 editors, however writing a single application to support everything requires very well-designed abstraction s, which GtkRadiant simply doesn't have.

 

If they want to support this many games they should start pushing functionality into plugins which implement well-designed interfaces, with different plugins for each game (eclassmgr_hl1, eclassmgr_doom3, eclassmgr_prey) etc. Then the build script should be able to select which plugins to build depending on the game type, allowing them to easily build different versions of the application for different games.

 

The chances of convincing anybody that this is a better design than having hundreds of hardcoded if-statements to select the gametype, is rather remote though.

Link to comment
Share on other sites

  • 4 months later...

I scrolled a bit through the GtkRadiant CHANGES file yesterday and for me it provided some new insight into the history.

 

Most of the scenegraph has obviously been written in october 2002 by SPoG (I guess dynamic_cast has already been available at that time ;)), who has been the most active author for more than 5 years.

 

Is SPoG employed by iD software or is/was he a volunteer like namespace and us? I wonder why he stopped comitting in August 2006?

Link to comment
Share on other sites

Is SPoG employed by iD software or is/was he a volunteer like namespace and us? I wonder why he stopped comitting in August 2006?

 

I'm not sure whether he actually worked for ID, but he was certainly in the game industry and had an official address at some publisher or other (possibly EA, I can't remember which). I suspect he was an ex-ID developer who still contributed in his freetime.

 

I guess it was good of him to give up so much time, but his code was pretty poor in many respects. I suspect the majority of the complex templated rubbish was due to him.

Link to comment
Share on other sites

Yup. He certainly knew what he was doing though, he (among almost all other things) wrote the experimental support for projected lights, from where I could start off. The templated stuff is of course a nightmare to work with (at least for me).

 

I still have a lot to learn in terms of rendering and elegant matrix transformations, so he sure saved us a lot of time. Too bad his code is completely undocumented - the classic symptom of one-man-programming, as I first suspected.

Link to comment
Share on other sites

SpoG was a mapper who started to become popular back in the Q1 (or 2?) days.

He wrote many howtos about q3map2 and other id mapping related things and

picked up GtkR development at the time of GtkR 1.4. Later he got

his own branch because his "interesting" design decisions were a threat to 1.4.

As the 1.4 crew left the project, the spog-branch became the 1.5 branch.

 

The code for projected lights is not from SpoG. Nobody (Spog, Tr3B, me) was able to figure out how ID calculated these matrices, many implementations worked most of time

but failed in some special cases. That code-snippet was given from ID.

 

The renderer isn't from Spog either. It was backported from Tr3Bs x-real engine.

 

I don't want to smallen Spogs work, its still alot of stuff and very complicated too,

but don't give him credits for too much. ;)

 

Concerning the projected light code:

I have no idea how it works, I know projection-transforms very well, but this code is

just insane. My engine just recalculates the projection from the 3 given vectors.

Thats pretty easy to do and looks intuitive enough to me. Yes it may not cover

every possible weird lighing setup you can create with doom3, but I don't consider

this to be a problem.

Link to comment
Share on other sites

Ah, ok, I was referring to this entry in the changelog (10/01/2006):

10/01/2006
SPoG
- Added experimental support for doom3/quake4 projected lights.

 

I bit into that piece of frustum calculation code a few months ago (when I worked on the draggable projected light vertices) and failed to wrap my head around it. It's probably very condensed and optimised and without documentation I hardly stand a chance of understanding what is going on here. In the end I decided to use just the result of this code and intersect the resulting planes to calculate the corner points.

 

The lighting mode rendering of projected lights doesn't really work currently, so anything will be an improvement here. :)

Link to comment
Share on other sites

I just tried out the GtkRadiant behaviour and it definitely works better than DarkRadiant here. If you didn't change anything in the projected lights renderer, I must have broken it somehow.

 

I also found an interesting feature:

projzs0.th.jpg

 

The light seems to be reflected upwards as well when the light volume is intersecting with a wall on the side. Maybe this is persistent in DoomEdit as well, I haven't checked, but it seems a bit weird.

Link to comment
Share on other sites

The light seems to be reflected upwards as well when the light volume is intersecting with a wall on the side. Maybe this is persistent in DoomEdit as well, I haven't checked, but it seems a bit weird.

Well mathematically, the backprojection is correct. The most common way to get rid

of it is to use a texture to mask it out, doom3 combines this with its falloff texture.

If you see the backprojection your falloff texture is completly white

or painted wrong.

 

The frustum looks distorted though.

Link to comment
Share on other sites

The distortion was of course done on purpose to test the projection rendering (I dragged the vertices in DarkRadiant and saved the map). The falloff texture is taken from vanilla Doom3 - I don't know what should be wrong here though. I got this with three different falloff textures.

Link to comment
Share on other sites

I dragged the vertices in DarkRadiant and saved the map

You can edit the vertices of the lightfrustum? Did you guys add that in DarkRd?

 

I made a little test myself and was surprised, I get backprojection in GtkR too.

I think the only reason I didn't recognise it earlier is that Radiant culls Brushes

that are behind the frustum. I never placed a light that close to a wall that this

effekt would show :wacko:

 

Anyway, that shouldn't be much of a problem.

Try painting the left or right half of a falloff map black, it should mask out the front/backprojection. Irrc the doom3 falloff starts in the middle of the falloff-texture, so

the center of the texture is the lightvalue for zero distance, left should be negative distance, right positive.

 

I changed that for my engine slightly:

Zero distance is the left edge, max distance the right. That way I can use the full colorprecision when using a 256 pixel falloff-map.

The fallofftextures have CLAMP_TO_BORDER enabled which adds a "virtual" border

to the texture. This little trick kills backprojections since everything with a

s-texcoord < 0.0 ends up on the black border.

Link to comment
Share on other sites

You can edit the vertices of the lightfrustum? Did you guys add that in DarkRd?

Yes, I did that back in December, if I recall correctly. I tried to mimick DoomEdit's behaviour, which was the main goal. I implemented it such that you have to switch into Vertex Editing mode to manipulate the vectors. (This whole stuff cost me quite some time.) OrbWeaver also added a LightInspector to conveniently edit the light's properties and convert them into projected lights.

 

You can achieve pretty weird shapes using the light_target, light_up and light_right as well as light_start and light_end.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 5 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...