Results 1 to 9 of 9

Thread: 3D reccomendations

  1. #1
    Join Date
    Dec 2010
    Posts
    55
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default 3D reccomendations

    I am using QT 4 and I need to add a display for a custom CAD format. It consists with a list of 3D points (x,y,z), then a definition for each 3D object using the points (Trapezoid/Triangle, elliptic plate, elliptic cylinder, elliptic cone, Ellipsoid, Circular paraboloid, Elliptic hyperboloid, and Circular torus).

    There are probably 300000 3d objects I need to draw, mostly trapizoids/triangles but I need to support all of the above types.

    The user will need to be able to use the mouse/keyboard and rotate, zoom, pan. Other than that no animation. No fancy backgrounds/texturing. Click on an object to get the object ID and do something with it. I may also want to highlight specific objects or draw some lines pointing to objects. That is about it.

    I did some work using Coin3D maybe 10-15 years ago.

    I think things like rotating using the mouse, zooming using the wheel, panning with the keyboard+mouse, clicking or drawing a box to select objects are fairly standard so I'd hope there are some convenience GUI functions available so I dont have to reinvent the wheel.

    I'm looking for some suggestions on which 3D engine I should use. (http://qt-project.org/wiki/Using_3D_engines_with_Qt)

    I'm mainly looking for convenience to implement and performance given the size I indicated above
    Running:
    RHEL 5.4
    Python 2.7.2
    Qt 4.7.4
    SIP 4.7.8
    PyQt 4.7

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: 3D reccomendations

    You might take a look at VTK from KitWare. There is an interface to QWidget which lets you embed a visualization into a Qt app.

  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: 3D reccomendations

    And it looks like Qt3D 2.0 is finally getting some "ownership" and support. I saw a presentation on this at Qt Dev Days last month, and it looks pretty sophisticated. I don't know how much high-level support there will be for things like CAD, modeling, or scientific visualization. I will be keeping an eye on it.

  4. #4
    Join Date
    Dec 2010
    Posts
    55
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: 3D reccomendations

    Thanks, I'll take a look.

    Its hard to know which one is easiest to start with since I am doing something fairly simple.
    Running:
    RHEL 5.4
    Python 2.7.2
    Qt 4.7.4
    SIP 4.7.8
    PyQt 4.7

  5. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: 3D reccomendations

    That's the problem with all of the 3D kits mentioned on the page you linked. They are all so complex and comprehensive that the learning curve is long and steep. I've been looking for years and have been too overwhelmed to be able to invest the time to learn any of them.

  6. #6
    Join Date
    Nov 2014
    Posts
    35
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: 3D reccomendations

    Hello enricong,

    Sometime ago I developed a 3D painting application, very similar to what you need:
    http://www.mankua.com/Stripes/Stripes.php
    http://vimeo.com/22307556

    I have tried these two engines:
    Ogre3D: http://www.ogre3d.org/
    Geometric Tools - WildMagic: http://www.geometrictools.com/

    But at the end I decided not to use anything but OpenGL. The reason is that most engines are designed for games, and they don't support some other features. In my case it was rendering of wireframe meshes.

    Qt has very good QGLWidget. You just need to define your view (what the mouse controls with pan, orbit and zoom actions) and start drawing your 3D primitives.

    You don't know OpenGL? No problem... I didn't know any OpenGL when I started working on that software and I followed the first 4 or 5 NeHe tutorials and I was good to go:
    http://nehe.gamedev.net/tutorial/lessons_01__05/22004/

    You can copy paste NeHe's code to the QGLWindow and you'll need very little code to make it work.

    Good Luck! If you need help I can probably send you some of the code from that software!

  7. #7
    Join Date
    Dec 2010
    Posts
    55
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: 3D reccomendations

    Yeah, that is the issue. I am drawing simple objects (Trapezoid/Triangle, elliptic plate, elliptic cylinder, elliptic cone, Ellipsoid, Circular paraboloid, Elliptic hyperboloid, and Circular torus) by specifying points. I hope there would be a GUI library that could take care of the interface (mouse rotation, etc). I don't even really have any animation.

    I did look at QT3D or QTGL (not sure exactly, is QT3D a separate piece? it points to QTGLxxxx classes). I can do the triangles, plate, cylinder, cone. And do the ellipse with scaling. However, I didn't see anything that would allow me to draw a paraboloid, hyperboloid or torus.

    I am basically rendering a mesh with a few surface shapes thrown in.
    Running:
    RHEL 5.4
    Python 2.7.2
    Qt 4.7.4
    SIP 4.7.8
    PyQt 4.7

  8. #8
    Join Date
    Nov 2014
    Posts
    35
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: 3D reccomendations

    I don't know if there is any kind of library that supports the objects you need to draw. One of the most complete in number of features is WildMagic. It is an educational tool, so it supports a lot of things that are not really needed in the gaming world.

    As for mouse manipulation, that bit is not so hard. I once created an open source 3d editor and I implemented all the mouse manipulation tools. Here are they on a QGLWidget:

    http://sourceforge.net/p/sceneengine...GLViewport.cpp
    http://sourceforge.net/p/sceneengine.../MouseView.cpp

    Good luck!
    pixaeiro
    http://www.pixaflux.com
    Non-destructive Image Editor

  9. #9
    Join Date
    Dec 2010
    Posts
    55
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: 3D reccomendations

    I spent the afternoon looking through QT3D more carefully. I might be able to do without those missing items or create a function to build them with triangles or something.

    I did see that I can do the rotating, zooming with QGLView.

    I'm not too clear on how to be able to use the mouse to select a specific object and trigger a signal to tell me which object I just selected so I can highlight it and do other things in a slot. I see a QGLPickNode for "picking" but its not clear to me what this really does and it'll do what I want.
    Running:
    RHEL 5.4
    Python 2.7.2
    Qt 4.7.4
    SIP 4.7.8
    PyQt 4.7

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.