Obj export materials have 100% specularity

Next
 From:  Morat
8391.1 
I've been experimenting with different workflow approaches with MoI and I've found that with obj exports all materials are exported with 100% specularity. This has to be fixed on every material when importing into Blender etc.

Is this a value that I can affect by changing something on the style or in the options? I had a quick look around but couldn't see any way of changing it.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8391.2 In reply to 8391.1 
Hi Morat, the .obj file that MoI exports has the specular color channel set to white (rgb of 1.0 1.0 1.0), so that if you turn on specular highlights it would show a white highlight. But it has the specular exponent set to 0 so that should mean specular highlights are off.

What do you see when you open it in Blender, are specular highlights on or off there?

The only things MoI sets regarding specular is the r g b triplet value and specular exponent value. Neither of these maps to a single value of 100% so maybe that's something that Blender decides to do by default.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Morat
8391.3 In reply to 8391.2 
Hi Michael

When I import the model all the colours are washed out (almost white all over the model) until I reduce the specularity of the material.

I suspect I'm doing something wrong in Blender though. I only have a sun light in the scene but this effect is happening over the complete surface of the object as if it's trying to apply a specular highlight to the entire thing.

Edited to add a screenshot. This is how the model looks right after import. The sphere diffuse is dark green.
Image Attachments:
Size: 106.9 KB, Downloaded: 14 times, Dimensions: 998x628px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8391.4 In reply to 8391.3 
Hi Morat, what other programs are you seeing that in other than Blender? I tested a few here and didn't see any result like that.

Can you show me a screenshot of the specific control in Blender that you're adjusting to fix it? Like is it a color value or a single percentage value? That may help me figure out what it's doing.

But I suspect it's some kind of bug in the Blender importer, like maybe they're interpreting the .obj specular color channel value as having specular actually turned on, or something like that.

If you want to test some things, try opening the .mtl file exported out from MoI in a text editor, it will have entries that look like this:

newmtl Red
Ka 0.0000 0.0000 0.0000
Kd 1.0000 0.0000 0.0000
Ks 1.0000 1.0000 1.0000
Tf 0.0000 0.0000 0.0000
d 1.0000
Ns 0


The 2 things relating to specular in there are the line starting with Ks, and the line starting with Ns.

Try removing one of those lines at a time and then both and see if that changes the import behavior.

But neither of these things should result in the type of thing you're getting, the Ks value in .obj format just controls the color that's used for specular, and Ns controls the exponent value for the specular focus, 0 should mean it's turned off. Maybe the importer is misinterpreting these values and thinking they mean something else. I don't think this used to happen, maybe it's from some recent change in Blender.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  amur (STEFAN)
8391.5 
Hi Michael,

i also use Blender for exporting to .wrl for 3D printing MoI models. I always changed the specular in Blender because of that issue. After reading your post i just switched the specular ammount to 0.0 in the .mtl and it seem to fix the problem, because now Blender shows a black color for spec instead of white.

Attached are two images for you to see the difference.






Best regards
Stefan
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Mip (VINC)
8391.6 In reply to 8391.3 
Hi Morat,

Just an idea.
Could the harsh light you have in Blender be caused by having Ambient Occlusion checked on in the World panel ?

Michel

EDITED: 28 May 2019 by VINC

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Morat
8391.7 In reply to 8391.6 
Hi all

I resolved this issue. When Blender creates the material on import it defaults the specular shader to CookTorr with a Hardness setting of 1, which basically means 'massive specular highlight that covers almost all the model'. Either decreasing the specular intensity or increasing the hardness fixes it.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
8391.8 In reply to 8391.7 
Hi Morat & Stefan, you might want to report that as a bug to Blender, it seems odd to use something that looks strange as the default.

Also maybe Blender is not paying attention to the Ns 0 line in the .mtl file, that should be interpreted as specular being off.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All