Is there an way to show/export model wireframes?

This is my wireframe in blender:

And this is the same model in three with the wireframe tag:

Is there any possible way to get the original wireframe, the one that shows the real edges instead of the triangles? GLTF most likely cannot do it, but any other way would be good, if i could only get the linesegments.

If you can select each of the edges in Blender and split them you could search for the bounding edges when you load the asset in threejs and render those. The smoothing will be broken, so a cylinder will show up as a prism, but you can use one mesh with smoothing (not broken) to render the surface, and another (the broken one) to render the wireframe.

@dubois my blender skills are extremely limited (learning it on and off for a month now), sorry for asking but could you explain how i split the edges, and then search for the bounding edges?

you can try this
https://threejs.org/docs/index.html#api/en/geometries/EdgesGeometry

how did i not see this, it works! :smiley: thanks @Dragon3DGraff !

Just to note the technicality. I think the edges are using a “threshold angle” which is similar to how you would auto smooth an asset in Blender (or other software). You may not get the same exact wireframe, since in 3d software you can also do this manually. So while the desired effect may be achievable with say a 34.67 degree threshold, a few edges that were manually assigned (modeled) may be different.

1 Like

hello, I’m also quite new on Blender, I found your solution @Dragon3DGraff and thanx, but I do not know how to use this code in threejs… Can you help me? Should I load my model onto the editor online? Or I have to download the app? Where should I enter the geometry code to split edges? Thank you

EdgesGeometry is fine if you are starting with a solid mesh and just need to show its edges. But if you want to bring artisanally crafted lines from Blender into three.js there’s a better way:

  1. Select mesh, go to Edit mode Tab
  2. Open Menu Search, Fn+F3 on macOS
  3. Select “Mesh → Delete → Only Faces”

  1. Check result, edit the lines if you want

  1. File → Export → glTF
  2. Enable “Mesh → Loose Edges” in export settings
  3. Export and view

This comes into three.js as THREE.Line, THREE.LineLoop, or THREE.LineSegments objects. Unlike when exporting a solid mesh, quads and n-gons are not triangulated, you just get lines. Same method will work for point clouds, too, if you delete edges instead of just faces.

7 Likes

Hello, and thank you to send me those nice infos, but here is a file with my shape, I need to show wireframes. I need to have a very light file to use on internet…
Do you think the technic with geometry could work directly with to erase any face?
By the way I tried to erase faces on blender, I looked at it on. the finder, but this those not show…
thank you so much for your help!!

[
10-transit-5b5.blend (1.9 MB)
](https://)

Yes ! It works the way you are saying, but lines are black, in my mac , I cannot see the .obj… I assume it’s transparent…
I made an effect to glitch it… that’s exactly what I need, but in white wireframe…
How should I do this?
EUTELSAT 4-flat-des-2.obj (941.3 KB)

wow, thanks! i had no idea this could be done!

@donmccurdy, do you have an idea of what I should do ?

I’m not sure what you’re asking now – you’re describing glitch effects, but have shared only files and no code. I would recommend starting a new thread with complete details (code, files, and workflow) to reproduce the problem you’re having.

Hello, sorry I was not clear enough @donmccurdy,
I think this post is the good one to talk about this no?

the giltches I’m talking about are made on purpose…
I manage to do what you were proposing,
I did export it in glTF with Loose Edges.
I see my object properly in “threejs”
I export it from threejs in a .obj, this is fine
My problems :
First, i need the lines in white, it’s black now… How should i do this?
Second when I open this .obj in preview mac, it says "
This file cannot be viewed because Preview does not support some of its features"
Weird, I’m managing to watch any .obj exported from Blender to Preview…
The files I’m sharing are the one that I cannot open and with black lines.
Thank you so much !

Please, start a new thread. We are off topic here. Also I would strongly encourage avoiding OBJ entirely, I can’t help you with that format. :slight_smile:

this is good idea . and if you want get those mesh extrode or valume select object and right click and go to convert to curve and go to object data properties in curve setting and extrode or bevel round curve .when do that then go to conver to mesh and done

and you have mesh wireframe object in gltf

I don’t see this option in blender version 2.92.0 and without it seems that all vertices aren’t connected.
Is it only in later releases? If that’s the case, is there any way it can be done in the version I have? I can possibly update the version to a later one but not latest as my laptop is not compatible with it.

All good. Updated Blender to 3.0.0 and that option was there. Thanks for the great info @donmccurdy