Jump to content


Photo

Writing plug-ins for Dark Radiant


  • Please log in to reply
15 replies to this topic

#1 Snehk

Snehk

    Member

  • Member
  • PipPip
  • 58 posts

Posted 11 November 2018 - 08:52 AM

Greetings! I'm interested in writing several plug-ins for Dark Radiant, namely:

WYSIWYG GUI editor with IDE like gui scripter (for those who'd rather write their gui files in code).

Material editor with dynamic preview.

Terrain editor with random generation algorithm (eg. perlin noise), sculpting for hand-crafted terrain, lwo export and ability to convert into brushes or patches.

Vertex painting tool for dynamic, in-editor texture blending.

And possibly more in the future. I'd like to ask if diving into editor's code and checking the in-engine editors and other open source solutions is a good way to begin.
  • Bikerdude, HMart, Anderson and 1 other like this

#2 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 868 posts

Posted 11 November 2018 - 10:56 AM

Re. vertex painting, you do know the TDM engine supports vertex colours only on models, not brushes or patches, right? (I'm assuming TDM/id Tech 4 is the target here, though I'm aware DR supports others.) Or were you inspired by the note here?

 

 

Changing the map format has been deemed too risky. could possibly be addressed via a Dark Radiant plugin that automates model export when vertex colors are applied. Currently scripts exist to approximate this functionality.


Edited by VanishedOne, 11 November 2018 - 11:02 AM.

Some things I'm repeatedly thinking about...

- louder scream when you're dying


#3 Snehk

Snehk

    Member

  • Member
  • PipPip
  • 58 posts

Posted 11 November 2018 - 03:52 PM

I do know about this limitation. I thought about a plug-in that could allow for vertex painting on models from within Dark Radiant.



#4 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 20281 posts

Posted 11 November 2018 - 06:11 PM

Orbweever/Greebo would your best points of contact as they have been maintaining DR for a while now..


  • Anderson and Snehk like this

#5 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 747 posts

Posted 11 November 2018 - 06:22 PM

Greetings! I'm interested in writing several plug-ins for Dark Radiant, namely:

WYSIWYG GUI editor with IDE like gui scripter (for those who'd rather write their gui files in code).

Material editor with dynamic preview.

Terrain editor with random generation algorithm (eg. perlin noise), sculpting for hand-crafted terrain, lwo export and ability to convert into brushes or patches.

Vertex painting tool for dynamic, in-editor texture blending.

And possibly more in the future. I'd like to ask if diving into editor's code and checking the in-engine editors and other open source solutions is a good way to begin.

 

You have a very ambitious list there! Good luck! TDM would benefit immensely with improved tools. 

 

Btw idtech 4 already has a gui editor (and a material editor for that matter) made by Raven Software, you could look at the source. Is a little buggy and only supports basic gui functionality, you can't animate inside it for example, only put images in and transform them.   TDM engine seems to miss it tho, so if you want to study those you need Doom 3 version of the engine.   


  • Snehk likes this

#6 New Horizon

New Horizon

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 13853 posts

Posted 11 November 2018 - 06:28 PM

 
You have a very ambitious list there! Good luck! TDM would benefit immensely with improved tools. 
 
Btw idtech 4 already has a gui editor (and a material editor for that matter) made by Raven Software, you could look at the source. Is a little buggy and only supports basic gui functionality, you can't animate inside it for example, only put images in and transform them.   TDM engine seems to miss it tho, so if you want to study those you need Doom 3 version of the engine.   


The doom 3 versions wouldn't be compatible with Dark Radiant. Might get some ideas from them but aside from that, it's going to be a start from scratch affair.
  • HMart likes this

#7 Snehk

Snehk

    Member

  • Member
  • PipPip
  • 58 posts

Posted 11 November 2018 - 06:51 PM

I thought about checking Raven Software's gui editor's code just to check a few things. I don't like its layout and general clunkiness though, starting it from scratch seems to be a better option for me rather than improving the old mess. I also want to make it fully customizable, give it a full gui script support and IDE like writing functionality with dynamic preview - it'd take an enormous amount of work, but would be just as huge an improvement.


Edited by Snehk, 11 November 2018 - 06:52 PM.


#8 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 747 posts

Posted 11 November 2018 - 10:28 PM

The doom 3 versions wouldn't be compatible with Dark Radiant. Might get some ideas from them but aside from that, it's going to be a start from scratch affair.

 

No doubt about it, but like I said there's no harm to look at the source and see how they connected the pieces, that way you don't need to start from total darkness.

 

I thought about checking Raven Software's gui editor's code just to check a few things. I don't like its layout and general clunkiness though, starting it from scratch seems to be a better option for me rather than improving the old mess. I also want to make it fully customizable, give it a full gui script support and IDE like writing functionality with dynamic preview - it'd take an enormous amount of work, but would be just as huge an improvement.

 

Writing a GUI editor (or others) will indeed be laborious. Have you written a editor before?   



#9 Snehk

Snehk

    Member

  • Member
  • PipPip
  • 58 posts

Posted 12 November 2018 - 03:46 AM

Yes, though not as complex as what I'm planning to do here. Most of my editors were specialised software meant for single purposes.

#10 OrbWeaver

OrbWeaver

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 7527 posts

Posted 12 November 2018 - 05:57 AM

DarkRadiant doesn't really have a plugin API. There is Python scripting, but I doubt you will be able to write complex new functionality like vertex painting using Python (although I could be wrong; perhaps I underestimate the flexibility of the Python support).

 

So yes, you will almost certainly need to dive into the code and implement these features in C++, then send a Git pull request if and when you have something usable.


  • Snehk likes this

#11 Snehk

Snehk

    Member

  • Member
  • PipPip
  • 58 posts

Posted 12 November 2018 - 07:40 AM

Thanks! I prefer C++ over Python, so I'll rather code new things directly into DR (taking your coding standard regulations into account). When I'll get something working and usable, I'll report on the forums and then send a pull request.
  • HMart likes this

#12 New Horizon

New Horizon

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 13853 posts

Posted 12 November 2018 - 10:43 AM

Exciting stuff! ☺

#13 OrbWeaver

OrbWeaver

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 7527 posts

Posted 12 November 2018 - 12:34 PM

I should add that while we don't have any kind of binary plugin API, in the sense of writing 3rd party plugins which are distributed separately, we do have a modular design which allows optional components to be separated into separate DLLs, much like Linux kernel modules. This allows particular features to be selected at compile-time, and even split into separate optional packages; this is already used for the Dark Mod specific plugins like Objectives and Stim/Response editors.

 

I would strongly recommend that you implement any of these new features as separate optional modules, much like the Dark Mod plugins, so that people who don't need them can choose either to not compile them or to not install the separate optional package.


  • Snehk likes this

#14 Snehk

Snehk

    Member

  • Member
  • PipPip
  • 58 posts

Posted 12 November 2018 - 02:17 PM

Awesome! I'm going to make them as separate modules then.

Edited by Snehk, 12 November 2018 - 02:17 PM.


#15 IZaRTaX

IZaRTaX

    Member

  • Member
  • PipPip
  • 12 posts

Posted 17 November 2018 - 07:51 PM

Should be awesome if you can do something like that with terrain ^_^

 


Edited by IZaRTaX, 17 November 2018 - 07:57 PM.

CoD4 / CoD5 Mapper Mp / Zombie Black ops 3 Mod Tools Alpha Tester.

 

Portfolio : https://www.zartax-level-design.com/

 


#16 Snehk

Snehk

    Member

  • Member
  • PipPip
  • 58 posts

Posted 03 December 2018 - 06:22 AM

I thought more about sculpting terrain, like in TES Construction Kit, Terragen classic or sculpting software.

As usual whenever I'm about to start a project I get ill, get invited to a dev team, get contracted to code something from ground up and several musicians and my band need a bassist ASAP.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users