Anim8or Community

General Category => Anim8or v1.0 Discussion Forum => Topic started by: selden on July 06, 2023, 02:17:04 pm

Title: Enhancement requesst: Wavefront .obj export of .mtl Ns value of 1.0
Post by: selden on July 06, 2023, 02:17:04 pm
Request for enhancement of Wavefront .obj object export:

Please make it possible to export a .mtl Ns value of 1.0

Suggestion: When Anim8or's material Brilliance is set to 1.0, then set Ns to 1.0  (Currently it gets set to 0.0)

Rationale:

I am trying to create Wavefront .obj objects with a matte surface for importing into "Sweet Home 3D." For a surface to be matte, SH3D needs it to have a .mtl value of
Ns 1.0

(In addition, a setting of "illum 1" is desirable but does not seem to be required.)

Background:

I've been using Anim8or to create "furniture" objects for use in "Sweet Home 3D", free home-design software. ( https://www.sweethome3d.com/ ) SH3D uses Wavefront OBJ format as its model import format. When an object which was created in Anim8or with default material characteristics has been exported to .obj and then imported into SH3D, SH3D's image rendering algorithms render the object with highly reflective surfaces. They actually produce a mirror image of the environment on their surfaces. In many cases this is undesirable.  After consulting on the SH3D support forum, I learned that when an object is imported which has a Ns of exactly 1.0, then those reflections are NOT drawn.

Unfortunately, I have not been able to persuade Anim8or to emit an Ns of 1. I can get very close to 1.0 by reducing Anim8or's Brilliance value close to 1, but when Brilliance is set to 1.0, it generates an Ns value of 0.0. A value of 0.0 causes rendering errors in SH3D.

As a workaround, I've been using a text editor to change the value of Ns from 0.0 to 1.0, but it'd be nice not to have to do that.

Title: Re: Enhancement requesst: Wavefront .obj export of .mtl Ns value of 1.0
Post by: Steve on July 06, 2023, 07:54:26 pm
I'll look into this, thanks!
Title: Re: Enhancement requesst: Wavefront .obj export of .mtl Ns value of 1.0
Post by: Claude on July 07, 2023, 10:19:55 pm
Hi selden
Sorry if I'm meddling, but I was wondering if you
have considered modifying the obj export script ?
Title: Re: Enhancement requesst: Wavefront .obj export of .mtl Ns value of 1.0
Post by: selden on July 07, 2023, 11:51:52 pm
No, I haven't, to tell the truth, although I've written export scripts in the past (e.g. the one for Celestia's CMOD format). It seemed to me that an official enhancement might be appropriate. And the text editing script that I'm currently using seemed easier to write at the time. :)