WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-13-2016, 03:15 PM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Unhappy OSG exporter: worse output in newest version?

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!
Attached Thumbnails
Click image for larger version

Name:	osg_exporter.png
Views:	258
Size:	381.6 KB
ID:	817  
Reply With Quote
  #2  
Old 09-13-2016, 08:57 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,462
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.
Reply With Quote
  #3  
Old 09-14-2016, 08:46 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
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?
Reply With Quote
  #4  
Old 09-16-2016, 03:25 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,462
Can you upload the Max and OSG models for us to take a look at?
Reply With Quote
  #5  
Old 09-16-2016, 11:18 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Models are uploaded with ref ticket #1642579. Please, read upload notes and let me know if you want more info.
Thanks!
Reply With Quote
  #6  
Old 09-16-2016, 03:04 PM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
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.
Attached Thumbnails
Click image for larger version

Name:	normals_problem.png
Views:	214
Size:	369.0 KB
ID:	819  
Attached Files
File Type: zip pipe.zip (225.3 KB, 211 views)
Reply With Quote
  #7  
Old 09-20-2016, 12:12 PM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
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!
Reply With Quote
  #8  
Old 09-20-2016, 09:27 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,462
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.
Reply With Quote
  #9  
Old 09-21-2016, 02:52 PM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
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...
Reply With Quote
  #10  
Old 09-21-2016, 05:19 PM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
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.
Attached Thumbnails
Click image for larger version

Name:	inspector-normals.jpg
Views:	226
Size:	339.7 KB
ID:	822   Click image for larger version

Name:	edit-normals.jpg
Views:	221
Size:	245.9 KB
ID:	823  
Reply With Quote
  #11  
Old 09-22-2016, 12:22 PM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
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!
Attached Files
File Type: zip Max2015_osgExporter.zip (202 Bytes, 206 views)
Reply With Quote
  #12  
Old 09-23-2016, 04:55 PM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
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
Attached Thumbnails
Click image for larger version

Name:	normal-mapped-material.jpg
Views:	231
Size:	96.8 KB
ID:	833   Click image for larger version

Name:	normal-map-in-action.jpg
Views:	222
Size:	409.1 KB
ID:	834  
Attached Files
File Type: zip Normal Map Sample.zip (775.7 KB, 213 views)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with newest version of Vizard mjabon Vizard 6 07-29-2008 10:51 AM


All times are GMT -7. The time now is 05:40 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC