project-navigation
Personal tools

Author Topic: Mapeditor Improvement: Clipper tool  (Read 4160 times)

Offline RudolfoWood

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Mapeditor Improvement: Clipper tool
« on: January 20, 2009, 08:15:41 pm »
There is a bug/feature request regarding the clipper tool. Actually on cutting brushes results look different from expected. Level/content flags are not applied to new faces, shader is set to default (nodraw).

There are different ways how this could be improved:
level/contentflags
1) apply diff of content/surfaceflags of all brush faces to new one (e.g. all have levelflags set -> apply those)
2) apply some voting diff (e.g. most of the faces have one flag set -> apply those flags that have some majority)

texture
actually it seems that texture is set to nodraw. Here we also could set
a) diff texture (if all have the same, set it to new, otherwise nodraw)
b) voting diff: apply the texture that is used by most of the faces

I did not look into the code, but this could probably also be applied to subtract and other face-generating tools.
Any suggestions?

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Mapeditor Improvement: Clipper tool
« Reply #1 on: January 20, 2009, 08:47:34 pm »
I'm not fond of the voting idea. It behaves unpredictably, and that's not good in an editor.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Mapeditor Improvement: Clipper tool
« Reply #2 on: January 20, 2009, 09:26:25 pm »
shader is set to default (nodraw).

This is an option you can set in the editor settings ;)

Offline RudolfoWood

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Re: Mapeditor Improvement: Clipper tool
« Reply #3 on: January 21, 2009, 04:59:24 pm »
I saw that nodraw after my post, I'll have to check how it influences the system...

I got an idea of a third option:
3) try diff, if inconsistent texture is used, pop up an texture selection dialog for new face

Offline RudolfoWood

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Re: Mapeditor Improvement: Clipper tool
« Reply #4 on: February 03, 2009, 07:27:12 pm »
I tested the clipper setting, it does not seem to work for me - results in nodraw texture both enabled or disabled (on a structure that has all sides same texture)
edit: I found by looking into the code that it uses current selection from texture browser as a new texture. This was not known to me and feels somehow not intuitive.

Best solution in my opinion would be something like I stated with 3) which should have been a c) , try to diff from current selection, if not all same pop up a selection dialog with combo : selection from texture browser / nodraw (if checked), textures in current selection and additional button to choose texture (from texture browser).
Opinions?
« Last Edit: February 03, 2009, 07:37:55 pm by RudolfoWood »

Offline richlv

  • Rookie
  • ***
  • Posts: 25
    • View Profile
Re: Mapeditor Improvement: Clipper tool
« Reply #5 on: February 05, 2009, 02:44:44 pm »
contentfalgs are supposed to be the same for all faces, so that's easy - just set the same as the other faces have.

surfaceflags and texture are a bit harder. voting of the remaining faces sounds usable.

popup might be problematic when you keep both sides after clipping - you'd get two popups and maybe you intended to remove on of the sides anyway, so i'd vote against popup.