To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 7198
    The use of type 5 lines for smoothing of objects. —Martijn Zwaal
   Hello people, this is my first post. A few weeks ago I mailed with Travis Cobbs and Lars Hassing about an algorithm I constructed to make objects look smoother. This can be done by using per vertex normals and smooth shading. The normals can be (...) (22 years ago, 8-May-02, to lugnet.cad.dev)
   
        Re: The use of type 5 lines for smoothing of objects. —Travis Cobbs
     (...) One thing that someone noted (I think it was Don Heyse) when I mentioned this was that it might be possible to instead check for the lack of type 2 lines of color 24 between two adjoining faces, and use this as an indicator that the two faces (...) (22 years ago, 8-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Martijn Zwaal
      (...) indicator (...) on (...) places (...) having (...) This looks indeed like a more general way to do it. A big problem however will be complex patterns on a face, like on a shield. There will be a lot useless checking, because for every edge in (...) (22 years ago, 8-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Kyle McDonald
      Hmmm, Finally a use for the type 5 lines I've been ignoring :) (I have another - so far successful - way of drawing in those lines) (...) Well alot of this leads in a direction I've mentioned before. Which is adding strip and mesh info into the (...) (22 years ago, 8-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Don Heyse
     (...) I tend to agree with you. My suggestion to Travis was based on about 2 seconds of thought when I read his email. It occured to me that type 2 lines are used to denote hard edges so I mentioned the possibility of using them instead of type 5 (...) (22 years ago, 8-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Martijn Zwaal
      "Don Heyse" <dheyse@hotmail.spam....away.com> wrote in message > >Perhaps we could solve the speed problem by inserting a comment before (...) This sounds possible. The only problem is that they all have to be inserted as comments because older (...) (22 years ago, 8-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Martijn Zwaal
     Hello, I am not able to get a demo ready today : ( , maybe I have some time in the weekend to finish it : ) . bye, Martijn (22 years ago, 9-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Martijn Zwaal
     Hello, my demo is ready. If you would like to try you can mail me. I will sent it back as an attachment including instructions, bye, "Martijn Zwaal" <zwaal@science.uva.nl> (22 years ago, 12-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Don Heyse
     (...) I wish it could zoom, and the spin seems backwards, however the smoothing looks quite nice in some spots. Especially the shoulders of the horse and the minifigs. The horse's belly and the backs of its legs don't smooth though. Probably because (...) (22 years ago, 13-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Martijn Zwaal
     You can move forword , backward and go left and right using the arrow keys. The rotation has to be fixed. It now rotates about the x- and the y-axis of the object instead of the screen axis (got to do some math to fix that). In the hollow places (...) (22 years ago, 13-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Travis Cobbs
     (...) Just out of curiosity, where is the light source in your demo program? The specular seems to be showing up at really odd times. I can't tell if the surface normals are pointed in the wrong direction or if the light is an unusual place, though. (...) (22 years ago, 14-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Martijn Zwaal
     You were right about the strange reflections. By accident I had put my light source behind the scene and had the facing flipped. Now I have put a directional light straight at the scene with 'non viewer dependant' specular highlighting. This looks (...) (22 years ago, 16-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Travis Cobbs
     (...) OK, the lighting is definitely much less confusing now, and it's much easier to do the rotations. About the spheres not joining properly: are you applying the surface normal averaging at the dat file level, or at the part level? If you're (...) (22 years ago, 17-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Martijn Zwaal
      (...) normal (...) the (...) I somewhat disagree with that. I do averaging at Dat file level and you can see that it works for cylinders. There should be no difference between connections of cylinder segments and sphere segments. If you inspect the (...) (22 years ago, 17-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Travis Cobbs
     (...) I guess I misunderstood your normal calculation. I thought you were basing it on the normals of the the faces, not the normals formed by the type 5 lines and their control points. Using the control points makes sense, except for one problem. (...) (22 years ago, 17-May-02, to lugnet.cad.dev)
   
        Re: The use of type 5 lines for smoothing of objects. —Martijn Zwaal
     Here follows a more explicit form of the algoritm: For each dat file I make a map called Vertex2Normal When I move the dat file I do the following thing for each optional line: I call the 4 vertices in the line P0, P1, P2 and P3. Then I look at the (...) (22 years ago, 13-May-02, to lugnet.cad.dev)
   
        Re: The use of type 5 lines for smoothing of objects. —Travis Cobbs
     (...) Well, I added an initial go at Martijn's suggested algorithm to LDView (with some modifications here and there), and the results look extremely promising. Here is a sample: (URL) that this was rendered with Primitive Substitution disabled, so (...) (22 years ago, 20-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Martijn Zwaal
     (...) (with (...) the (...) helmet, (...) entirely (...) I was able to reproduce the exact glitches you saw. They are due to round off errors in the coordinates. Your map sees a difference e.g. between point (1.9999,0.0000,0.0000) and point (...) (22 years ago, 20-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Travis Cobbs
     (...) I think I listed most of them, but here are the ones I can think of: Calculated per part, not per dat file. Only calculated when an edge is an exact match with a type 5 line; this requires some extra work to accomplish. Completely ignore the (...) (22 years ago, 20-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Don Heyse
     (...) If you ignore the type 5 control points, what points do you use to generate the cross products? I would think to generate "fair" lengthy vectors you'd have to use the center of gravity point for the adjacent quads or triangles. Otherwise you (...) (22 years ago, 21-May-02, to lugnet.cad.dev)
    
         Re: The use of type 5 lines for smoothing of objects. —Travis Cobbs
     (...) I only use the actual (un-normalized) normals of the faces adjacent to the type 5 line. It's a little more complicated, because when a single point has multiple type 5 lines radiating out from it, the surface normal I compute at that point (...) (22 years ago, 21-May-02, to lugnet.cad.dev)
   
        Re: The use of type 5 lines for smoothing of objects. —Lars C. Hassing
   On May 08 Martijn Zwaal wrote in lugnet.cad.dev: (...) Hi Martijn, that's a brilliant idea!! I have always regarded optional lines as only a mean for drawing the outline/contour on curved surfaces. But optional lines are actually a valuable (...) (22 years ago, 22-May-02, to lugnet.cad.dev)
 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR