Go Back   AC3D Forums > Technical > AC3D Bugs and Problems
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 23rd December 2019, 09:53 PM   #1
stitlown
Member
Expert member
 
Join Date: Oct 2008
Posts: 67
Question Wavefront .obj import /export vertex order

I mostly render in Daz Studio, but I use AC3D for most of my modeling up - because it seems much easier and more intuitive than anything else I use.

However, once a mesh is in Studio (and, for instance, rigged and weight mapped and etc. etc.), it's very difficult (impossible?) to do more work on it back in AC3D because the vertex order of a model exported from Studio, imported to AC3D and then re-exported / imported gets changed. So, for example on morphs, even a simple model change will have absurd outcomes if applied as a morph to the original Studio mesh.

I've seen in some discussions that Blender has an option to "preserve vertex order" and this is needed to to morph modelling using blender.

Is there any similar option in the AC3D import and export? I can't see any place to specify this. And it it's not yet available, I'd like to see that feature added.

My current importer / exporter are export 1.6 by Dennis Hawthorne and Import 1.8 by John Huffman / Inivis.

FWIW, Daz get around this issue somehow with their Studio / Hexagon bridge. Unfortunately, Hexagon is a dog that's difficult to use, hence this plea.
stitlown is offline   Reply With Quote
Old 27th December 2019, 05:27 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Wavefront .obj import /export vertex order

Is it just the order of vertices that's important? Or does the order of surfaces/triangles matter too?
Andy is offline   Reply With Quote
Old 27th December 2019, 08:50 PM   #3
stitlown
Member
Expert member
 
Join Date: Oct 2008
Posts: 67
Default Re: Wavefront .obj import /export vertex order

Quote:
Originally Posted by Andy View Post
Is it just the order of vertices that's important? Or does the order of surfaces/triangles matter too?
The examples and posts I've seen note only the vertex order.

From my limited knowledge, that makes sense because the DAZ "morphs" are creating a set of "deltas" that translate each vertex from its original position to create a new shape from the old one.

Maybe there's some doco on the blender functionality that would illuminate.
Cheers. Lx
stitlown is offline   Reply With Quote
Old 21st February 2020, 07:04 AM   #4
stitlown
Member
Expert member
 
Join Date: Oct 2008
Posts: 67
Default Re: Wavefront .obj import /export vertex order

A related issue. I have 3 virtually identical models (same #vertices and #faces, but stuff gets jiggled here and there so they not identical-identical unfortunately. They have been set up so there can be 3 different UV sets for the one model (to cope with different generations of DAZ models).

Number 2 exports with all but 4 vertices in the same order as number 1. But number 3 exports with almost every vertex in a different order to number 1. This creates an absolute mess when the UV set is loaded as the load assumes the same vertex order.

For Number 2 it's feasible for me to manually edit the .obj - swap the 4 vertices around and update the vertex references in the face definitions. But for Number 3, that is a monster tedious job. Is there any hint on why I'm getting such different vertex order outcomes, and what can be done to try and overcome it?

And a related question - is there any way to copy the UV definitions from one model and apply them to another model (same vertices and faces)?

Cheers, Lx
stitlown is offline   Reply With Quote
Old 23rd February 2020, 02:40 PM   #5
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Wavefront .obj import /export vertex order

Any change in the structure of the object will affect the list of vertices but if you are simply loading/saving, the order should be preserved.


There is one UV coordinate for each vertex reference, so in a way, the vertices are not important. A cube made from quads has 8 vertices but 24 UV coors (4 on each square side. If the cube is made from triangles, then there would be 6 UV coors on each side.


To copy a UV from one object to another, the object structure (well, the surfaces) would need to be identical. I suppose it would be possible to implement but I think the application would be limited. You're probably best duplicating the object and adjusting the vertices as desired.

Last edited by Andy; 23rd February 2020 at 02:46 PM.
Andy is offline   Reply With Quote
Old 24th February 2020, 01:53 AM   #6
stitlown
Member
Expert member
 
Join Date: Oct 2008
Posts: 67
Default Re: Wavefront .obj import /export vertex order

Thanks for the response. In the end, I did pretty much as you suggested - took a screen shot of the UV map and used that to re-map a cleaner model. Fiddly but was less fiddly than getting the original now-unclean-vertex-order UV map where it needed to be.

BTW, it'd be great if AC3D could write the UV map image at higher res - currently appears to be circa 908x908 which is a tad grainy for fine work. I do note that doing a copy of the window instead of the UV map can get a bigger result (if your screen is bigger) and does capture the vertex position dots, which is a great help in the re-mapping.

Cheers, Lx
stitlown is offline   Reply With Quote
Old 21st April 2021, 02:48 AM   #7
stitlown
Member
Expert member
 
Join Date: Oct 2008
Posts: 67
Default Re: Wavefront .obj import /export vertex order

Was hitting this issue again Andy and came back to this thread to try and find a solution as I knew I'd found a solution before. But this time I've got a better solution ... viz ...
1. Export .objs from AC3D.
2. Import .objs into Daz's "Hexagon". Hexagon re-processes the .obj file so that the vertices are in some sort of location order - hence if the vertices in the different .objs are in identical locations, the Hexagon representation orders the vertices the same.
3. Export the .objs from Hexagon. These now have consistent vertex definitions. They can be re-imported into AC3D and will now load properly as alternate UV sets into Daz Studio.

Slightly roundabout, but way less messy than any other solution or manual fix I've tried.

The implication is that it's possible for an application (Hexagon in this case, but possibly also AC3D as an enhancement) to re-order an existing mesh (on import or possibly in-situ) so that the vertices start with some logical and reproducible order.
Cheers, Lx
stitlown is offline   Reply With Quote
Reply

Tags
export, import, vertex-order, wavefront

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 04:53 AM.


AC3D Forum
(C) Inivis Limited 2020