Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Is it possible to CAD-like 3D Model Buildings in a Unity Game Environment?

Discussion in 'General Discussion' started by Cheralatan, Mar 26, 2020.

  1. Cheralatan

    Cheralatan

    Joined:
    Mar 26, 2020
    Posts:
    6
    Dear Unity Community,

    I'm very interested in building a game that allows the users to design buildings.

    In order to do this, I need to somehow implement some basic CAD functionality into the game. For example, users must be able to work at a scale, draft basic 2D building plans, then extrude the walls, build floors, place windows, change exterior materials and designs.

    I'm diving into the research now, but from my understanding, unity seems like it general is used to import geometry from outside modelling programs.

    Is there any references, resources or precedent projects which achieve the basic CAD functionality I talk about that you could share?

    Thanks so much!
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    6,771
  3. Cheralatan

    Cheralatan

    Joined:
    Mar 26, 2020
    Posts:
    6
    Thanks, @Murgilod !

    Is mesh the only geometry to work with in Unity? Meaning, is there anyway to do solid or nurbs modelling like a typical CAD environment?
     
  4. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    7,119
    Yes.

    You'll have to convert those into meshes for visualization purposes. You'll also have to implement those yourself.
    Game engines do not support nurbs or parametric solids. They only render triangle soups.
     
    Murgilod likes this.
  5. Cheralatan

    Cheralatan

    Joined:
    Mar 26, 2020
    Posts:
    6
    Thanks @neginfinity ! So is it possible to implement nurbs or parametric solids (i assume we'd have to find that library and import it through C# scripting)? Would be really awesome. Has there every been any examples of this?
     
  6. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    7,119
    IMplementing splines and parametric solids is a pretty standard exercise when dealing with procedural geometry, there's nothing magical about it.

    However. I highly doubt that there is a library, because writing your own for generic procedural shapes is not difficult (grab a formula, plug it in)

    BUT.

    When you say "parametric solids" and "CAD" it means you want boolean operations on them. And those are advanced topic that is not easy to implement.
     
  7. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    619
    whatever u trying to do, it probably exists in software, some even free.
     
  8. Cheralatan

    Cheralatan

    Joined:
    Mar 26, 2020
    Posts:
    6
    Thanks, everyone! This all makes sense.

    Is there any precedents out there of games that enable users to model while the game is "running"? Meaning if the game is designed for users to create buildings, we'd want them to have some basic line and mesh modelling capabilities.
     
  9. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    306
    Archimatix does pretty much what you are describing.
     
  10. Cheralatan

    Cheralatan

    Joined:
    Mar 26, 2020
    Posts:
    6
    Thanks @Voronoi !

    Although it appears that you can only use the parametric node modeller in the scene for asset editing. I wonder if it would be possible to build this functionality on the game side?
     
  11. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    2,239
    Archimatix has some run-time capability, but not everything that you can do in the editor. You should look at the documentation to find out exactly what it can and can't do. Also, ask any specific question on the author's thread:
    https://forum.unity.com/threads/arc...eling-for-unity-unity-awards-finalist.330869/
     
  12. Cheralatan

    Cheralatan

    Joined:
    Mar 26, 2020
    Posts:
    6
    very interesting! thanks @kdgalla!

    I will look into this. Does anyone know of any more programs with similar capabilities?
     
unityunity