Home
Help
Search
Login
Register
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
News:
NVil Forum
»
General Category
»
Community Help
»
defoult material on import
« previous
next »
Print
Pages: [
1
]
Author
Topic: defoult material on import (Read 4349 times)
0 Members and 2 Guests are viewing this topic.
Posts: 1697
Administrator
Polygon
Portfolio: www.samardac.tumblr.com
samardac
August 21, 2014, 08:17:06 am
Why when I import obj it not get defoult material? It just white, how to automaticly assign defoult material to imported objects?
Logged
Portfolio:
www.samardac.com
Posts: 1697
Administrator
Polygon
Portfolio: www.samardac.tumblr.com
samardac
August 21, 2014, 10:35:48 am
Pleas help!
Logged
Portfolio:
www.samardac.com
Posts: 130
Spline
JTenebrous
August 22, 2014, 09:09:37 am
I wish I could answer your question... but really, I'm also just wondering if this can be done in NVil yet? If not, I second the request. Oddly, I feel as if some of the objects I've brought over from ZBrush through the GoNVil script have occasionally been imported with the default material applied (unless the object was poly painted white in ZBrush, which I usually do)... but maybe that's just my imagination since I just now tried bringing over an unpainted mesh from ZBrush and the default material was NOT applied. Either way, this would be handy.
Logged
Posts: 3760
Developer
Administrator
Polygon
IStonia
August 26, 2014, 08:38:53 am
The problem could be in your obj file. Please send me a sample obj file with just one simple box. Also together with its mtl file which is a material file that goes with the obj file.
Logged
Posts: 130
Spline
JTenebrous
August 26, 2014, 09:38:57 am
I found out what the problem is, at least in my case. If an .obj is opened in NVIL, and it *contains a UV map*, then the default Nvil material is applied. If an .obj is opened in NVIL, and it *does NOT contain a UV map*, then Nvil applies a pure white "material". Here is a link to download an example of each kind of zbrush primitive cube (UV and no-UV) (remove the spaces I inserted in my link): https: // dl.dropboxusercontent.com/u/63406920/Misc/ZBrushBoxPrimitives_NVilMaterialTest_26Aug14.zip
Normally, I don't apply UV maps to my zbrush meshes because they just inflate the file size and degrade performance when I'm dealing with a scene of 20+ million polys. On the other hand, I don't bring meshes that heavy into Nvil. I guess it all depends on Nvil's material system whether they apply to UVs only, or if it can also deal with just assigning colors to vertices. So yes, I would prefer if I could bring a non-UV mapped mesh into Nvil and have the default material applied. But if not, I now understand on a technical level why, and it's really not a huge issue to me.
Logged
Posts: 2103
Polygon
steve
August 26, 2014, 03:40:54 pm
There was a change a few months ago to solve the issue of .obj files being imported without a .mtl file.
It looks like Nvil (if no .mtl file) is looking into the .obj file for a ref material (usemtl), if there is no material entry, then a white material is added.
Probably my fault, as at the time I was only checking for .obj files with missing .mtl files, not .obj files with a missing .mtl file and no internal defined default material.
Logged
Posts: 3760
Developer
Administrator
Polygon
IStonia
August 27, 2014, 08:22:15 am
Try this
http://www.digitalfossils.com/Download/NVil-Aug-27-14.rar
Logged
Posts: 2103
Polygon
steve
August 27, 2014, 05:49:23 pm
Hi IStonia,
I made tests on the variations I could think of (no .obj internal "usemtl" reference, etc). It now looks OK.
Hopefully others will check.
Logged
Posts: 130
Spline
JTenebrous
August 28, 2014, 08:47:18 am
I just tried this version out as well - the issue looks to be resolved so far as I can see! Thanks!
Logged
Posts: 2103
Polygon
steve
September 12, 2014, 09:21:22 pm
Something I find a little annoying with this.
We have the option to "Set Default material" and "Set as fixed default material". But noting is actually set unless you have first created an object in scene, which uses that default material.
If for example, I open a scene (whatever format), the first material found is placed in the first material slot, then any object created after that will be set with that material. So where are the default materials I have set in that case?
Logged
Posts: 3760
Developer
Administrator
Polygon
IStonia
September 14, 2014, 08:19:40 am
I changed "Default material" to "Global default material" and "Fixed default material" to "Local default material". Hopefully it would make sense.
Logged
Posts: 2103
Polygon
steve
September 14, 2014, 01:20:13 pm
Hi IStonia,
I am not sure as to why simply changing the names (to what you have) would make more sense.
To have a "Global default material" would lead me to believe, that any new object created in scene would be automatically given that material. As that is not always the case, I need to ask as to what your definitions are of the 2 terms you give?.
1. Global default material
2. Local default material
Logged
Posts: 3760
Developer
Administrator
Polygon
IStonia
September 15, 2014, 09:00:34 am
Global default material is actually not an instance of material. It only holds the data that can be used to construct the material.
Local default material is assigned to one of the scene materials. The first material added into the scene is automatically assigned as the local default material.
Logged
Print
Pages: [
1
]
« previous
next »
NVil Forum
»
General Category
»
Community Help
»
defoult material on import