Jump to content
The Dark Mod Forums
Sign in to follow this  
OrbWeaver

Scenegraph

Recommended Posts

I tested the new build with the scenegraph changes, and it works fine so far :)

 

Most of the hangs I reported are gone, I only got one so far. Also, "revert to worldspawn" truly no longer crashes - yeehaw!

 

There is only one minor thing, whenever I convert some brushes to an "func_static", I get a small black box at its origin in D3. Does this happen for anybody else, too?


"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Share this post


Link to post
Share on other sites

That was something that has been fixed as far as I can tell. Are you sure you downloaded and tried "exp6" ?


shadowdark50.gif keep50.gif

Share this post


Link to post
Share on other sites

Also make sure you're working in the trunk again. I've merged the scenegraph changes into the trunk yesterday (or was it the day before?), so you can switch back now.

Share this post


Link to post
Share on other sites

Another status update: I've got a first experimental layering implementation finished. The user can assign the selection to certain layers, move them into layers and switch the visibility of layers (either via shortcut or via the so-called LayerControlDialog). The objects disappear as soon as none of their associated layers is visible anymore.

 

What's missing:

- Layers cannot be created yet.

- Layers cannot be renamed yet.

- Layers cannot be deleted yet.

- Layers cannot be saved/loaded along with the map yet.

 

Basically, the proof of concept is done, now it's just a matter of finding enough time to flesh out everything. :)

Share this post


Link to post
Share on other sites

Next step is done: The GUI elements are mostly complete now, except for "Rename Layer".

 

This is what it looks like:

 

layers.jpg

 

The user has the option to create new layers in the so-called LayerControlDialog (see top right). The layer visibility can be controlled by the toggle buttons, this is also possible via keyboard shortcuts.

 

In the orthoview's context menu, the user has the option to add the selection to a certain layer, or to move items to a certain layer. The option to remove them from a layer is not yet done, but this is easy.

 

The next large step is to make the Layer information persistent by saving it next to the map file. I already have a plan to do that.

Share this post


Link to post
Share on other sites
Also make sure you're working in the trunk again. I've merged the scenegraph changes into the trunk yesterday (or was it the day before?), so you can switch back now.

 

The switch back did go wrong, so I ended up deleting everything and did a clean checkout of thee trunk and compiled it. The "black box at func_static" appeared after this, which was revision 3262 (or so).

 

Now updated and compiling, will report back when it is finished.


"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Share this post


Link to post
Share on other sites
Amazing work sir, as always. :)

 

Can only underwrite this!


"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Share this post


Link to post
Share on other sites

I think I'm done with the layer stuff now. Layers can be assigned and the information is saved into a separate MyMap.darkradiant file.

 

I'll try to sum up what has been changed:

  • Layers can be created and deleted via the LayerControlDialog (default shortcut is "M").
  • Their visibility is toggled via the togglebutton on the left of the dialog.
  • Nodes can be added to, moved to or removed from a layer.
  • Nodes can be part of one or more layers (but must be part of at least one).
  • A node is visible, if any of its layers is visible - in other words, a node is hidden when all its layers are hidden.
  • The context menu (see shots in a previous post) is the intuitive way of assigning items to layers.
  • If a Node is removed from all layers, it "falls back" into the Default layer "0".
  • If a Layer is deleted, all nodes will be removed from it (the previous item applies here).
  • The node-to-layer mapping is saved into the .darkradiant "Map Information File" and restored upon map load. This has been implemented just a couple of hours ago, so this requires some more testing.
  • There are shortcuts for "MoveSelectionToLayer" #0 to #10, "AddSelectionToLayer" #0 to #10 and "RemoveFromLayer" #0 to #10. The visibility can also be toggled quite easily via shortcuts ("ShowLayer0" to "ShowLayer10" and "HideLayer0-10").

What does not work yet or is likely to cause problems:

  • "New Map" doesn't clear the existing layers and their names.
  • Renaming layers is not implemented yet.
  • If the map is opened in DoomEdit or the savegame is modified such that the order of the elements gets changed, the node-to-layer mapping will be messed up. The actual map data is safe, but there is no easy way to preserve the layer settings when the map is altered by another program. In that case, people will have to re-do their layer mapping, moving all elements to Layer 0 and start afresh.
  • A separate "Layer" menu is planned which will provide some more convenience methods like "Select all items in Layer 0", etc. Future stuff.

A new snapshot build is up on the FTP: http://208.49.149.118/TheDarkMod/DarkRadia...t-0.9.6pre2.exe

 

Please check it out and post back here. :)

Share this post


Link to post
Share on other sites

I also can't load any maps, always crashes.


shadowdark50.gif keep50.gif

Share this post


Link to post
Share on other sites

Confirmed, I create a brush and add it to a layer, but then when I toggle the layer off, it stays visible. (Edit: that's because it's ADD, not MOVE -- this means it also belongs to default)

 

I'm going to jot down a simplified workflow because this can get complicated quickly.

 

- start up DR; Default layer is on

 

- if I drag a brush now, it appears to be automatically added to Default (good). If I toggle the layer, they vanish (good). If I drag a brush now, it is created, but invisible (not good). I think it'd be preferable if NO brush could be created if no layer is visible. Otherwise, especially with brush dimensions turned off, we'll get people making invis brushes without knowing or understanding what's going on.

 

- now, Default is on, and I create a new layer, "A". Both are on.

 

- I drag a new brush. What does it belong to? Both? I'm not sure, but I'll assume both, since both are enabled. However, it only appears with Default on, not with A. So in fact, it belongs to Default. (okay, but confusing; better than it belonging to A and not Default, I suppose. If users know to expect this (brushes are only created to Default, ever), then it's fine)

 

- Now A is on, and Default is off. I drag a brush, and again, I get invisible brush with dimensions. So, even though a layer (A) is on, I'm getting an invisible brush drawn to Default (off). This, IMO is a problem, and the brush should go to the visible layer (A in this case).

 

- One possible method of enforcing strict rules: Default is always on, no choice. From there, the user must manually push objects into layers. If the layer is off, they're hidden. If it's on, they're shown. If they're not assigned, they stay on all the time, contained within Default.

 

Back to it...

 

 

Edit: context menu items for layers are enabled when nothing is selected

 

Edit: I think I'm understanding a bit better, not sure I've found any real bugs yet, except (1) the ability to create brushes with no layers on at all. That and (2) the concern about there being no untogglable/base layer (though I'm not sure that is necessary or not). But wow this is crazy powerful. You can even have multi-piece func_statics, and assign part of that unit to one layer, and another part to a different layer. :blink:

 

Edit: Suggestion: (3) Enable All / Disable All buttons or shortcuts

Share this post


Link to post
Share on other sites

I get crashes here too, so I'll look into that one. Strange, I tested it right until I built that snapshot and it always worked, but I'll get that one too.

 

edit: crash is fixed, new build is up here: http://208.49.149.118/TheDarkMod/DarkRadia...t-0.9.6pre3.exe

 

@SneaksieDave: Thanks for testing so far. :) I haven't thought about the issue with newly created brushes being assigned to the invisible default layer. I'm open to any reasonable suggestions here. Either have the default layer always on, as you suggested or let the brush be part of the topmost visible layer, or all visible ones? This might need some more thought.

 

About your suggestion (3): What do you mean here? Do you want to enable/disable the visibility of all layers by a keyboard shortcut, for instance?

Share this post


Link to post
Share on other sites
Either have the default layer always on, as you suggested or let the brush be part of the topmost visible layer, or all visible ones? This might need some more thought.

My thoughts exactly; I'm not sure which was to go (if either) at the moment.

 

About your suggestion (3): What do you mean here? Do you want to enable/disable the visibility of all layers by a keyboard shortcut, for instance?

Heh, I was outside and thought, "I didn't explain that very clearly, I should go clarify..." then I came back in and forgot to do so. What I meant specifically there was basically, Show All Layers / Hide All Layers. Although, I also like the idea of Select All From Layer (which you mentioned), as that can stand in for SuperGrouping (at least until/if DR gets it officially). Assign all parts of a would-be SuperGroup to a Layer, and then Select All From Layer in order to manipulate it as a whole.

 

 

Edit: Thinking about it, I think that:

let the brush be part of the topmost visible layer, or all visible ones

is introducing a lot of complication. If the user had four of seven layers on, and then added a new brush, it now belongs to all four visible. Ouch, if they care where it lies, that becomes a maintenance nightmare. I think it belonging to Default is best. As for allowing for turning off Default? Hmmm.....

Share this post


Link to post
Share on other sites

Btw, I refreshed that exp3 build link above and it also fixed the problem with the context menu items being sensitive even if nothing is selected.

 

Heh, I was outside and thought, "I didn't explain that very clearly, I should go clarify..." then I came back in and forgot to do so. What I meant specifically there was basically, Show All Layers / Hide All Layers. Although, I also like the idea of Select All From Layer (which you mentioned), as that can stand in for SuperGrouping (at least until/if DR gets it officially). Assign all parts of a would-be SuperGroup to a Layer, and then Select All From Layer in order to manipulate it as a whole.

"Show/Hide All Layers" commands are not a problem, I'll implement that.

 

is introducing a lot of complication. If the user had four of seven layers on, and then added a new brush, it now belongs to all four visible. Ouch, ...

Yes, I tend to agree here. This is not a userfriendly solution.

 

I think it belonging to Default is best. As for allowing for turning off Default? Hmmm.....

What about letting the user select the current "working" layer? All new items go to a specified Layer, and the user can change that setting to any visible layer.

Share this post


Link to post
Share on other sites

Ack! It says that pre3 is corrupt. File size 5396kb (about 1Mb too small). I'll try it again, but I got no download error.

 

Edit: I see your mention above; I probably downloaded some franken-file. Trying the newest.

Share this post


Link to post
Share on other sites

Please try again, the upload should be complete now. It's about 6.6 MB. Sorry, I was re-uploading another build while you were typing.

 

edit: nevermind.

Share this post


Link to post
Share on other sites
What about letting the user select the current "working" layer. All new items go to a specified Layer, and the user can change that setting to any visible layer.

Hm, that could work and be friendly. I assume you mean to force them to choose one, and perhaps if it's active, it can't be toggled off? That way, it'd be both safe and flexible.

 

Edit: Confirmed: no loading probs, and context items are disabled with no selection.

Share this post


Link to post
Share on other sites
Hm, that could work and be friendly. I assume you mean to force them to choose one, and perhaps if it's active, it can't be toggled off? That way, it'd be both safe and flexible.

Either have that working layer non-toggleable or automatically fall back to another visible layer if the working layer is hidden. What do you think?

Share this post


Link to post
Share on other sites

Can you please post an item on the tracker regarding this issue? I almost certainly will forget about that otherwise. :)

Share this post


Link to post
Share on other sites

I uploaded a new build (exp4) to the FTP: http://208.49.149.118/TheDarkMod/DarkRadia...t-0.9.6pre4.exe

 

The "default working layer" thing is not yet implemented, but I fixed a couple of issues with regard to Layering:

 

- reverting func_statics did not update the visibility status

- layers were wrongly saved in maps with missing models

- layers were wrongly restored in certain cases

 

I tested saving and loading layers in the bonehoard map and it worked so far, so this should be stable now.

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...