Home Technical Talk

Solidworks to game engine? (Bypassing any other 3d program)

polycounter lvl 13
Offline / Send Message
The Mad Artist polycounter lvl 13
So, I work at a small department in a bigger company involved in oil and gas and subsea simulation programs. As most of the models we use start as Solidwork models to begin with, the powers that be have wanted to develop a way to import Solidwork assembly files directly into the engine, bypassing any other program.

Now in the past, we've done it the sane way, where you import a assembly file into Max via plug in (this one, specifically http://www.simlab-soft.com/3d-plugins/solidworks-to-3DSMAX-main.aspx), remodel or optimize it, unwrap, texture, etc, then export it into .x format. But they want this to be a selling point that you can drag Solidworks assembly files directly into our engine where you wouldn't need an outside 3d program. I've been doing some research, and haven't found a case where this has been done before, and don't have a ton of experience with cad programs like Solidworks.

Does anyone have any insight into this or know if this is something that is feasible? And lets just say that polycount wouldn't matter per se. And again, I know this is rather ridiculous, and I have been vocal that I don't think this is a feasible option to dedicate manpower to develop this, but wanted to hear thoughts from the Polycount community. Thanks in advance!

Replies

  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    A lot of what comes out of solidworks wont work well for game models, your best to maybe export as stl or obj to maya or max and cleanup there than export as fbx to game engine.

    If the issue is not owning a 3d pacakge, you could also do the same with blender since it supports obj, and stl on import and can export fbx.
  • The Mad Artist
    Options
    Offline / Send Message
    The Mad Artist polycounter lvl 13
    passerby wrote: »
    A lot of what comes out of solidworks wont work well for game models, your best to maybe export as stl or obj to maya or max and cleanup there than export as fbx to game engine.

    If the issue is not owning a 3d pacakge, you could also do the same with blender since it supports obj, and stl on import and can export fbx.

    Yea, I know. Like I said, this is not an option I would pursue if it was up to me. This is something that the higher ups want; to be able to import Solidworks assembly files directly into a game engine (I brought up Blender as well, but apparently it looks better on a quote sheet to say "Able to import Solidworks assembly files directly into the editor" even though Blender is free) I know all about the various other ways to work with Solidworks files (i.e. the smart ways). I'm just curious is this is even feasible.

    Polycount isn't as much of an issue with our engine (or at least that's what the programmers are confident in, I don't think they realize how massive some Solidworks files are), my main thought is if Solidwork files even carry over UV information at all, even if all they'd be displayed with in an editor is a solid color.
  • EarthQuake
    Options
    Online / Send Message
    Outside of creating some modeling, retopology, uv, and baking tools directly in your engine this doesn't really sound realistic or feasible.

    Maybe you could write something similar to the zremesher feature from zbrush and something to do auto uvs, but that seems like a crazy amount of work.

    If you really don't care about polygon count and don't need a clean mesh that you can texture or manipulate in any way, I'm sure you could write some loader that just pulls in all the data as triangles like I'm sure the plugins you've used do, but, uhhh... That is not going to be pretty, you're probably looking at millions of polygons per asset in some cases.
  • The Mad Artist
    Options
    Offline / Send Message
    The Mad Artist polycounter lvl 13
    That's been my thinking since this was brought up over here, just didn't know if I was alone in that thinking or if I was right that it was a ridiculous idea, or if it had been done elsewhere. A lot of the programmers here agree, but certain people are adamant that it's not going to be a big deal, despite the concerns I've voiced about it.
  • EarthQuake
    Options
    Online / Send Message
    If I were in your shoes, what I would do is do a bunch of research into everything that would be required to realistically get it functioning. Document your current process, detail your geometry requirements and all of that. Then you can present it all and have a solid case for what it will take to implement it.
  • xXm0RpH3usXx
    Options
    Offline / Send Message
    xXm0RpH3usXx polycounter lvl 13
    well, biggest problem of all is that solidworks is a CAD (= NURBS) program, whereas game engines render polygons.
    maybe meshlab can help? its open source, so maybe it can somehow be used as a converter by a clever programer? http://meshlab.sourceforge.net/
  • kaptainkernals
    Options
    Offline / Send Message
    kaptainkernals polycounter lvl 12
    Well if they want it to be done "by the engine", what you could look at doing is what Unity3D does with blender files.

    http://docs.unity3d.com/Manual/HOWTO-ImportObjectBlender.html

    Unity3D doesn't actually convert / read the .blends itself, which is why you need blender installed if you want to import .blends, as it uses blenders fbx exporter to export a file to unity using it's own presets.

    Perhaps look at getting blender to run in a background process to convert from cad to fbx on import to the app? Not sure if it'll work, but it's worth a look / discussion with your devs.
  • The Mad Artist
    Options
    Offline / Send Message
    The Mad Artist polycounter lvl 13
    Thanks guys for the input. Much appreciated.
  • McGergs
    Options
    Offline / Send Message
    McGergs polycounter lvl 9
    Sketchfab has a Solidworks plugin that does this. You might want to look into how they are doing it.

    Also Keyshot technically is doing the same thing when it brings in Solidworks files. It is converting it to polygons based on the image quality settings in Solidworks.

    I have no idea how either of them do this though. that is all the Wizard behind the curtain programming magic.
Sign In or Register to comment.