Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 8 9 [10] 11 12 ... 15

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

soundandfury

  • Bay Watcher
  • Code monkey
    • View Profile
    • Just to the Left of Venus (aka dev-null)
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #135 on: June 27, 2010, 10:45:46 am »

I know what Lua is. I was asking what this specific package is.

I think he means it gets the data from DF and produces the 'cell file', which is basically the map.

I hope that's what he means, because if so I'll be able to start on an import/export for DF Designer.
Logged
It's maths, it must be true!
DF Designer

obijohn

  • Escaped Lunatic
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #136 on: June 27, 2010, 03:58:48 pm »

It'd be nice if Obsidian includes mac compatibility, but I guess it's not a first priority goal, if one at all :)

I haven't tried Mac development yet (but my lady has a Powerbook and I can always sneak it away from her whilst she is reading and try my hand at it), but AFAIK Mac OS X is basically a Unix system, so the "porting distance" between Linux and Mac OS X should be less than between Linux and Windoze.


For the blood god's sake, please please pretty please for Mac?

About that powerbook... it has a PPC processor. All new Macs since 2006 are intel-only (in fact, Snow Leopard is intel-only and won't even install on a powerbook), so this will not be a good platform for the Mac development. Yes, xcode will cross-compile for intel machines on the powerbook, but the problem is going to be differences in the memory access system used by DFHack, and DFHack does not support Mac so this project would have to fill in that gap. They claim it should be possible but there has been no one to step up and do it. The UI part of Obsidian should not be difficult to port from linux to Mac, since there are already ports of most linux UI libraries (GLUT, QT, Gtk+, SDL, etc). It's going to be the DFHack-specific memory related stuff that will be the hard part.

However, once that's done, the hard part is out of the way, and keeping the Mac port in sync with the linux port should be easy. I realize that Mac support is very low on priority right now because the project is so new. But this is by far the best time to do it. If you wait, I'm afraid the Mac side will get left forever behind. It's much easier to port the pieces as you go instead of having a finished project that needs to be ported from scratch.
Logged

Crunch

  • Bay Watcher
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #137 on: June 27, 2010, 04:13:52 pm »

It sounds like a good idea...  but we still need a developer willing and able to port DFHack to the mac.
Logged
⎝⏠⏝⏠⎠

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #138 on: June 27, 2010, 05:01:54 pm »

It sounds like a good idea...  but we still need a developer willing and able to port DFHack to the mac.
More than that -- we need someone to maintain DFHack on the mac. That's a whole world of difference.

ScrapHeap

  • Bay Watcher
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #139 on: June 28, 2010, 04:07:48 pm »

Hi there,

I am an avid fan of DF, although I have never played it, and probably will not have any time in the coming 10 years, seeing my professional situation :P
I used to contribute 2d and 3d media to the Worldforge project (www.worldforge.org)
A lot of focus was at keeping polycount acceptable and making media reusable, the latter by using versatile texture templates.
All the stuff we made can be found here: https://svn.worldforge.org:886/svn/media/trunk/
I had to suspend activities due to aforementioned professional situation. The project moves on at glacier pace (slow but unstoppable).

I suspect that a lot of the artwork can be reused (this has always been a WF artwork goal).
If a set of lowpoly trees is needed, then look here: https://svn.worldforge.org:886/svn/media/trunk/3d_objects/plants/tree_billboard/
If you need ground types, then look here: https://svn.worldforge.org:886/svn/media/trunk/3d_objects/environment/textures/
A nice meaty texture: https://svn.worldforge.org:886/svn/media/trunk/3d_objects/items/food/textures/ham/D.png
Basically you have here a multi gigabyte collection of open source game artwork available.

Have fun, and good luck!

Scrap Heap (WF nick: Munin)


« Last Edit: June 28, 2010, 04:13:23 pm by ScrapHeap »
Logged

nbonaparte

  • Bay Watcher
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #140 on: June 28, 2010, 04:17:50 pm »

That's excellent. What programs can open .mesh, though?
Logged
A service to the forum: clowns=demons, cotton candy=adamantine, clown car=adamantine tube, circus=hell, circus tent=demonic fortress.

foradan

  • Bay Watcher
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #141 on: June 30, 2010, 02:53:15 am »

Porting DFhack to mac is not quite as trivial as you might think, as the methods used by DFHack to access DF's memory in Linux do not work on the mac.  I got the SHM method to work, but only by recompiling the SDL library with the DFHack SHM-server-side code compiled in.  The other method requires the comms section to be rewritten to use Mach kernel calls rather than ptrace, and requires either running as root, or convincing a security layer to give DFHack access to the running DF.

And then someone has to find the memory offsets for the mac compile of each new version of DF.

At the moment I don't have the time, as there are several other projects requiring my attention, but I can give help and advice to anyone else wanting to have a go.
Logged

chmod

  • Bay Watcher
  • I get by with a little help from my friends
    • View Profile
    • UDP Viper
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #142 on: June 30, 2010, 12:18:27 pm »

AFAIK Mac OS X is basically a Unix system, so the "porting distance" between Linux and Mac OS X should be less than between Linux and Windoze.
You'd be suprised :) You have to get comfy with the Mach kernel, since OSX crippled most of the BSD calls that would help with this. It's its own world, which is why I gave up on the DT side until a mac hacker comes along who will maintain it on an ongoing basis.
Logged

ScrapHeap

  • Bay Watcher
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #143 on: July 02, 2010, 03:04:27 pm »

.mesh files are runtime files for the ogre scenegraph.
you will also often find .3ds and .wrl
I believe that multiple converters can be found. Blender might also eat .mesh files
Logged

Shaostoul

  • Bay Watcher
  • Expanding your universe.
    • View Profile
    • Shaostoul Patreon
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #144 on: July 05, 2010, 09:23:24 pm »

Can't wait for this to come out... also bump
Logged
I mod games and educate others how to do so as well, if you'd like to learn join my Discord and you can join a bunch of like minded individuals. (Presently modding Space Engineers and No Man's Sky.)

Looking into modding DF? This forum guide & wiki guide may still be a good start!

Tack

  • Bay Watcher
  • Giving nothing to a community who gave me so much.
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #145 on: July 08, 2010, 07:33:13 am »

posting to track, but also to offer praise to the amazing minds at work on this project.

'hem.
Logged
Sentience, Endurance, and Thumbs: The Trifector of a Superpredator.
Yeah, he's a banned spammer. Normally we'd delete this thread too, but people were having too much fun with it by the time we got here.

Skeggox

  • Bay Watcher
  • Likes obsidian for its shinyness
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #146 on: July 10, 2010, 03:43:36 am »

Thanks for the compliment Tack :)

Alas, it's a crazy ass time at work. Averaging about 65 hours a week, with super-extra overtime on weekends. Deadlines are deadlines, but at least things will quiet down just before we ship. Just a few more weeks...

Just to reassure - I haven't forgotten about Obsidian. I have, however, been struggling with the weirdest Lua error lately. Anyone familiar with Lua and binding to C, can you maybe cogitate over the following and offer some suggestions as to what might be the culprit?

<technical>
I'm generating Lua bindings where I start by registering metatables for each C++ class. I generate a C-function for __index, which contains a generated switch statement that compare a hash of the incoming string key with all of the members and methods defined in the class. It will return either the value of a member, or a C-function wrapper for a method. A similar C-function is generated for __tostring (prints the C++ class name) and __newindex (to assign values to members). These class metatables are added to the registry by using luaL_newmetatable with the fully qualified class name. Whenever I need to push such a C++ object into Lua, I create a light userdata set to the object pointer, get the registered metatable using luaL_getmetatable, and set it on the lightuserdata.

So far, so good - all according to examples from the Programming In Lua online book. Except... for some reason most lightuserdata will act as if the most recently retrieved metatable is set on them. So, given class Fortress, class Map and class Cell, each with a __tostring that prints the class type, I get the following:
> fortress = ReadFromDF()
> print(fortress)
Cell::Fortress
> map = fortress.Map
> print(map, fortress)
Cell::Map Cell::Fortress

Here comes the funky part:
> cell = map.Get(0, 0, 0)
> print(cell, map, fortress)
Cell::Cell Cell::Cell Cell::Fortress

See? The root object stays the same (it is actually a full userdata), but the light userdata references (cell and map) are set to the latest metatable retrieved.

Trying to debug this with commandline gdb in Windows is not helping. I've been wholly spoilt by Visual Studio's commercial debugger these last few years, and my brain is just too tired to learn gdb properly at this point. Anyone know of any good free mingw32-friendly debuggers (or good GUI frontend for gdb) on Windows, or do I need to whip out the Archlinux and try out KGdb etc?
</technical>

P.S. Don't even mention Visual C++ Express - yes, its free, but the free debugger smokes crundle butt-lint and the compiler can easily be curb-stomped by a furry wambler suffering from gastrointestinal stress.
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.

foradan

  • Bay Watcher
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #147 on: July 10, 2010, 03:47:56 am »

Lightuserdata does not have a metatable.

A value in lua is something like this:

struct {
   lua_type type;
   union {
      void *ptr;
      lua_number_type num;
   } d;
};

Numbers and lightuserdata are fully stored in this structure.  Tables and userdata have the main data pointed to by d->ptr.  There is no space in this structure for a metatable reference.
« Last Edit: July 10, 2010, 03:54:11 am by foradan »
Logged

RCIX

  • Bay Watcher
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #148 on: July 10, 2010, 04:02:52 am »

I don't have any C++ or much art skills, but i can give you a hand with any lua-side problems you may encounter; PM me if you need it!
Logged
Quote from: Naz
Quote from: dwarfhoplite
I suggest you don't think too much what you build and where. When ever you need something, build it as close as possible to where you need it. that way your fortress will eventually become epic
Because god knows your duke will demand a kitten silo in his office.
Quote from: Necro910
Dwarf Fortress: Where you aren't hallucinating.

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Obsidian: A new DF 3D visualizer toolset
« Reply #149 on: July 10, 2010, 04:10:44 am »

<...>
Trying to debug this with commandline gdb in Windows is not helping. I've been wholly spoilt by Visual Studio's commercial debugger these last few years, and my brain is just too tired to learn gdb properly at this point. Anyone know of any good free mingw32-friendly debuggers (or good GUI frontend for gdb) on Windows, or do I need to whip out the Archlinux and try out KGdb etc?
<...>
Am using Codeblocks Ide. It has integrated gdb support. Although might be not as powerfull as VC++ but it's opensource.
Logged
Pages: 1 ... 8 9 [10] 11 12 ... 15