Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Workflow for modelling in Onshape, rendering in Blender?

wouter_visserwouter_visser Member Posts: 14
After some days in the excellent Onshape CAD environment I've finalized my model and now it's time to make a few photorealistic renders.
But Blender works with meshes, and onshape with some kind of parameteric file format, so there will have to be a conversion step. Now Onshape can export to mesh-format but only as STL, so the whole assembly becomes one big mesh.

For rendering, this is not ideal to say the least because applying textures is ideally done to individual parts. Onshape can also export all parts to individual STL files but then the positional information in the onshape assembly is lost, so when importing these in Blender, everything appears in the origin.

What kind of workflow should I use when trying to make renders in Blender? What do you use yourself?

Comments

  • joe_dunnejoe_dunne Onshape Employees, Developers, csevp Posts: 198
    Have you tried any of the rendering apps in our App Store? Both RealityServer and OneRender offer excellent tools for rendering directly in your Onshape document. 

    https://appstore.onshape.com/apps/Rendering/GRB7MXCTSBKKL35DT5MJWGQ3UPBXKSEAW72GTEA=/description

    https://appstore.onshape.com/apps/Rendering/7VN6SGPUE22SW6ZYWV67EDZ3FGYCD5VTQMFUBPQ=/description

    Joe

    Joe Dunne / Onshape, Inc.
  • wouter_visserwouter_visser Member Posts: 14
    Thanks for your suggestions. I've tried OneRender for a few renders and I liked it, easy to get renders fast but Blender is just slightly better in all aspects IMO - the UI, options for lighting, there's realtime rendering that's free instead of 3$/hour. And if you install the Filmic Blender addon it looks more photorealistic than OneRender:
    https://www.blenderguru.com/tutorials/secret-ingredient-photorealism

    RealityServer - I've only taken a brief look at it, looks fine but like OneRender not photorealistic like Filmic Blender.
  • dirk_van_der_vaartdirk_van_der_vaart Member Posts: 547 ✭✭✭
    Have you tried the obj. exporter from Prototech, that's also in the appstore- import/export.
    Then import the obj. files into Blender.
    Good luck
  • wouter_visserwouter_visser Member Posts: 14
    @Dirk the prototech exporter works really well, thanks for the tip! Creates really good results (round things still look good, parts in Blender have the same name as those in Onshape) and the tool provides control over the tesselation.

    I've also found another option: export the onshape model/assembly as STEP, then in FreeCAD export it as Collada (dae). This way, the round vase in my test model looks a bit more bobbly than it did in Onshape but with shading set to smooth it's perfectly usable. And in FreeCAD you can probably set options for the conversion to a mesh.
  • michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    @wouter_visser you can export Collada (.dae) directly from Onshape:

    This option is not bad but it could be better. All come as a triangulated mesh, each body is separate mesh, but with a weird name.

    The second option is to export your model as Rhino file (3dm) and open it with MoI (http://moi3d.com/), then export it as Wavefront (obj). In obj export you can set mesh to quads only (N-gons):

    Now you can take advantage of that and do some additional editing in Blender (of course it depends on how complex your design is).
    By default, it still can produce some artifacts but fewer compared to direct Collada export.

    The third way is to use Clara.io (it used to be an Onshape App). First you have to import your geometry to Clara.io (there are numerous file formats that you can use, if you were signed up for Clara.io app (visualizer) before their termination, you can still use it, as I do) then from Clara.io export whole scene or just chosen geometry as a Blender file (.blend). It will be just a triangulated mesh but with very good quality.

    Below are images from blender to compare:

    Onshape Collada export:


    MoI Wavefront export (doesn't look like it could, but I've picked wrong n-gone count) :


    Clara.io Blender export:


    I've added my blender file with all three imports, each on its own layer (first layer - camera; second layer - Clara.io; third layer - Onshape; fourth layer - MoI)
    Here's a link to Onshape design: https://cad.onshape.com/documents/2bc01e5705ecd87f24950e10/w/a9584fa6236824c651209e9e/e/4de42125bc0f03f5e45e997f

  • shawn_dorseyshawn_dorsey OS Professional, Developers Posts: 4 PRO
    @wouter_visser You could try our ONU 3DLite Onshape app. It allows you to choose any Onshape model assembly or part studio and immediately convert and optimize to a polygonal format. At that point you can further optimize the model, share a link or export to FBX. That FBX could then be imported directly into Blender for rendering.

    We offer a free 30 day trial that includes 3 free exports, so you can try it out first. Feel free to visit https://onu1.com/3dlite/ to learn more.
  • michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    Images I've posted before weren't clear enough, so I've record short screencast from Blender, to show pros&cons of each (I've included ONU fbx exports).
    To orient yourself on my screencast here's my layout:


    I have one Clara.io export (almost no artefacts, heavy mesh), one Onshape export (decent size mesh artefacts along tangent patches), two MoI exports (first was dump almost default export, second I've tweaked, in both light mesh only quad faces), three ONU exports (I've tried different settings from default to most dense one... but I don't see difference at all. Overall, no artefacts along tangent patches, but few other, rather obvious ones).
    Here's a screencast:
    https://www.youtube.com/watch?v=HQmwUE0eeBk
    In summary, if you are working with simple prismatic parts (mechanical engineering) that I would go for direct Onshape export of Collada files (assemblies goes without falling apart). If you do some surfacing I would choose Clara.io. If I would need work on a mesh in Blender I would pick MoI.
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,039 ✭✭✭✭✭
    @michał_1
    Are you using a development version of blender?
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    Just for this video, last 2.8 version, mainly because of that nice clay preview (bronze one), it unveils artifacts nicely.
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,039 ✭✭✭✭✭
    michał_1 said:
    Just for this video, last 2.8 version, mainly because of that nice clay preview (bronze one), it unveils artifacts nicely.
    You can see, in the top bar, you use blender 2.80.4 according to it
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    Two or three days ago it was last version available on their site.
  • michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    I have an update for CAD to Polygon workflow.
    Because Clara.io is SAAS and since they pullback form Onshape I have dought if it could be a permanent solution.
    After some testing, I can recommend using DesignSpark Mechanical (https://www.rs-online.com/designspark/mechanical-software).
    DSM is a free trimmed version of SpaceClaim. From Onshape you have to export your geometry as a STEP file. Import that to DSM and from there export as OBJ. Import that OBJ to Blender.



    Mesh looks good, without artifacts. A file contains simple UVMapping, each face in CAD translates with its original surface UVs.


  • eirik_r_guttulsrudeirik_r_guttulsrud Member Posts: 25 PRO
    edited January 2021
    I may be a little late to the party, but I'll just ask: To me it seems that .dae and .obj are the formats that work the best straight out of Onshape, for importing into Blender. However, in the .obj file my subassemblies get super dark in blender. The subassembly exported on it's own shows up fine, so there is nothing wrong with the parts themselves.

    I prefer .obj because it doesn't contain so many invisible relations between parts once in Blender, which confuse me, and it also gets the part names correct.
    However this shading issue is bugging me :cold_sweat:


  • eirik_r_guttulsrudeirik_r_guttulsrud Member Posts: 25 PRO
    edited January 2021
    Apparently I need to go into object data and Clear Custom Split Normals Data (inhales!) on the affected parts. It is apparently not as logical as "all subassemblies are affected" as I now exported an assembly a higher level up, and now the wheel subassembly is fine, but the profile thing is dark...

    Would be nice to not have to clear split normals on every object in a large assembly though...


Sign In or Register to comment.