Please guide me to take an important decision

Hi All,

I am a hardcore C# developer.
I am planning to develop an application which let’s the user design and decorate his house from scratch.

  1. Drawing walls, Placing windows and doors.
  2. Adding furniture (importinh existing 3d models at runtime)
  3. Changing/applying textures for floors, walls, furniture’s etc.
  4. The application should be able to display the model in 3D and floor plan in 2D.
  5. Exporting the design as a 3d model (obj, 3ds, dae etc)
  6. This application should work on as many platforms as possible (like windows, uwp, iOS, android, mac.)

I am thinking of using Xenko.
I will not use it’s editor/studio. I am going to do everything with code referring xenko budget packages.

My questions are.:

  1. Is drawing possible with Xenko? I mean, mouse-down, mouse-mouse, mouse-up events

  2. If I develop everything with code, I may even need to use some other .Net libraries like Newtonsoft Json, etc.
    Will it be smooth yo port my application on different platforms? What kind of template i should use? A windows forms application? Wpf application? Or something else?

  3. I want to develop my application with docking panels (like visual studio). In that case, my left panel will have some UI controls like treeview, buttons etc and the main area should show the 3d model of the house.

In a nutshell, can I have my model viewer hosted in a user control? For example, Xenko editor has center area in which the scene rendering happens.
I want similar interface.

Please guide me.

Thanks in advance.

1 Like

The project you are describing is overly broad. “design a 3d house, walls, doors windows… on as many platforms as possible (windows, ios android mac)” This in itself is a herculean task. Desktop user interfaces don’t translate well to mobile, and mobile interfaces don’t work well on desktop.

Also creating a UI that an “average person” can use to 3d model their house is a very unsolved problem.

I recommend you instead start with some research tasks to better famliarize yourself with the space.

(1) Use some competitive tools to model your own house to figure out what you actually want to build. Very technical tools like Blender, Sketchup, and Maya have the most power but the most complexity. Then there are approachable tools like Autodesk’s web-based Homestyler, which is probably the closest to what you are trying to do.

(2) Research into alternative technologies for inputting 3d data without modeling… There is some good progress being made in using photogrammetry (turning pictures and videos into 3d models)… where soon one should be able to walk around their house taking video on their mobile phone, and softwarwe may be able to turn that into a 3d model of their house.

As for your Xenko questions, here are some answers… The short version is… “Xenko isn’t really made for desktop UI projects” and it doesn’t have a bunch of usable cross-platform desktop widgets. Take a look at cross platform 2d widget sets, like Qt# or GTK# for desktop, and Xamarin.Forms for mobile.

You can do custom drawing with Xenko, but the drawing is an abstracted 3D graphics API that is translated to DirectX, OpenGL, or Vulkan. It is not GDI.

If you want to use a GDI like 2d vector drawing API for some simpler widgets that don’t change very much, one method I’ve used before in C# is to use AGG-sharp to draw to a texture surface. I created a mostly GDI like wrapper, called GDIviaAGG that provides a mostly GDI like API. It’s not super fast, but it’s sometimes easier for curve drawing and shape filling. See SimpleScene

I don’t understand what mouse events have to do with your drawing question. Yes there are mouse events.

Windows forms and WPF only really run on Windows, so you should not use them if you want your application to be portable.

Xenko Studio can setup a code project scaffold for you… However, keep in mind Xenko is a “game style” rendering pipeline, where it renders the entire screen every time there is a change. This is a bit different than “desktop application” style rendering, where you often build around a 2d widget set, with buffered 3d viewports limited to regions of the screen.

A drawback of rendering the entire screen every frame is that 2d widgets can be slow if the 3d data is complicated and slow to render. You can fix this even within Xenko, by getting rid of the “game loop” and writing your own high-level 2d region manager to buffer separate 2d render targets. However, at this point you’d be using random bits of Xenko code, not the Xenko game engine.

An example of this kind of cross-platform UI is Blender. It draws the entire UI with OpenGL (mac windows linux). But it doesn’t re-render the entire screen every time something changes. Instead of manages buffer regions in a custom 2d region manager, and has it’s own 2d widget set that draws with an internal drawing abstraction ontop of OpenGL.

Another route is to build around a mostly 2D UI, with a classic widget set like GTK# or Qt#, and then drop a 3d region into one of the panels.

Because Xenko studio is open-source, you can leverage the entire codebase for Xenko studio if you want… However, it only runs on Windows.

5 Likes

Hi @david_j
Your guidelines helped me a lot. Thanks a lot :pray: