================================================================================
Introduction
================================================================================
A script for daz studio to invert the vertex normals in .obj files
Some of the props and figures i made in the past had inverted normals
In the preview pane and in OpenGL renders and sometimes in 3Delight renders those surfaces render all-black
In poser those surfaces show up as inverted-transparencies
This script goes through the .obj file and flips the normals on the specified surfaces a.k.a. materials
this is done by reversing the order in which the facet vertices are listed
i know the Geometry editor tool built in DS 4.5+ has normals inversion
but i guess some of the renderers recompute the normals or something
maybe an "update cache" operation is needed and since i didn't read the manual i don't know
but anyway, it helped me fix some of my props recently
================================================================================
History
================================================================================
July 1st 2017 Update-fix the selected-materials-only option didnt work
April13th 2017 4:38 AM - Released
================================================================================
Installation
================================================================================
The zip package is found at the bottom of this page
unzip it in your daz content folder,
typically :
C:\Users\USERNAME\Documents\DAZ 3D\Studio\My Library
once installed, it will appear in your content library, under
The Daz Script will be found in My Library / Scripts / mcasual
Starting with Windows 7 if you right click on the downloaded zip file
and select the [Extract All ....] pop-up menu item
you simply browse up to your Daz Studio Content Folder
and the files will fall in the proper folder
================================================================================
Use
================================================================================
This script processes .obj files,objects in the scene and surface selections are of no consequence.
Use the 'browse' select your .obj file
If you want all materials are to be processed, set the 'Flip All Materials' option
Press the Go button
if only some of materials are to be processed, set the 'Flip Selected in List' option
click the 'Get Mat. List' button
the script will obtain the list of materials from the .obj file
Select the materials of interest
Click the Go button"
Note that in the Output Options section you can specify if the resulting .obj file is added to the output folder or if it replaces the input .obj file.
Note there's always a risk that something will go wrong and you will be left empty handed if you decide to overwrite your .obj.
License
// =====================================================================
// by mCasual/Jacques
// You can use this script freely for personal or commercial use.
// You may not sell, resell, sub-license or rent this script in any way.
// you may credit this script to mCasual/Jacques
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// =====================================================================