Problem: Knife Tool Strange behavior

I will take a look tomo first thing in the morning. I am hoping that the solution u gave should solve the problem. good to know the dev knows about it. :). thanks both of you for the tips. goodnight . am off to sleep now.

DruBan . I tried all your methods and still no luck . you guys using windows or linux? . this is really weird :frowning: …btw. we are on linux .

for now i have asked the artists to always use the remove doubles tool once they finish using the knife tool … its annoying but works

Well that definitely looks bad! I am on Windows.

Are you using a mouse or a tablet? Are you using a mouse that requires a special driver? Could there be a resolution problem with your graphics card? Does this happen on another machine or do you have just one to test on?

It’s really weird that I absolutely cannot replicate that. I was thinking that it was more of a misplaced cut issue, but it looks like a double vertex being made!

hi DruBan . i am using mouse … there is no problem with my graphics card . the problem is studio wide with different models of graphics card . all nvidia based . even i am stumped . because the problem is not even consistent . while some artists work without any problem with the tool , some have too many problems . for some its just a matter of changing from othro to prespective or vice-versa. :frowning: .

All Linux, all the same version of Blender? The same file (e.g. the bird foot) with the same knife action has a different outcome on different machines?
This sort of thing just drives me crazy, there must be something that happens to cause it, it’s not rolling dice, it’s a computer program.:spin:

I finally managed to reproduce the bug on your model, and it has nothing to do with the subdivision surface as i could reproduce without any modifier, as i can reproduce now nearly all the time (that’s the oddity, depending on how i cut sometime it does not produce the bug) i reported the bug :

I uploaded a blend in the bug report with edited view/settings so people can load it with “Load UI” and have the same exact start to make their cuts so they can reproduce the bug more easily (though i can’t reproduce the bug 100% of the time, sometime it cut as expected, sometime it’s just broken):

Then you can move some vertice and see the doubled ones at cut locations :

the Bmesh knife has been introduced a bit more than 2 years ago to replace the old knife, there have been many fixes to it, but from this model it’s obvious it still has bugs, the code was certainly a big buggy mess at the start to still be buggy after 2 years of bugfixes.

Yes … All linux … all running the same version of blender from a centralized location . sorry i wasnt clear enough . the problem is different on different files … but they are all consistent with the same files on different machines . if a blend file doesn’t work good with ortho view then its the same in all machines . same goes to the one that fails in perspective view . :eek: . I found out one thing though . check out this video in top ortho and user ortho :slight_smile: … looks like knife tool is really badly designed . :frowning:

Additionally, Blender has the “Knife Project” that is usefull, but it rely on the knife actual code to work, so if the knife isn’t always reliable, it means the knife project isn’t always reliable.
I hope the devs will focus a bit on it, such an important tool should be working reliably, not only “most of the time”.

Could anybody take a look: i feel knife fails if line is drawn over closest half of edges here (blue dots representing middle of the edge).
Linux 64 bit, reasonably fresh buildbot’s build, cheap Intel graphics.

If the view is more close to Top error wont happen.


Edit: Seems it was false alarm. Also, while removing doubles and recalc normals /apply scale did not remove knife making doubles, bringing model in Meshlab (as stl) and back as obj made knife get back to normal behavior. At least i could not get it to produce doubles anymore.

I think the tool is flawed by design . Can we change the thread topic from SOLVED to something more relevant? Any workaround just hampers the modellers ability to model efficiently . this is really bad … i totally agree with Sanctuary . after so many years, a basic , necessary tool like this should have been stressed to work properly . what good is a high-rise building without a proper foundation?!

Hold on. Going to have to disagree with you there. The design is fine, it’s just throwing a quite rare exception that’s not getting caught. If we scrapped everything in this world that has less than 100% functionality what would be left?
In my experience the knife tool is very close to 100% correct. Any failures are neither crashes or corrupted meshes and so are easily fixable. In fact I still can’t reproduce the problem that you are having, but Sanctuary has, and filed a thorough report.

And the Knife is hardly the ‘foundation’ of Blender! It’s a shortcut tool that collapses a tedious sequence of subdivides and joins into a single action. Try it. You can reproduce what the knife does quite easily - just very, very slowly.

U mean to say that its ok is a production studio to make a model - “just very, very slowly” ? . :eek: . ok, and if the tool has too many problems(might be rare in your case! ) … its design is fine?! :confused: . and if the design is bad … u need to scrap it?! :(. in my experience a bad design, most of the time, can be corrected by adding a few extra steps into the design or removing unwanted steps that complicated the algorithm if approached inteligently . i for one never stumbled upon a knife tool in a modeling software that has so many random problems. hmmm. may be its the modelers problem because they use the knife tool 99% of the time sub-consiously? .

Yes . i agree the knife is not the “foundation” of blender . but isnt modeling stage the starting point of any cg-production? if blender has to be used in a proffesional production environment, is it ok for modeling stage to be delayed or for profesional modelers to constrain their modeling skills or get annoyed ? . for me a tool like knife tool SHOULD work 100% of the time . if it isnt then there is seriuos problem . at least from proffesional production point of view.

Nope, if you read more carefully I was saying that the knife allows you to NOT have to work very, very slowly.

And I said if the tool has very few problems the design is fine.

Yes, I believe if the software DESIGN is bad it should be scrapped and redesigned. No coder should have to try to make poorly designed code functional, this rarely results in anything but a temporary alleviation of the problem. But I believe the design of the knife tool is robust and that there is a small exception that it’s not catching.

We may be using the word design in different ways. No need to try to explain to me what it means to you: I become fretful when I am proved to be less smart than I think I am.
It’s unfortunate that it’s your file in particular, but in general I believe most people are using the knife tool regularly without problems.

In my experience professional production people don’t get annoyed, they find a way around and keep producing. Not one ‘professional’ CG artist I know finds their suite of programs to be error-free. I may be luckier than you in that regard.

I am glad that a bug report has been filed. From my point of view, though, if it has to be viewed in a particular file to see the bug, then the conclusion has to be that the file is corrupted, not the code.

This is probably all that can be productively said on the subject AFAIAC, until someone who has looked at the code can contribute something.

your point of view or mine doesnt matter . . I just want the knife tool be fixed and thats it ! . i dont even care wot you belive or think of others in a couple of posts !!! :rolleyes: . and if you are satisfied with “works most of the time” . i am cool with it and happy that it works for you :slight_smile: .
fyi - there is level of errors that could be taken by an artist . a tool which is used everytime (like the knife tool) SHOULD simply work. and a tool that is less used can have errors with different tolerance levels . so please dont get emotional or fretful about the “design” issue i mentioned . i know those emotions come from a fandom attitude towards something you love .
As you said, may be the design is good . its your opinion and i seriously dont care . as long as the problem gets fixed or hopes of it getting fixed, I am a happy man :yes: .

Blender is a bit too much about workarounds, and that is absolutely not the way the developers wanted and designed Blender to work, i would prefer to explain to users how to use a tool instead of explaining them on how to use a workaround because a tool is defective. Too many of my replies in support boards are about workarounds.

I hope the bug will be fixed, the knife tool code is not one that should have defect and work only “most of the time”, that code is used by other functionality and addons too, leading them into not working correctly 100% of the time because the source of their code does not work 100% of the time.

@Sanctuary - this is an issue with float imprecision, when projecting from 3d into screenspace.
I spent some hrs on this and found that the checks for snapping needs to be scaled by the zoom level to be reliable,

Committed fix:
https://developer.blender.org/rB1510d0d4417c4ec91b19f06fac6f62ad7df3275b

Tried scaling up by 1000 and down by 100, in both editmode and object mode, ortho and perspective views. - And it works correctly.

@DruBan - software design may be improved, but float precision issues can’t be completely avoided if you want to keep any kind of performance. So at extreme limits you will likely be able to break the knife tool still.

That said, there are some improvements that could be made to the knife tool, I plan to do eventually - fix handling of convex ngons and reduce possible errors ray-casting, but for now it works fairly well AFAICS.

If anyone manages to find bugs in the knife tool please report them, I think we’ve improved it quite a bit since it was added initially, but there may be corner cases we miss.

https://developer.blender.org/rB1510d0d4417c4ec91b19f06fac6f62ad7df3275b

Fixes just this year…
https://developer.blender.org/rBa815e04f723c8d8bcd6d9fa778598a330795f7f2
https://developer.blender.org/rBc1be7e12ee3cb853769f63d4da1747b838908411
https://developer.blender.org/rBf2f3ef869237116cea90b8cd0bdaddc43c7f0af3
https://developer.blender.org/rBcd9aed7059b5660f993fc2b80284fffe49b372a1
https://developer.blender.org/rBd2920e9876700653f89d96cd7079ff48b6d5d2ae
https://developer.blender.org/rB71c11dbb02e3f41ae5c1e3c965fae0ce89ae4898
https://developer.blender.org/rBe848cb9e48541cebe6bf47674e6db71d152d759f
https://developer.blender.org/rBf9b7617104a74d9b1a267a775627cdad60e0e333

Thanks for making it better, Ideasman. Float imprecision is EXACTLY the kind of exception that I was talking about, in that if it is constantly causing a problem then it is badly designed code, but if it is a very rare problem then trying to make it 100% percent precise all the time means that memory usage and slowdown makes tools unusable.

@DruBan,. issue new users often run into is they do some stuff which pushed float precision limits - like add object - scale to make it tiny (0.001) - then scale mesh up in editmode…, and find tools act a bit strange, Ideally we can make tools work in every case - but you hit limits, typically the’re not that bad if you learn to work within them.

& fixed another knife bug :slight_smile: https://developer.blender.org/rB818a036c1af2792d78069b70ef8e5f6423c348cf

Thank you for the fixes !