MoI discussion forum
MoI discussion forum

Full Version: Hidden line removal progress

Show messages:  1-15  …  196-215  216-235  236-255  256-275  276-295  296

From: Michael Gibson
19 Nov 2013   [#256]
I'll just put all the replies in one message here...



@Carlos
> There's one question: i'm only able to output the 3D view, even when i choose to output
> some other view, Moi still output allways the 3D View. Maybe there's a bug or i'm doing
> something wrong.

Are you setting it by the "Projection view" option in the export dialog? (as opposed to for example just maximizing a particular view)

Do you possibly have a custom CPlane set that has altered the Top/Front/Right views to make them look as if they were a 3D view?

Do other settings on the dialog like enabling outlines on/off work ok?




@Ed
> With MoI I did a lot of design modifications "on screen" before custom-machining several parts.

This is a really cool way to use MoI and the PDF output looks great too!





@Martin
> If there wheren't some important missing lines it would be perfect. Is this my fault (bad modelling) or are you
> able to tune the export to avoid this? If you want the 3dm file let me know.

I think what you're seeing there is if 2 objects are just sticking partially through each other, they just end up hiding pieces of one another and no separate curve for the intersection between the parts is generated. Basically the hidden line removal engine will only generate silhouettes as new things to display, not intersection curves. That's mostly because it can be highly time consuming to try and generate intersections between everything. So usually to get a totally clean output you need objects not to just stick through each other but to be booleaned together so they have edge geometry where they run into each other. You can also use Construct > Curve > Isect to generate intersection curves before doing the output as well. If that doesn't describe what you're running into there, can you please send the 3DM file to me at moi@moi3d.com so I can take a look?




@Max
> Just one thing, that maybe its my fault, but lets say, for example, I make a cylinder, and export the
> front view in dxf. It should be a rectangle, and indeed it is, but at some corners the lines are not
> touching exactly. Am I doing something wrong?

Whether things are hidden or visible is determined by an internal pixel grid, so the resolution of that grid has something to do with the accuracy of how tightly a hidden spot matches up to other things. You can increase the density of the grid to get better accuracy, try adjusting the "Canvas megapixel resolution" parameter up to 30 or 40. Note that this will also generate a higher resolution shaded background image which will increase file size too.

I have a couple of ideas for some things to try to increase the accuracy of this (separate from the pixel grid density) for the cases of edges being hidden because they're crossing over a silhouette. Can you please send me the 3DM model file with the particular cylinder that you were looking at so I have a good known simple example case to work with?

For the moment though increasing the "Canvas megapixel resolution" parameter should help.




@ Stefan
> here are two simple model of mine, as .pdf output with standard settings.

Wow these are looking mighty nice! Crisp and clear. Being able to get this kind of output really easily now opens up a lot of possibilities!





Looking good so far! :)

- Michael
From: Michael Gibson
19 Nov 2013   [#257] In reply to [#255]
Hi Carlos,

> Yep, i was doing it wrong, so no worries. I was saving instead of exporting it.

Actually it's supposed to work the same no matter whether you're doing "Save As" or Export...

But one thing to note is that the view is controlled by the view setting on the dialog, not whether you have a particular view maximized in the modeling UI or not. Is that maybe what you were running into?

Please let me know if you do see a difference in behavior between Save and Export for the view handling, it's not supposed to be like that.

Thanks,
- Michael
From: Martin (MARTIN3D)
19 Nov 2013   [#258] In reply to [#256]
Hi Michael,
quote:

I think what you're seeing there is if 2 objects are just sticking partially through each other, they just end up hiding pieces of one another and no separate curve for the intersection between the parts is generated. Basically the hidden line removal engine will only generate silhouettes as new things to display, not intersection curves. That's mostly because it can be highly time consuming to try and generate intersections between everything. So usually to get a totally clean output you need objects not to just stick through each other but to be booleaned together so they have edge geometry where they run into each other. You can also use Construct > Curve > Isect to generate intersection curves before doing the output as well.


thanks for the (as always) helpful and spot on reply. Yes it is as you say: two seperate objects close together. I can't boolean add them because they are different materials therefore I tried your Isect suggestion. As you can see in the attached PDF Isect does the trick very well.

One question though, when I export the model for use in Cinema4D how should I deal with all the Isect lines. They're not required and shouldn't get exported. Or don't they get exported because they are no 3D objects? You see I'm missing some basic understanding of these things. It's the same with all those control curves which I always delete after an operation because I'm afraid that they make a model too complex.

Attachments:
much better.pdf


From: wastzzz
19 Nov 2013   [#259]
Awesome drawing Martin.

Hi Michael, what I am talking about is: I made a simple cylinder and exported as DXF the front view. Then I open the DXF in MoI or AutoCAD. I notice that in some corners the lines aren't touching if I zoom closer. This brings me some issues for later, for hatching etc.. So first I have to fix the exported drawing myself and extend those lines to join them togheter. This new hidden line feature is a huge step forward that is going to change my workflow in better, it will improve with time. For now, you really did an awesome job. Thank you!
M.
From: Marc (TELLIER)
19 Nov 2013   [#260]
Woohoo!

Quite amazing. One test got line segmentation with a model. It's a quick sketch though and maybe the edges are grazing.

One detail that might be nice: auto detection of a fullscreen viewport for the projection view dropdown menu.




Marc

Attachments:
test.3dm
test.pdf

Image Attachments:
Capture.PNG 


From: danperk (SBEECH)
19 Nov 2013   [#261]
Exceptional work Michael!! :)

Did some testing with copy/paste into Illustrator CS6 and it works perfectly!
If anyone missed it it's here:

http://moi3d.com/forum/index.php?webtag=MOI&msg=6099.1

Tried scaling into Illustrator which worked as expected.



From: Michael Gibson
19 Nov 2013   [#262] In reply to [#258]
Hi Martin,

> As you can see in the attached PDF Isect does the trick very well.

Yeah that looks a lot better! So yeah your original problem was because of that "objects sticking through each other" type thing.



> One question though, when I export the model for use in Cinema4D how should I deal with
> all the Isect lines. They're not required and shouldn't get exported. Or don't they get exported
> because they are no 3D objects?

If you're using OBJ format for getting stuff over into Cinema4D (which would be the most regular way to do it), any curves are just ignored, only surfaces and solids get meshed and exported out to OBJ format. So generating intersection curves shouldn't make for any change in your OBJ exports.

If you're doing something like exporting using IGES format and using some IGES import plug-in for Cinema4D to import, then that could be different.

If you don't want those intersection curves around you can use Undo to go back and erase them after you've done your PDF export, or assign them all a particular name after creating them so you can use the scene browser to hide them or select them all later on for deletion.

- Michael
From: Michael Gibson
19 Nov 2013   [#263] In reply to [#259]
Hi Max,

> Hi Michael, what I am talking about is: I made a simple cylinder and exported as DXF the front view.
> Then I open the DXF in MoI or AutoCAD. I notice that in some corners the lines aren't touching
> if I zoom closer. This brings me some issues for later, for hatching etc..

When you export to DXF format, the DXF export options dialog also has a "Canvas megapixel resolution" option in it - try increasing that from the default of 15 to something like 30 and that will increase the accuracy of the hidden line generation, you'll still have some gaps but they will be smaller.

I'm going to see if I can improve this further though. There will still likely be various kinds of cases where you will need to do cleanup of things in order to make a closed outer boundary for things like outlines where the outline is at a spot with multiple different surfaces all contributing to it.

For a cylinder case where it's one edge that's getting hidden because it's wrapping around to the hidden side, I think I can do something to get that situation tuned up without too much fuss though, I'll see.

- Michael
From: Michael Gibson
19 Nov 2013   [#264] In reply to [#260]
Hi Marc,

> One test got line segmentation with a model. It's a quick sketch though and maybe the edges are grazing.

Yeah it's fairly easy for that to happen when you've got 2 different solids that are kind of hanging out right on top of one another. If you get things like that booleaned together into one single object it should usually help to avoid it. There is some extra stuff in the hidden line removal processing that helps to avoid an edge getting submerged inside of surfaces that it's a direct part of - when you've got 2 separate objects just sitting next to each other that extra anti-stippling won't get engaged.

So for your particular case here, select these 3 objects up here:



Then do a Boolean union to get those combined together into one single solid. At this point MoI's viewport display may actually look slightly worse with some bleed through that wasn't happening before. But the hidden line export handles bleed through a lot better than the video card display does, and your actual PDF/AI export should not have bleed through and the stippling that you saw before should also be gone:





> One detail that might be nice: auto detection of a fullscreen viewport for the projection view dropdown menu.

Maybe I can add in a choice of "Active" in that Projection view dropdown that would then use the active viewport. The active viewport is the maximized one if there is a maximized view currently, otherwise in a split view it's the one your mouse is currently over or the last clicked one if your mouse is not currently over one.


It would be cool to see some nice test results too, not just bad ones! (bad ones are good for me to see too though of course) :)

- Michael

Image Attachments:
marc_stippling1.jpg  marc_stippling2.jpg 


From: Michael Gibson
19 Nov 2013   [#265] In reply to [#261]
Hi danperk, that's a great looking result!

> Did some testing with copy/paste into Illustrator CS6 and it works perfectly!
> If anyone missed it it's here:

A couple of other notes on copy/paste to Illustrator. There was a bug in the previous beta on the Mac for using AI format to copy/paste into Illustrator, that should be fixed now. The main difference with using AI format (instead of PDF) is that the layers come through when using AI format (if the setting for "Paste remembers layers" I think it's called in Illustrator is enabled).

Also, at least on CS2 there is a quirk for the shaded background image when doing AI version copy/paste - the actual image is stored in the temp folder, and it may not initially display in Illustrator for some reason. However, if you select the image and click the "Embed" button on the toolbar to switch it to an embedded image rather than a linked one, then it shows up.

So if you do AI version copy/paste into Illustrator use that embed button to get the background image to behave properly. It's pretty easy to select the background image because it's usually a fair amount bigger than the objects, just click a little away from the objects and it will select and the Embed button shows in the upper toolbar. It's possible this may not be needed anymore in recent Illustrator versions, I'm not sure about that.

- Michael
From: Martin (MARTIN3D)
20 Nov 2013   [#266] In reply to [#264]
Hi Michael,
quote:

It would be cool to see some nice test results too, not just bad ones!


sure, we just need some time to learn how to get good results. Hows about this :-)





-Martin

Image Attachments:
tremolo.png  vise.png 


From: Michael Gibson
20 Nov 2013   [#267] In reply to [#266]
Hi Martin,

> sure, we just need some time to learn how to get good results. Hows about this :-)

Tremendous! All the different ingredients (shaded background, silhouettes) just come together so well there.

It's so great to see these cool results, thanks very much for sharing them!

- Michael
From: mattj (MATTJENN)
20 Nov 2013   [#268]
Im using the new v3 beta on a mac with Mavericks and its not good. I can drag the moi window from one screen to another and the export function to ai or pdf stops after naming the file . .. anybody else have these problems?
From: run
20 Nov 2013   [#269]
Michael,

Something strange is going on with the Illustrator copy buffer in regards to Photoshop.

I know Photoshop hasn't been the direct target for this feature during developement, but it worked flawlessly with it in the previous(Aug 13th) beta.
Which isn't unexpected since copying and pasting curves between Photoshop and Illustrator has been a feature since at least since CS2.

The behavior is somewhat erratic, but most often when you attempt to paste in Photoshop, you'll get the paste UI as expected, but
when you choose 'OK' the following error is thrown, 'Could not complete the Paste command because the source rectangle is empty'
Any assortment of solids in Moi should demonstrate this issue.

Sometimes it will work correctly(not sure why), though if you use the 3D viewport as the source what you get in Photoshop is usually flipped vertically.

I've attached a .3dm that demostrates this last problem. Load it into the latest beta. Don't adjust the camera in any way and select the curves.
Copy it to the Illustrator copy buffer, with 'Projection View' set to '3D'. Paste into a Photoshop document as 'Path' or 'Shape Layer'; it will work but
the result will be flipped vertically. Now orbit the camera to a different position and try another copy/paste, sometimes this fixes things and sometimes it doesn't

This issue isn't a complete roadblock, you can paste to Illustrator then immediately copy and paste into Photoshop and everything works as expected every time,
so more like a construction detour blocking that nice shortcut you just discovered the other day.

-Jeff

Attachments:
photoshop_tester.3dm


From: Michael Gibson
20 Nov 2013   [#270] In reply to [#268]
Hi Matt, I think there are some problems in Mavericks with trying to move the window to different monitors. If I remember right, it's a general problem like the title bar gets lost or something like that, I'm a little surprised that it would have anything relating specifically to AI export.

But basically don't move the window to different monitors on Mavericks right now - Apple made a lot of changes to how multi monitor things work in Mavericks and it may take a while before fixes for the new problems that it caused trickle down into the libraries that MoI uses.

Does it work ok if you leave MoI on the same monitor instead of moving it to a different one?

- Michael
From: Michael Gibson
20 Nov 2013   [#271] In reply to [#269]
Hi Jeff,

re: 'Could not complete the Paste command because the source rectangle is empty'

Does this happen only if you are generating a shaded background image? When the dialog comes up at export time, try unchecking the "Shaded background" checkbox to do a curves only export without any image. Does the problem still repeat when doing curves only or not?

There were also a couple of changes in this new beta to put a bit more assorted information (like hi res bounding box, AI file version number, a couple of things like that) into the header part of the AI file, if you still see the problem without any image then it's probably related to that.

- Michael
From: wastzzz
20 Nov 2013   [#272]
Damn! That Floyd Rose is so appealing to my eyes I wanna eat it! Nice job. :)
M.
From: MajorGrubert (CARLOSFERREIRAPINTO)
20 Nov 2013   [#273]
Hi Michael,

> i'm only able to output the 3D view

I think i've found the reason for this behaviour: It happens when using MilkyWaif UI, the export options window popup that show up its different from the actual (v3 Beta Nov.) and always export only the 3D view.

With the default UI it work nicely. So, i'll stick with the default UI, although i loved MilkyWaif UI.

Thanks.

Carlos
From: Michael Gibson
20 Nov 2013   [#274] In reply to [#273]
Hi Carlos, yeah you can't really copy old versions of the full UI over top of a new release, when you do you're effectively erasing any changes that were implemented for new features.

Like in this case the AI dialog is pretty different compared to the old version, because there are a lot of new options for it to control.

Instead of copying the entire \ui folder over (which for sure will cause problems), you could instead try to only copy a small number of key files like moi.css and specific images that were changed, that has a better chance at working but even then if the new release has changes to moi.css which happens sometimes you will still run into the same problem.

This problem of trying to incorporate UI changes for new features along with personalized changed to previous UI is a kind of difficult problem to solve, it's one of the reasons why I have not really focused on UI customization so much.

- Michael
From: run
20 Nov 2013   [#275] In reply to [#271]
Hi Michael,

>Does this happen only if you are generating a shaded background image?

It's inconsistent. If turned off, solids will sometimes stop throwing the error but the result is still flipped vertically.
Turn it back on and it continues to NOT throw the error. Orbit the camera, still okay. Orbit the camera some
more and eventually it starts throwing the error again. It's weird, it's almost like the buffer data gets corrupted
at least in regard to Photoshop. And once that happens it keeps throwing the error and doesn't care whether
the background image is on or off.

The previously attached .3dm is curves only and should always paste, albeit flipped, but sometimes curves only
will also throw the error if selected curves match the edges of unselected surfaces.

-Jeff

Show messages:  1-15  …  196-215  216-235  236-255  256-275  276-295  296