PDA

View Full Version : OSG exporter: worse output in newest version?


tokola
09-13-2016, 03:15 PM
I am exporting a previously created model (in 3DS Max version 12) with the latest OSG exporter and I can't make cylindrical objects appear as smooth as they actually are in 3DS (the edges of vertices are visible). The older exporter seems to have been making a better job, unless I am missing something. I've tried almost every option in the exporter dialog box, but could not reproduce the desired result.

Please, have a look at the attached image to get an idea. The image on the right has been exporter with the old version, while the one on the left with the latest version from 3DS Max 15. Any idea why this is happening? I can attach the model, if needed.

Thanks!

Jeff
09-13-2016, 08:57 PM
Are you viewing both models with the same multisample settings (View > Multisamples) in Inspector?

If you're not exporting maps with the model for shader effects disable 'Effects' and see if that makes a difference.

tokola
09-14-2016, 08:46 AM
Jeff, both models are viewed with None Multisamples, although changing this value has no effect whatsoever.

Also, there's no Effects option in the OSG exporter. Do you mean somewhere in 3DS?

I sought advice from a colleague and he figured out a way playing with smoothing groups, but I'm not sure this is the way to go, as I have to edit every model I am re-exporting. I am sure it should be something with the exporter, unless Autodesk did some change between versions (12 to 15).

Any ideas?

Jeff
09-16-2016, 03:25 AM
Can you upload (http://www.worldviz.com/upload/) the Max and OSG models for us to take a look at?

tokola
09-16-2016, 11:18 AM
Models are uploaded with ref ticket #1642579. Please, read upload notes and let me know if you want more info.
Thanks!

tokola
09-16-2016, 03:04 PM
Jeff,
as an addendum, it seems whatever I'm exporting has the same issue. Here's an example of a very simple pipe model (attached). Although the "Normalize Normals" option is selected in the exporter, the edges are visible in the Inspector (multisamples 4x; 8x doesn't work as it reverts back to None) and Vizard runtime.

I'm also attaching the pipe.fbx file I've used to export the osg/ive files. Hope these help.

tokola
09-20-2016, 12:12 PM
Hey Jeff,

any updates on this? This is rather important for my progress and would like to know how to proceed with modelling. Is it a bug with the exporter? Can I avoid editing the models?

Thanks!

Jeff
09-20-2016, 09:27 PM
Smoothing is related to normals. The most likely culprit for the smoothing is unwelded verticies and/or explicit normals in Max, which would get in there if the model originally came from another program. The difference could have to do with turning on tri-strips/use indicies if it's explicit normals since that affects the vertex order. I'll ask an artist to take a look at the model.

tokola
09-21-2016, 02:52 PM
I understand the potential complications from models created in other programs. However, as I mentioned above, this specific model was edited with Max 2012 and exported beautifully with the old OSG exporter. The exact same model was opened with Max 2015 and the result with the latest OSG exporter is what you see (unsmoothed normals). I really cannot see how this can be related to the creator of the model. Something must have changed between the Max or/and OSG exporter versions to justify this. I hope the artist can shed some light...

Veleno
09-21-2016, 05:19 PM
Hi tokola,

I've been taking a look at your file today and have noticed the following things:


When I export (currently from Max 2016) I am not able to reproduce your issue. It also seem to not make a difference which options I'm turning on or off
When comparing the two models within inspector, the main difference I see, other than texture changes, are that the old model has much more pronounced normals than the new one. (see inspector-normals.jpg)
The geometry in the Max model is using explicit normals, which appear in green if an "Edit Normals" modifier is applied. (see edit-normals.jpg)
All the models in Max have a large scale factor applied. This shouldn't affect the smoothing but does explaining why "SantrifujHolder" has its normals scaled pretty far in the Y direction.


Can I get a copy of your export settings? I'd like to see if I can reproduce your issue so I can submit it as a bug. You can save them out as a preset file from the lower left of the OSG exporter window.Normally explicit normals should not cause issues as long as the original geometry is not modified, but they can interact strangely with anything that modified the vertex order (e.g. use indices option).

(Here's what I believe should fix your issue: )
They can be removed by adding an "edit normals" modifier, selecting all the normals, then hitting "reset" which resets them to their true positions. This also destroys any smoothing that may have been applied using the edit normals modifier, which will need to be added back in with smoothing groups.

Usually explicit normals come from importing geometry into Max from another program, but they can also be put in place intentionally when a user wants greater control over surface normals than smoothing groups allow. They usually work correctly with the exporter, but on occasion things like tristripping and the use indicies option can cause unintended results.

tokola
09-22-2016, 12:22 PM
Michael,

thanks for your elaborate response. I think it's pretty cleat it's a normals problem. My question is how come it didn't appear with the old Max and/or OSG exporter, since I am using the exact same .max file. I am assuming it must be a bug with either or a combination of the two versions I'm using. Please, find attached the preset file and let me know when you have an update.

Thanks!

Veleno
09-23-2016, 04:55 PM
No problem.

I did some more tests and was able to reproduce the issue. As you suspected, I was able to confirm that it has to do with a bug in the exporter itself (rather than specific settings) that affects Max 2014 and 2015, but apparently not Max 2016 or 2017.

I'm going to pass a sample and my notes onto programming. With any luck they'll be able to find the source of the bug and add a fix to a later release of the exporter. For now, I'd recommend sticking to smoothing groups.

As a side note, and on the topic of normals, I noticed that in an old post you asked about using tangent space normal maps. If you aren't already aware, Vizard 5 added a new shader (vizfx) which supports them. I've attached a zip with some sample files (max, osgb, script, osg preset).

You can find more info on the shader here:
http://docs.worldviz.com/vizard/Shaders_3DS_Max.htm