Age | Commit message (Collapse) | Author |
|
Typo, thanks to Aleksi Juvani (@aleksijuvani) for finding it.
|
|
retrival of metallic (ab)uses OBJ material ambient term.
this can be non-zero, but in case of no reflections (OBJ 'illum' < 3)
metallic should be zero.
Fixes T60150
|
|
Issue noticed by Philipp Oeser (@lichtwerk), thanks!
|
|
|
|
Original report: OBJ file import fails for objects with vertex groups defined when polygroups option is selected
|
|
This follows naming convention agreed on in T56648.
|
|
Not sure how we did this in old code, but we certainly cannot ignore
None (a.k.a. default place holder) material anymore... Do not generate
it when not needed, though!
|
|
This commit essentially replaces several face data setting done into a
regular loop by calls to magic 'foreach_set'.
This increases seed of affected code by over 200%, global mesh building
by over 40%, and overall typical OBJ import by 20%.
|
|
This commits mainly add a specific, optimized handling for vertex data
(coos, nors, UVs) expressed on single lines. Nearly all OBJ files I've
come accross use a single line per vertex data.
This code cand be up to 40% quicker on vertex data parsing, making
typical parsing about 8% quicker, and typical import about 5% quicker.
Note that I tried applying same kind of optimizations on faces parsing,
but we need to perform rather more complex checks there, so could not
get any interesting improvements.
Also, fixing some logical flaw in invalid nor/uvtex indices, which also
gives marginal speed improvements.
|
|
Does not give any measurable benefit though.
|
|
|
|
|
|
|
|
Guess that was added when layercollection of view layer could still be
edited, that is no more the case (reading code), now view layers appear
to always only have the scene's master collection, all others being
children of that one.
|
|
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D3746
|
|
|
|
Conversion from phong exponent to Principled BSDF is expected to be
quadratic afaik, not linear.
|
|
|
|
|
|
|
|
|
|
This ports the already working addons. The disabled x3d, psk, lwo, 3ds,
raw, dxf addons still need to be converted.
|
|
Conflicts:
io_scene_obj/__init__.py
io_scene_obj/import_obj.py
|
|
Dummy typo, investigation done by @JimG, thanks!
|
|
Based on new bpy_extras' node_shader_utils module.
Note that this is still quiet rough on the edges, not all features
previously supported (in 2.7x) are back yet (at least missing
displacement, which should not be too hard to add, and real alpha
handling, which is probably a bit more hairy).
Also, some things like specular or mirror colors, ambient lighting, etc.
do not exists in Principled BSDF shader, tried to work around it but
there likely some room for improvements here too.
|
|
We are always using nodes now, whether we want it or not...
Also fixed various access to removed 'fixed shader' old 2.7x materials
in import, and some other minor bugs.
|
|
As with FBX, major changes are no support for exporting materials
anymore (since all are nodals), and no more texface at all.
|
|
|
|
|
|
We no longer have per face image nor world ambient color.
In the future it would be nice to support the active texture for each material.
But for now at least the exporter doesn't crash.
|
|
|
|
|
|
|
|
parsed correctly.
rBAe8f09a8e0b28 missed the case where we have no bump multiplicator at all!
Thanks to sebastian_k for the report over IRC.
|
|
There were two issues - last set of option's tokens would not get added
correctly to map_options of current directive, and multiplification
factor of bumpmap was not correctly converted to float.
Thanks a bunch to @Tim Knip (timknip) for reporting the issue,
investigating it and proposing this patch.
|
|
|
|
|
|
Silly mistake in recent addition of Cycles basic material import...
|
|
Applying a matrix with non-uniform negative scaling to a mesh requires
normals (face winfing) to be inverted back to their original orientation!
|
|
This code uses same wrapper as FBX importer to generate a basic nodal
shader for Cycles material.
Note that not all MTL features are supported, some might be possible to
add later though.
|
|
|
|
|
|
|
|
This reverts rBAc553d7c0eb002a02e7, not actually sure why this change in
precision of actually written value was done.
|
|
OBJ/MTL does not support spaces in filenames, but... users keep using them - and other exporters
keep failing at being smart for the user here (like, replacing spaces with underscore etc.)...
So now, when last part of a texture line is not giving any valid found image, we try backward
adding more pieces to image filename until we find some existing file (hopefully).
But again: please do not use spaces in filenames for OBJ, **THIS IS NOT SUPPORTED**!
|
|
|
|
These values are always rounded to 4 decimal places so no need to write 6.
|