Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 15

Author Topic: Obsidian: A new DF 3D visualizer toolset  (Read 65694 times)

Skeggox

  • Bay Watcher
  • Likes obsidian for its shinyness
    • View Profile
Obsidian: A new DF 3D visualizer toolset
« on: May 23, 2010, 02:37:54 am »

Hi all!

I am an avid fan of Visual Fortress, and am missing it terribly. With Baboonanza so graciously opening up the source code, I thought I'd try my hand at reviving it in a new guise.

From reading the Visualizer thread, I noticed that the biggest problem was lack of flexibility - with each new iteration of DF the visualizer needs to be updated (or at least a new Memory.xml needs to be figured out), and it isn't easy to add features like exporters for offline rendering (think dumping the geometry into a povray file and running it through a raytracer, etc).

So, the new project will be open-source from the start and based around a Lua framework that ties together modules. Modules would be things like DFHack, Baboonanza's DF geometry engine, and a collection of importer/exporters. Modules will be separately built shared libraries, so updating the visualizer to a new version of DF will be as simple as downloading the latest DFHack shared library binary. And if the API for a module changes all we need do is update the Lua framework files.

The better news is that the project is based completely on open source, cross platform tools and libraries. It uses CMake for configuration, so any build system with a CMake generator can be used (Linux, Mingw32, Cygwin, Borland C++, MSVC, etc.) I'm currently developing it on Mingw32 for Windows, but getting a Linux build up and running should be an afternoon's work.

I'll be making it available via GitHub soon, once I have something workable. So far I have console support, a basic multi-threading framework, a Lua engine and a Rendering engine (using GLUT) up and running. Currently all it does is show a rendered triangle and allows interactive Lua commands in a console window. But it is a start :)

Next up I'll be working on a basic material and scene manager. Most of it will come from existing code in Visual Fortress, so I'm skipping a lot of trial and error. Yay! Thanks B!

I am an engineer with professional game developer experience (think one of the big studios like EA, Ubisoft, Bioware, etc.) so I would like to think I know what I'm doing. But I'll need a lot of help, especially with artistic content and project management.

Any volunteers?

- Someone to manage the Linux and Mac builds would be awesome (I'm an Archlinux fan myself, but have to use Windoze at home for business reasons).
- A render expert to help with the rendering side of things (I have a bit of rendering experience, but not in OpenGL, and if I have to spend the time to learn it first it will take forever)
- A texture and model artist. Visual Fortress has a fair amount of existing content (and I know how to import it) but the collection will need tweaking and growing.
- A community manager - someone to set up a wiki, bug tracker, keep track of things happening in forum threads, create a gallery of visualizations, organize competitions etc.

The size of the response to this initiative will determine how much time I will commit to it. I'm doing it currently for the technical challenge and educational value (plus I really want to see my megaprojects in raytraced glory), but if enough people pitch in we can make this a big thing.

Oh, I'm calling it Obsidian (water + magma = obsidian, and DF + 3D = Awesome, thus Obsidian = Awesome)
 8)

Skeggox

(P.S. Spread the word, please)
Logged
Dwarf Fortress - "It's like if Tolkien taught your Geology 101 class, but you were drunk and playing the Sims during the lecture. Then you had a dream that got them all confused."

Obsidian 3D Visualizer Toolset - http://df.magmawiki.com/index.php/Utility:Obsidian
A Lua-riffic collection of modules to render, manipulate, save and generally mess with your forts.

Skeggox

  • Bay Watcher
  • Likes obsidian for its shinyness
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #1 on: May 23, 2010, 02:39:27 am »

Some feedback from questions in the Visual Fortress thread:


As to the exporters, I'm only going to start with something like povray. The modular nature will hopefully allow anyone to write any exporter for any format they want to, without needing to touch the core visualizer.

As for the geometry, I'll be implementing the constructions etc. as procedural geometry, like in Visual Fortress, meaning they are generated by applying certain rules to the tilesets. These rules will be done in Lua, so anyone with a text editor will be able to change how statues are oriented, how the crenelations of open topped fortifications look like, etc.

You want murder holes in the roof of your barbicon? Add a procedural Lua script that inserts them, triggered by a marker tied to a burrow, so on and so forth.

Another idea I've got is to do periodic recordings of the whole map's tileset info into a compressed stream, which can be exported as a series of scene files, which you then run overnight through a raytracer and encoder, and voila - you have a time-lapse movie showing the construction of you mega-dam/tower/castle :)

I'll make the tools - its up to you guys to make the awesome with it.
Logged
Dwarf Fortress - "It's like if Tolkien taught your Geology 101 class, but you were drunk and playing the Sims during the lecture. Then you had a dream that got them all confused."

Obsidian 3D Visualizer Toolset - http://df.magmawiki.com/index.php/Utility:Obsidian
A Lua-riffic collection of modules to render, manipulate, save and generally mess with your forts.

Retro

  • Bay Watcher
  • o7
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #2 on: May 23, 2010, 02:45:52 am »

Having a new 3D visualizer alone would be great. The new features you're thinking about implementing sound incredible.

Skeggox

  • Bay Watcher
  • Likes obsidian for its shinyness
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #3 on: May 23, 2010, 03:03:48 am »

Like I said - I'll just be creating the skeleton to tie everything together via the magic of Lua scripting.

It's most likely going to be up to individual coders/'tweakers to implement the cooler stuff, unless I get to it first ;)

Actually, my render-fu is far weaker than Boobananza's, so I'm hoping either he or a render guru will step up and help with that part  :o
Logged
Dwarf Fortress - "It's like if Tolkien taught your Geology 101 class, but you were drunk and playing the Sims during the lecture. Then you had a dream that got them all confused."

Obsidian 3D Visualizer Toolset - http://df.magmawiki.com/index.php/Utility:Obsidian
A Lua-riffic collection of modules to render, manipulate, save and generally mess with your forts.

Skeggox

  • Bay Watcher
  • Likes obsidian for its shinyness
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #4 on: May 23, 2010, 04:27:55 am »

Just to prove Obsidian isn't a pipe dream - I present to you a screenshot of Obsidian V0.01 in action. That's me testing the Lua error reporting function by putting a typo in my Hello World test script (you always start with one of those, ya know).

Spoiler (click to show/hide)
« Last Edit: May 24, 2010, 03:53:13 pm by Skeggox »
Logged
Dwarf Fortress - "It's like if Tolkien taught your Geology 101 class, but you were drunk and playing the Sims during the lecture. Then you had a dream that got them all confused."

Obsidian 3D Visualizer Toolset - http://df.magmawiki.com/index.php/Utility:Obsidian
A Lua-riffic collection of modules to render, manipulate, save and generally mess with your forts.

James.Denholm

  • Bay Watcher
  • [HAS_NO_HUMOURS]
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #5 on: May 23, 2010, 05:32:42 am »

Those rascally triangles.

Um, a short, small realisation: If this project remains modular, people who have issues with Povray[sic?] rendering will be able to swap that out for something else. And so on.
Logged
Imagine a combination of power goals 44 and 45: The ruler convenes a council of the nobles to appoint you the high priest of the nearby towns. Instead of waiting for them to finish their drinking session, you walk in and crush a goblet while berating their disgusting behaviour and general incompetence.

Skeggox

  • Bay Watcher
  • Likes obsidian for its shinyness
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #6 on: May 23, 2010, 06:03:56 am »

My idea is to make everything swappable :)

I'll provide a geometry generator, and a basic renderer (both based on B's work in VF), but the architecture will allow anyone to swap in their own generator, or exporter to 3rd party tools, whatever takes your fancy.

Think of Obsidian more as a tool framework for doing interesting stuff with DF, but one starting out with a set of (hopefully) decent 3D visualization tools.
Logged
Dwarf Fortress - "It's like if Tolkien taught your Geology 101 class, but you were drunk and playing the Sims during the lecture. Then you had a dream that got them all confused."

Obsidian 3D Visualizer Toolset - http://df.magmawiki.com/index.php/Utility:Obsidian
A Lua-riffic collection of modules to render, manipulate, save and generally mess with your forts.

tefalo

  • Bay Watcher
  • Priest of Syrinx
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #7 on: May 23, 2010, 07:11:17 am »

Very cool. I'll be sure to follow this thread!
Logged

sizeak

  • Bay Watcher
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #8 on: May 23, 2010, 07:45:44 am »

Why not use the OGRE rendering engine since it now uses the MIT licence and it's pretty good.
Logged
Runesmith - http://www.bay12forums.com/smf/index.php?topic=59056.0 - A Dwarf Companion like tool

Osmosis Jones

  • Bay Watcher
  • Now with 100% more rotation!
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #9 on: May 23, 2010, 07:45:55 am »

This sounds awesome. Can't wait to see how it turns out.
Logged
The Marx generator will produce Engels-waves which should allow the inherently unstable isotope of Leninium to undergo a rapid Stalinisation in mere trockoseconds.

Xanares

  • Bay Watcher
  • Cut them all down!
    • View Profile
    • Youtube channel
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #10 on: May 23, 2010, 09:21:12 am »

Wholeheartedly support this project.

I'm a busy dwarf so continued support and eventual donations will be all I can offer at this point.

Armok approves.
Logged

Djohaal

  • Bay Watcher
  • [PREFSTRING:Utter Insanitiy]
    • View Profile
    • My deviantart
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #11 on: May 23, 2010, 11:14:56 am »

As I said in the other thread, I can help out with the artsy part of rendering (what isn't much, sadly) and with texture/model art.
Something we should implement is the new feature of stonesense where all stone materials can get colored procedurally via a xml list of RGB values. Different stone types (sedimentary/metamorphic/igneous/etc or we could use another criteria such as the grain and such) should have similar base texture types (a grayscale pattern), but be rendered with an multiplying color overlay that is RGB, so we won't need individual texture files for each and single stone/ore/gem type in DF.
We could do some iffy effects on gem veins with bump mapping and specularity too. Another issue that I can foresee is that metal structures will need their geometry to be merged (or at least have very coehrent normals) if we intend to add something like enviroment mapping to their reflections.
Logged
I really want that one as a "when". I want "grubs", and "virgin woman" to turn into a dragon. and monkey children to suddenly sprout wings. And I want the Dwarven Mutant Academy to only gain their powers upon reaching puberty. I also have a whole host of odd creatures that only make sense if I divide them into children and adults.

Also, tadpoles.

Draco18s

  • Bay Watcher
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #12 on: May 23, 2010, 11:25:58 am »

There's a thread around somewhere for textures, let me see if I can dig it up.

Ah here we go:

http://www.bay12forums.com/smf/index.php?topic=44702.msg863637
Logged

Itnetlolor

  • Bay Watcher
    • View Profile
    • Steam ID
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #13 on: May 23, 2010, 11:47:29 am »

Nice to see someone willing to take on/continue the 3D visualizer prospect. I hope it all goes smoothly. Good luck.

And yes, some of those extra features do sound interesting.

Skeggox

  • Bay Watcher
  • Likes obsidian for its shinyness
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #14 on: May 23, 2010, 01:38:59 pm »

Why not use the OGRE rendering engine since it now uses the MIT licence and it's pretty good.
OGRE is a bit heavy duty for my needs at the moment - but fear not! I am testing OpenSceneGraph at the moment. It came with its own set of self-reflected Lua bindings. So. Yeah. I think I just sidestepped a few weeks of happily rolling my own scene management system... :P

Something we should implement is the new feature of stonesense where all stone materials can get colored procedurally via a xml list of RGB values.
That... is a damn good idea. Hrmmm. That goes straight into my ideas.txt...

There's a thread around somewhere for textures, let me see if I can dig it up.

And here I was concerned that getting enough art content for Obsidian might be a problem...  :o

Might there perchance be a similar project for models?
Logged
Dwarf Fortress - "It's like if Tolkien taught your Geology 101 class, but you were drunk and playing the Sims during the lecture. Then you had a dream that got them all confused."

Obsidian 3D Visualizer Toolset - http://df.magmawiki.com/index.php/Utility:Obsidian
A Lua-riffic collection of modules to render, manipulate, save and generally mess with your forts.
Pages: [1] 2 3 ... 15