Idea and I need some input

Discussion in 'Software' started by Deathping, Jul 11, 2005.

  1. Deathping

    Deathping New Member

    Im about to take on the monumental task of designing a unfolding application.
    The trick is Im using the XGL format, something Rhino 3.0 exports. Its a very simple
    xml format that supports mesh, object, texture data.

    Im curious how many of you use Rhinoceros (especially 3.0, older versions might not
    support XGL exports) or if any other 3d modelling application supports it. If not I'll try
    dxf, but either dxf doesnt handle multiple objects, or maybe rhino's exporter doesn't
    get it right..not sure.
  2. wunwinglow

    wunwinglow Active Member

    I do! But I know nothing about XGL, although perhaps I ought to. Still working on that quick tutorial, by the way, but it has been a busy weekend. Real life has a habit of intruding...

    Keep us posted. please!

    Tim P
  3. Deathping

    Deathping New Member

    Made a bit of progress today. c# is wonderful for xml format parsing, and I
    found a nice set of openGL wrappers for c# which just made rendering the
    3d object a breeze. Currently got one of my low poly models rendering in
    the window right now. And now I'm off to figure out how to break the thing
    up and start on some gui elements for the editor :wink:

    Heres a sample of whats working, and a preview of the object in rhino.
  4. Ashrunner

    Ashrunner Member

    Deathping . . . there are a lot of people here who use Rhino 3D in their design process. Most likely many of them are following what you are doing in this thread.

    Every one of the users will be eagerly looking forward to updates.
  5. Deathping

    Deathping New Member

    Thanks for the input, guys. Im still working on it, but I'm spending some
    time on the topic of how to actually select objects while looking at a 3d
    model. Rhino makes it look easy, but coding wise, not so easy =)

    Rght now, the window looks much like rhino 3d's perspective window.
    Now I've got a 3d grid drawn with the object, and I can spin, pan, and
    zoom the model much like how rhino does it (right button to rotate,
    shift + right button to pan, mousewheel to zoom). Also got polygon
    outlines showing too. Might also try the 'ghost render' mode rhino does
    (look in above rhino image, the perspective view is in ghost mode),
    might help looking thru the model when unfolding.
  6. Gefahren

    Gefahren Member

    anxiously awaiting your updates. Anything that adds to the power of Rhino has to be good :lol:
  7. Deathping

    Deathping New Member

    Finally got the object selections there are some slick tricks
    you can do in OpenGL to make that happen. Here's another shot showing
    off a selected object in the model.

    BTW: What do you guys think if I call this app Papercut?
  8. wunwinglow

    wunwinglow Active Member

    Papercut? Ouch. Seriously, good name! Just remember me when you need some beta testing! This is a very exciting project, thanks again Deathping.

    Tim P
  9. Gil

    Gil Active Member


  10. Gefahren

    Gefahren Member

    SkinWrapper sounds good too, but it also sounds like what you need AFTER a PaperCut :wink:

    Maybe we can come up with an idea for companion software!
    I don't have any ideas, but I got names:

    Skin Graft
    Nubs (some Nurb type thing for the short fingered people)
    Transfusion (for after you stop the bleeding)

    Well, you get the idea, I think I've wasted enough of your time, heh :roll:
  11. Gil

    Gil Active Member

    Ok, an old name for my one time decal company, now defunct thank God;


  12. Ashrunner

    Ashrunner Member

  13. Deathping

    Deathping New Member

    Still working on it, now im working on detecting lines that shouldnt show up
    on flat surfaces, and adding some controls to the ui. Note that the line
    removal technique is not perfect, it either misses some edges or doesnt
    display on an edge where a line should show...this is where the application
    becomes difficult. Look at the image and compare with previous image, youll
    notice some lines have been removed, but still some show where they
    shouldnt be...again the math for this is difficult for me, Ill get it right
    eventually. The text on the left is just debug info, you wont be seeing any of
    that in the public release (hopefully soon).
  14. Deathping

    Deathping New Member

    Wow. Turns out rhino was feeding me bad data in the xgl file. Every surface
    in a 3d model has what 3d jockeys call a 'surface normal'. Think of it like an
    imaginary line that is perfectly perpendicular to a flat surface. Well every
    surface in the model has one, and I use that to see if surfaces next to each
    other are on the same plane (aka they form a larger flat surface). Rhino was
    naughty and mangled some of those imaginary lines, so I had to do the
    calculations myself, and now I get perfect line the big surfaces
    look like one big solid, with no lines cutting thru them. Such is the slow
    progress of building a 3d application =)

    The other breakthrough is how I managed to seperate the openGL
    rendering into its own custom control on the window. This allows me to
    create other rendering windows (like a paper layout preview..hint hint) and
    other views. This is pretty amazing for me because a) ive never done
    opengl in c# and b) never created my own custom controls in c# before.
    Big things for me, I'm a geek =)
  15. Deathping

    Deathping New Member

    Bear with me, im still working on the application. Im at the point now where I have to lay down the code that will either unwrap
    the objects automatically, or do it by hand using some of the methods I've seen for unfolding objects in Rhino 3d (select faces,
    rotate/rotate3d to flattened state, repeat). Im kinda leaning towards the second way, letting the user specify the unfold. Some of the
    results I've seen in pepakura make it difficult to build certain objects.

    Also, I would like to give many thanks to all the awesome tips and tricks I've seen on this forum. The model you see in the images is
    something I'm working on, hopefully for a tabletop gaming system (something like Warhammer, but with futuristic sci-fi vehicles
    and such). I've started making a test build of it using techniques I've seen on all the threads where the authors illustrate the process
    as they go. Those threads helped me avoid some major problems with my test build, and I'm seeing some very pleasing results. I will
    post pics of the model in progress, and hopefully get the application running soon as well.

    If youre interested, I can also post pics of how I unrolled the object in Rhino...theres a lot of surfaces on the model now that are
    at strange angles and are not easy to flatten unless you know your snap/osnap tools

Share This Page