Jump to content
Sign in to follow this  
Cunico

3ds to Oxygen 2 conversion?

Recommended Posts

So my issue is I've made multiple models in 3ds max with clean topology and when convert to O2 it doubles the Poly count.

dfNQ2GA.png[/img]

In 3ds max it says that I have 1,034 polys but than I convert using .3ds and it distorts the model and triangulates everything. I obviously made the model using quads or tri's. nothing more or less. I really can't lower the topology anyless without losing the shape of the model. It converts from quads in 3ds, to O2 in tri's. I'm doing all this to optimize all my vests for in game. I just realized tonight that it has be doubling everything.

---------- Post added at 08:32 ---------- Previous post was at 08:28 ----------

Is there something I should be doing differently? This model is all one solid piece except for the shoulder straps. I noticed if you looked at the raven example vest, that thing is nice and prety. Mine looks great in 3ds but than looks like a giant turd in O2. Edges and topology go everywhere.

Share this post


Link to post
Share on other sites

Ok well here's a few things you need to bare in mind.

3DS Max will lie to you about edge, poly and vert count, it doesn't give an accurate count for each. Basically, any time you create a smoothing group, or split a UV island, you're creating duplicate verts, note: if you have a UV island that's exactly the same as a smoothing group, then it's free, you can't split a vert more than twice. What's happening is that 3DS Max doesn't take these smoothing groups/uv maps into account, the splitting happens when you export the model.

The face count you see in O2 is counting tri's as well, so it's no wonder it's almost doubling, I wouldn't fret about it, it's perfectly normal. I'd actually advise you triangulate the model before hand in max, if you're working with any sort of baking and normal map magic, it's kind of essential.

Just out of curiosity, what format are you exporting as? If you're using that P3d exporter thing, then I would recommend against it and use FBX instead.

Edited by Kiory

Share this post


Link to post
Share on other sites

When importing any geometry, from any format into ObjectBuilder it will optimize the model: remove what it thinks are redundant edges, triangulate, quadrangulate to it's heart's content. No way around this, and it's specially annoying when it sometimes removes edges that are UV borders, and texturing blows up on a couple of faces.

But in your case it's very simple: since it is a model that will be animated (i.e. deformed, distorted), you will have to again triangulate all faces once you're in ObjectBuilder. Look at the samples, anything that is not a rigid shell, anything that will deform in the game, gets triangulated. Since planarity of a quad cannot be guaranteed, it gets split into 2 tris.

Share this post


Link to post
Share on other sites
When importing any geometry, from any format into ObjectBuilder it will optimize the model: remove what it thinks are redundant edges, triangulate, quadrangulate to it's heart's content. No way around this, and it's specially annoying when it sometimes removes edges that are UV borders, and texturing blows up on a couple of faces.

This has never happened to me, not once, I've heard about it happening but I can't replicate it, my meshes seem to come through as they appear in max.

Share this post


Link to post
Share on other sites

You're a lucky man.. :) Happens to me evey time, though my path is Maya -> FBX -> ObjectBuilder.

Share this post


Link to post
Share on other sites

I dunno, there's probably some options via the export you're missing?

Share this post


Link to post
Share on other sites

You might be right. My exporter has only 2 options though (none related to mesh processing), it's that basic. And I doubt it would have the gall to optimize my geometry willy-nilly, being it's written for software used for film rather than games. Sounds more like something an in-house game tool would do ;) I've noticed in the past, that when importing models into O2, specially higher polycount ones, it used to take it's sweet time, even displaying some progress bar thingie. I just assumed it was hard at work optimizing the mesh.

Share this post


Link to post
Share on other sites

I wonder if it's a smoothing group/UV thing..... I know I had an argument with someone before, about O2 messing up their smoothing etc, it's quite possible that if you don't make proper smoothing groups or uv maps, maybe it's controlled by that somehow?

I'm just speculating, could be something else entirely, it would be great if someone from BI could weigh in here.

I know for my workflow, I do a lot of baking, so I generally create UV's first and then run a script that creates smoothing groups based off UV islands.

Share this post


Link to post
Share on other sites

as kiory said here: triangulate your mesh before export. it is an optimization stage needed for proper smoothing groups.

secondly, i would advise FOR using this script to tell give you the information max doesn't tell you about (it doesn't lie as kiory put it, but it doesn't provide all the info for game creation): http://jokermartini.com/gamefomizer/

teacup: maya is indeed a film oriented software, but due to improved modelling tools in recent years, it stepped up(or down) towards game content as well (maya LT) being the obvious proof for that. Depending on your version, i would advise on updating your Fbx plug, since as kiory said, it is unlikely that o2 does its own thing by itself on import

kiory: care to share the uv islands->smoothing groups you're using ? (i am actually using the same method but manually)

Share this post


Link to post
Share on other sites

https://www.dropbox.com/s/cmdi0k714y59ila/Scripts.rar

Here ya go, I put in a normals face weighted script as well, basically cuts down gradients if you're working with a lot of optimized geometry, which = better normal maps, especially for Arma.

Select the unwrapped model, run the UV smooth script, watch the magic. The normal smooth script can be finnicky at the best of times, if it doesn't look like it's applied, tick the lightbulb icon on the modifier it creates and then tick it again, it should work.

For baking, apply it before the projection modifier (or just apply it last if you're using xnormal, just make sure it exports with the modifier applied).

Share this post


Link to post
Share on other sites

cherio mate will give it a try tomorrow

Share this post


Link to post
Share on other sites

The problem I'm having on this sometimes is that my faces come duplicated. I mean, the face is visible from inside and outside the model while in SketchUp or 3DSMax (No matter which one I use) is only one face plane.

Is there any script or something I'm missing to correct this? If posible without loosing the UV Mapping of course.

Share this post


Link to post
Share on other sites

Maya 2008

53c2de4bc2e09.jpg

MotionBuilder 2012

53c2de4be8ae5.jpg

ObjectBuilder

53c2de4c177b9.jpg

ObjectBuilder Direct3D

53c2de4c33326.jpg

Maybe MAX is somehow privileged, ObjectBuilder's internal data structures are closer to 3DS, and need no further processing. But I just verified an FBX export from Maya (2008) -> FBX (Inspected it in MotionBuilder 2012) -> O2. And i can confirm that it is indeed ObjectBuilder that dances with my polygons. Though even OB shows different stuff when using OpenGL (i guess) versus Direct3D.

Edited by teaCup

Share this post


Link to post
Share on other sites
as kiory said here: triangulate your mesh before export. it is an optimization stage needed for proper smoothing groups.

secondly, i would advise FOR using this script to tell give you the information max doesn't tell you about (it doesn't lie as kiory put it, but it doesn't provide all the info for game creation): http://jokermartini.com/gamefomizer/

)

hmm I tried using it just by selecting one object but returns this error and thats it.

"--unable to convert: undefined to type: Array".

Share this post


Link to post
Share on other sites

@Cunico: i have no issue running it, even when using 3rd party plugs in the stack:

http://i.imgur.com/bu9tcRp.jpg

~edit~

1. tested it in max 2012(v14) and max 2015(v17).

2. make sure your max version (if you are running UAC) is set to run in admin mode. Otherwise drag and drop won't work in max IRC, and neither will the scripts.

3. There is no way this script is not working, i am using it for most of the projects.

@teacup:

I tested it myself. The FBX 2012 seems to give me some weird results (the FBX turned edge as well could be the culprit, but the mesh i was using for this was not even close to being optimized for game yet, but it only uses quad and tris, no ngon available). The mesh is the same for all the tests

1. 3ds max viewport:

http://i.imgur.com/FYFvBjj.jpg

2. maya viewport:

http://i.imgur.com/BczT7SB.jpg

3. maya obj export (all faces were turned):

http://i.imgur.com/Z4FbRkl.jpg

4. maya FBX export :

http://i.imgur.com/bfxAFP4.jpg

5. 3ds max FBX export:

http://i.imgur.com/QOoyCtD.jpg

As you can see, even if this is a non-optimized mesh, the results are not really the same. The settings used were the same geometry only, no animation, no triangulation, not additional settings.

Moreso, both maya and max report the number of verts to 19063. As you can see, the maya obj export is 19021 (so 42 short). For faces, both max and maya reports 18992, but you can see that number also changes between max .FBX, maya .FBX and maya .OBJ.

a bit on the weird side. I will most likely try with an optimized asset as well. I wasn't expecting this tbh.

@kiory:

thanks for the scripts, they are working as expected. piry about the lack of UI though :)

Edited by PuFu

Share this post


Link to post
Share on other sites

Personally, for objects like rifles, pistol etc, even vehicles, I exclusively use .3DS because ObjectBuilder seems to love it, and I get zero fuss. In this case it's a little difficult, as a vest needs to be rigged.

Share this post


Link to post
Share on other sites

either way, there should be no doubled faced polygons for a mesh on export import. What cunico is saying is that he has double faces for each polygon.

Share this post


Link to post
Share on other sites

i have read today blender's changelog (not that i use it, it is just that i like being up to date about my software "competitors", and there was some sort of fix in their own FBX exporter) that sounds way to similar to cunico's issues. I know he is redoing it from grounds up, just wanted to push a heads up about it. I have updated by FBX to the latest versions on my end 2013.3 or so, was running 2012.1.

Also, a bit unrelated but i remember a thread about it:

The new per-face normals feature allows blender to display and export sharp edges correctly without geometry duplication. In addition, selection tools offer more options.

Share this post


Link to post
Share on other sites
When importing any geometry, from any format into ObjectBuilder it will optimize the model: remove what it thinks are redundant edges, triangulate, quadrangulate to it's heart's content. No way around this, and it's specially annoying when it sometimes removes edges that are UV borders, and texturing blows up on a couple of faces.

But in your case it's very simple: since it is a model that will be animated (i.e. deformed, distorted), you will have to again triangulate all faces once you're in ObjectBuilder. Look at the samples, anything that is not a rigid shell, anything that will deform in the game, gets triangulated. Since planarity of a quad cannot be guaranteed, it gets split into 2 tris.

I have to disagree. #

(Note, I am using XSI, not MAX but the .fxb export thing is the same piece of software)

Some theory first. Every n-gon (polygon with any number of points) can be broken down geometrically to a tri-gon, because you need at least 3 points to create a 2-dimensional plane. So every polygon you have is at some level acollection of triangles. ANd that is the true polycount, the amount of triangles. However you DO NOT need to triangulate your stuff, the triangles are already there and the program will handle its triangle-ness withou you having to visually endure a million lines on a large flat polygon.

That being said, fbx imports into O2 are always clean if your model is clean. If you got weird looking polies after import its likely a dirty polygon with double edges. Which only showed itself because O2 cant handle it. Even on animated organinc models you only have to make sure it is cut edgewise in the right places where it deforms. You dont have to tear the thing to shreds by triangulating it

Share this post


Link to post
Share on other sites
I have to disagree. #

(Note, I am using XSI, not MAX but the .fxb export thing is the same piece of software)

Some theory first. Every n-gon (polygon with any number of points) can be broken down geometrically to a tri-gon, because you need at least 3 points to create a 2-dimensional plane. So every polygon you have is at some level acollection of triangles. ANd that is the true polycount, the amount of triangles. However you DO NOT need to triangulate your stuff, the triangles are already there and the program will handle its triangle-ness withou you having to visually endure a million lines on a large flat polygon.

That being said, fbx imports into O2 are always clean if your model is clean. If you got weird looking polies after import its likely a dirty polygon with double edges. Which only showed itself because O2 cant handle it. Even on animated organinc models you only have to make sure it is cut edgewise in the right places where it deforms. You dont have to tear the thing to shreds by triangulating it

This theory of yours completely breaks down when you get into baking high poly models and such. Firstly, triangulating is better if you want to use a cage method for baking, it provides much less hassle when pushing the cage out, quads next to triangles can cause some erratic vert pushing and pulling, if all quads are triangulated then this issue goes away, call it mesh cohesion if you will.

Triangulation is also important if you want to have your baked normal maps displayed correctly in engine, otherwise you'll get vertex shading errors which would bleed through your baked normal map, it's unsightly to say the least. You may also have to re normalize the model in Object Builder if you have made any changes, that includes moving and rotating the model. Yes the engine does triangulate the model, but sometimes it may triangulate it the opposite way it should be and that can mess up your specularity, you have more control if you do it yourself.

Anyway, point is, it's good practice that when you're done with everything modelling wise, triangulate it, and re triangulate in O2 (for some reason it de triangulates), there are no downsides to triangulation and it's just one extra very small step, so what's the big deal?

Edited by Kiory

Share this post


Link to post
Share on other sites

What I mean is that if the ngon is already modeled clean the whole triangulation will fall in place.

Example:

In XSI if you got shading in your viewport and there is an odd looking polygon (many corners, and not on one plane) it will show in the shading. so then I cut the polygon in a specific place and then the shading knows again how its supposed to be triangulated and the problem is gone. That is what I mean by modeling clean. I think all other large modeling programs will show in shaded view if the lighting is confused by odd polygons.

53c2de4bc2e09.jpg

Look at the polygon in the near center of the screen, the one with the line cutting from its lower right corner to the center of the left edge. This is a polygon that will shade weird because the large half of the polygon has 4 corners that are not on one plane which then will confuse the shading and cause weird issues in other programs. the cut he made to the polygon on the left of it (the one disappearing in motionbuilder) is not keeping the continuity of the other polgyons in the loop (along the fuselage front to back)

Share this post


Link to post
Share on other sites
I have to disagree. #

(Note, I am using XSI, not MAX but the .fxb export thing is the same piece of software)

Some theory first. Every n-gon (polygon with any number of points) can be broken down geometrically to a tri-gon, because you need at least 3 points to create a 2-dimensional plane. So every polygon you have is at some level acollection of triangles. ANd that is the true polycount, the amount of triangles. However you DO NOT need to triangulate your stuff, the triangles are already there and the program will handle its triangle-ness withou you having to visually endure a million lines on a large flat polygon.

That being said, fbx imports into O2 are always clean if your model is clean. If you got weird looking polies after import its likely a dirty polygon with double edges. Which only showed itself because O2 cant handle it. Even on animated organinc models you only have to make sure it is cut edgewise in the right places where it deforms. You dont have to tear the thing to shreds by triangulating it

Well, the point of triangulation is simple: it is a way to optimize your model. Sometimes on export/import, the way the middle edge of a quad (the one dividing the quad into 2 tris) can be modifier. Of course in any quad directed 3d modelling package you can take care of the middle edge and change its direction, but in o2, you can't for instance.

Here is an example of a quad, and the way the resulting shapes and thus the shading is different depending on that middle edge (note that the shape is exactly the same minus the way that edge is facing - which is the dotted line):

hUWhm1n.jpg

Edited by PuFu

Share this post


Link to post
Share on other sites

Hey guys I don't mean to dig this up, but I feel I have relevant information on a couple of the key topics in this thread:

1. I've noticed that when exporting from Max, especially using .3ds, that the export process can weld together very small parts if you are working in the exact scale as O2/OB. If possible, try sizing up your objects to 10x or 100x, and then scaling them down again during the import process. I realize that this could potentially eff with animations, but for me it ensures the model is in tact.

2. Also during the import dialog, there is a check box for "do not squarize." Checking this imports the model with the tris in tact, if you pre-triangulated. I've had bad luck with "re-triangulating" within OB, and it seems to undo the specific tri orientations I've set up. So, there is a way around the quadrangulating.

3. The double-faced issue might be from re-importing our mesh. I thought I was importing certain elements of my model by selecting only them, when in fact I was importing the entire model again, and only creating a new named section. Think that's newbtastic? Well, I've forgotten this lesson and had to re-learn it the hard way two more times!

I hope any of this helps future readers.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×