feature request
All  1  2-13

Previous
Next
 From:  Michael Gibson
3657.2 In reply to 3657.1 
Hi PP - for Cinema4D try the RipTide plug-in (http://skinprops.com/riptide.php), it will help you to preserve material information when importing OBJ format.


re: spaces in the filename - actually MoI will automatically replace spaces in the .mtl file name with underscores, but it sounds like DAZ may not be reading the "mtllib" statement in the OBJ file that is supposed to tell it which material file to use. From what you describe is sounds like it assumes the .mtl file name has the same name as the .obj file which is not necessarily the case.


Re: specularity - I'm not entirely sure but that seems like it could be a bug in DAZ Studio, that Ks that you're mentioning is not quite exactly specular "strength" - it's the specular color.

The strength of the specular highlight in focus size is actually the Ns value, which is set there to 0 which I think other programs interpret to mean that the specular highlights are disabled.


Unfortunately the structure of .mtl files is not as well documented as it is for .obj files, so it becomes easy for different programs to interpret things slightly differently.


It may have some bad side effects to change the specular color to be rgb = 0,0,0 because in some programs that would then cause people to need to do an extra step if they did want to enable specular highlights. Instead of just enabling them they would have to enable it and also change the specular color as well... So I'm not so sure about changing that by default, it would need some testing with a variety of other programs to see how they behave.


- 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:  -Gwozik- (PP)
3657.3 In reply to 3657.2 
Hello


thanks for the link : http://skinprops.com/riptide.php.

Re: specularity : I apologise, you are right.

Thanks for the answer.

You're the best.

PP
  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:  Mark Brown (MABROWN)
3657.4 In reply to 3657.3 
This reminds me of a question I've been meaning to ask.

In the mtl file exported by MoI there is an "illum" tag (set to 2 I think). What does this do Michael?

I ask because models I import into UVMapper (and others) show up as really bright in the ogl display. I need to use "Overide White Balance" to see anything.

Strangely, the same models imported into Simlab Composer look perfectly lit so I guess it is ignoring some setting and applying a standard of its own?

This same issue manifested itself in the Max trial but with fbx. I exported my fbx from Composer (keeps material assignments). Importing the fbx back into Composer showed the model at the same brightness but import the model into Max and it seemed brighter.

Mark

---
Mark
http://www.homepages.ihug.com.au/~mabrown/index.html

  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
3657.5 In reply to 3657.4 
Hi Mark,

> In the mtl file exported by MoI there is an "illum" tag
> (set to 2 I think). What does this do Michael?

Are you sure you're not looking at the .mtl output from something else?

MoI does not actually put the illum line in there, it only puts out stuff like the following:

code:
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


When illum is present it's kind of a flag for what kind of lighting is enabled or disabled on that material, according to the docs I have:

code:
illum illum_#

The "illum" statement specifies the illumination model to use in the material. 
Illumination models are mathematical equations that represent various material
lighting and shading effects.

"illum_#"can be a number from 0 to 10.  The illumination models are
summarized below; for complete descriptions see "Illumination models"
on page 5-30.

Illumination    Properties that are turned on in the 
model           Property Editor

0		Color on and Ambient off
1		Color on and Ambient on
2		Highlight on
3		Reflection on and Ray trace on
4		Transparency: Glass on
		Reflection: Ray trace on
5		Reflection: Fresnel on and Ray trace on
6		Transparency: Refraction on
		Reflection: Fresnel off and Ray trace on
7		Transparency: Refraction on
		Reflection: Fresnel on and Ray trace on
8		Reflection on and Ray trace off
9		Transparency: Glass on
		Reflection: Ray trace off
10		Casts shadows onto invisible surfaces



I would not be surprised if most programs would ignore that though, some of the things in OBJ/MTL files are just part of the particular behavior of the old Wavefront modeling/animation software.

- 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:  -Gwozik- (PP)
3657.6 In reply to 3657.5 
Hello

I hope I won't say something stupid once again, but I've just discovered that when I set "Ns" to "1" (in the mtl file) for each texture, objets don't show up as really bright anymore when imported in Daz Studio.
In fact Daz studio set "ns" to "1" when it export obj file.

Don't know if it helps anyone.

regards
  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:  Mark Brown (MABROWN)
3657.7 In reply to 3657.6 
Hi Michael,

Yes, very sorry, my mistake. I think that "illum 2" has actually come from UV Mapper.

I've been dealing with so many apps and objs I've lost track of which is which.

Mark

---
Mark
http://www.homepages.ihug.com.au/~mabrown/index.html

  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:  Mark Brown (MABROWN)
3657.8 In reply to 3657.7 
Michael and PP,

Quick test: I loaded a model exported from MoI into UV Mapper and it was bright white. I checked the material settings in UV Mapper and specular was showing RGB 255, 255, 255. I changed this to 0, 0, 0 and the over-bright condition was fixed. The model was now what I would consider to be normally bright. I then exported the model from UV Mapper. This is the comparison of the mtl files:

MoI:

newmtl 507c
Ka 0.0000 0.0000 0.0000
Kd 0.7725 0.7922 0.8039
Ks 1.0000 1.0000 1.0000
Tf 0.0000 0.0000 0.0000
d 1.0000
Ns 0

UV Mapper once specular value is changed:

newmtl 507c
Ka 0.000000 0.000000 0.000000
Kd 0.772500 0.792200 0.803900
Ks 0.000000 0.000000 0.000000
Ns 0.000000
Ni 1.000000
illum 2
d 1.000000

The web reference at http://local.wasp.uwa.edu.au/~pbourke/dataformats/mtl/ says "The Ks statement specifies the specular reflectivity using RGB values".

I'm thinking that maybe the Ks is having an impact on how reflective the material is and how bright it looks?


Mark

EDITED: 8 Jul 2010 by MABROWN

  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:  -Gwozik- (PP)
3657.9 
Hello

For me problem is solved, but if it helps, here is what I get in Daz Studio when I import object from MoI: Specular glossiness set to 0
specular color set to 255,255,255
specular strengh set to 100%

If I change Specular glossiness (more than 25%) : objets don't show up as really bright anymore
If I change specular color to 0,0,0 : objets don't show up as really bright anymore
If I change specular strengh to 0% : objets don't show up as really bright anymore
  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
3657.10 In reply to 3657.8 
Hi Mark,

> I'm thinking that maybe the Ks is having an impact on how
> reflective the material is and how bright it looks?

Yup, that definitely sounds like the case.

But what is supposed to actually happen is that Ks is used not all by itself, but in combination with the Ns value that controls the focus size of the specular highlights.

The Ns value is an exponent, and an exponent value of 0 is a special case, setting Ns = 0 I believe should mean "specular highlights disabled", but UV Mapper does not interpret it that way.

Unfortunately there is not any great documentation available for the .mtl file format, as far as I can tell there is not any great original spec for it unlike .obj which does have a nice comprehensive original document for it.

So because of that different programs can interpret things in the .mtl slightly differently.


I'm not sure about setting Ks = 0,0,0 because that could cause someone to need to do extra work in a rendering program when they did want to enable specular highlights, because they would not only need to enable specular highlights, but also change the specular color to something other than 0,0,0 to make them show up. That may be a bit confusing to need to alter 2 settings in order to make them show up... I would need to do some experiments with a variety of other programs to see if this would happen when setting Ks = 0,0,0 or not.


You could contact the author of UVMapper and ask if he could interpret the value of Ns = 0 to mean specular highlights being disabled instead of having them turned on.


- 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:  Mark Brown (MABROWN)
3657.11 In reply to 3657.10 
Hi Michael,

Thanks for the explanation. I will contact the author of UV Mapper to see what can be done. For the time being what would you suggest regarding that value given that I need my models to go out to a customer using Max?

I'm glad at least that the obj format can be fixed in a text editor.

BTW, your obj merger is a wonderfully handy little tool. I can now do the same job in Simlab Composer (as promised, they have added an option to disable automatic snapping of imported objects to the scene floor) but I'm still using your tool to do the job. It is so easy to just drag the files into your tool's window and hit the generate button.

Mark

---
Mark
http://www.homepages.ihug.com.au/~mabrown/index.html

  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
3657.12 In reply to 3657.11 
Hi Mark, so in v3 I can give setting Ks = 0,0,0 a try by default and see if it causes any difficulty.

I did a quick test, and for Blender it does mean that someone has to adjust the specular color first before adjusting the strength in order to add specularity, but Cinema4D seems to interpret it a bit nicer and just has specular color disabled (and implicitly white) and still can enable specular highlights more easily.

Each program can interpret these things in a slightly different way.


> For the time being what would you suggest regarding that
> value given that I need my models to go out to a customer
> using Max?

Well, I guess if you don't want any specularity the safest thing is to set Ks = 0,0,0 in addition to Ns = 0, that seems to have the best chance of having it turned off in a receiving application.

But since each program interprets this slightly differently it is hard to really know for sure what Max is going to do with it without actually testing it.

- 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
 From:  Mark Brown (MABROWN)
3657.13 In reply to 3657.12 
Hi Michael,

Perhaps make those settings an ini thing and mention in the V3 docs that some apps interpret this differently and how to go about addressing it? I can see needing to turn specularity back on would be a real pain for most users as they are going to be rendering out their own models in the renderers they own. I understand better what the issue is now and really, fixing it using a text editor is not a problem.

Thanks for the help Michael.

---
Mark
http://www.homepages.ihug.com.au/~mabrown/index.html

  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

 

 
 
Show messages: All  1  2-13