Page 1 of 1

Octane Exporter Ideas

PostPosted: Fri Aug 06, 2010 1:51 pm
by TIG
I have a couple more ideas relating to the Octane Exporter...

Idea 1:

It is always good practice to create your Sketchup forms correctly with all of the faces oriented the proper way, so that the front-face is facing outwards where you might see it and it has any required material/texture applied to it - and conversely the back-face is inside and never has a material applied, as it's not seen or rendered by Octane anyway [like most renderers]. The way the OBJ/MTL exporter works is that every face is exported as it has been modeled - i.e. if a face's front has no material the 'Default-Material' is used for that face. This can mean that you get unexpected results when rendering your model IF you have some incorrectly oriented faces - i.e. the back-face is actually looking outwards and has a material/texture applied to it, but the front-face is left without a material - it looks fine in the SKP but it is 'blank' in the OCS version. You can fix individual faces by sampling the back-face material, reversing the face and applying the material to the front face - repeating this for every wrong face ! This can be a big chore - BUT you should have made it right in the first place !!! :evil:
BUT I have now written a script for you to help fix this...
(2.17 KiB) Downloaded 172 times
unzip and place the .rb file into your ../Plugins/ folder
    (c) TIG 2010
    Plugins > Fix Reversed Face Materials
    Select entities including any suspect faces [edges etc are ignored].
    If any face has a back-material BUT it has no front-material it is assumed
    to have been made incorrectly and to be oriented the wrong way round,
    with the desired material applied to the back instead of the front.
    So then the face is reversed and its front-material is made to match the
    back-material - including any UV-mapping appropriately corrected -
    the back-material is then removed.
    If there is no selection you are asked if you want to process the whole
    model, if you reply "Yes" then absolutely everything is selected !
    If the selection includes groups or components you are asked if you want to
    process these too - if you reply "Yes" then any faces inside them are also
    processed. If there are 'nested' groups or components with these they are
    also processed through the nesting.
    A closing dialog reports how many faces have been fixed.
    To see the affect switch from Texture mode and view in MonoChrome mode, run
    the tool and you should see the changed faces flip - switch back to Texture
    mode and you should see no difference in appearance since all the materials
    should still be the same, but incorrectly oriented faces have been fixed.
    by PayPal to info @
    1.0 20100806 First Issue.
This should make fixing your badly made models so that they'll render properly much easier :roll: BUT don't let it become an excuse to be a sloppy modeler :geek:

Idea 2:

I was thinking about recoding the Exporter tool to use my 'deBabelizer' add-on - many of you might be familiar will some of my other tools - like the Extrusion-Tools - where you can have customized 'lingvo' files to translate the strings of text in menus/dialogs etc to suit your 'locale'. Would this be of interest to users ? If so then what languages would you like ? I will make the default 'EN-US' lingvo and often my poorly attempted FR/ES versions - which are immediately re-translated properly by native speakers and reissued [ :oops: ] - the editable text file format is easily understood, with the word/phrase string translations one per line with a 'separator' tag [<==>]... Other lingvo files can be made to suit any 'locale' that Sketchup can return using 'Sketchup.get_locale'. If a lingvo for a 'locale' file doesn't exist then the text will default to English [US] anyway... In addition to EN-US, FR and ES, I also have some tools translated to FA [Persian], D [German], ZH-CN [Chinese-simplified] and so on. I expect that the base set would be EN-US, FR, DE, NL, ES, IT etc. Most Chinese and Japanese [JA] translations are beyond me... but I am sure there are users who can make them and also for other languages I haven't listed too [like say Portuguese] ... Off on a tangent... even Esperanto [EO] is possible if you set your actual locale lingvo to contain the appropriate transaltions!

Comments on any of this would be welcomed...

Re: Octane Exporter Ideas

PostPosted: Fri Aug 06, 2010 3:34 pm
by Burkhard
Thanks TIG...the reverse tool is very usefull...although I have to check if it works :oops: At least I should use your paypal button too, it's time to do.

Btw. have not seen yet the translation option in your Extrude tools. Will have a look if it is already translated.
But neverless I would like to translate the Exporter into German language. I think, later there will be a translation of Octane Render too.

Re: Octane Exporter Ideas

PostPosted: Fri Aug 06, 2010 4:00 pm
by TIG

I am quite pleased with 'FixReversedFaceMaterials'. I made it entirely this morning but it seems to work OK. It works on 'everything', or a selection, or inside groups and components etc... and it is one step undo-able if it fixes things you didn't want fixing.

Perhaps we should continue the Extrusion Tools translation chat over at SketchUcation - but it does need DE lingvo versions for several of the tools. If you are happy to help with the DE lingvo for the Octane Render Exporter I'll be in touch by PM when I have a version that's been 'deBabelized'... I'm waiting for other comments too...

Re: Octane Exporter Ideas

PostPosted: Fri Aug 06, 2010 4:49 pm
by Burkhard
Just for understand the difference between both solutions:
For the Exporter I can imagine that a language _string file would be the best solution, so others can easily chime in.
I have translated several string files, so what is the difference to the deBabelized file?
But you can PM me at Sketchucation.

Re: Octane Exporter Ideas

PostPosted: Fri Aug 06, 2010 6:03 pm
by TIG
The 'deBabelizer' is my own translator tool.
It reads a '.lingvo' file rather than a '.strings' file: but they are very similar
The file has the 'locale' on its name's end - e.g. OctaneEN-US.lingvo or OctaneDE.lingvo.
The translator tool finds the current computer's 'locale' and looks for a matching lingvo file - if found then is found then it's used.
The lingvo file contains all of the words and phrases used in a particular tool's coding and translates them per line.
A lingvo file is easily edited with the PC's Notepad.exe or the MAC equivalent plain-text translator.
I simply extract all of the words/phrases in the code and assemble a 'base' lingvo file based on those [in EN-US].
You simply copy and rename that to suit to make the alternative language translations,
For example:
in the EN-US version
The dog and the cat.<==>The dog and the cat.
in the DE version
The dog and the cat.<==>Der Hund und die Katze.
It's as easy as that - BUT there can be considerable debate about the most suitable word for specialist CAD terms etc like 'Loft' or 'Edge'.

Watch this space...<==>Sehen Sie dieses Raumes... ;)

Re: Octane Exporter Ideas

PostPosted: Fri Aug 06, 2010 11:20 pm
by SurfingAlien
I think they're both good ideas... let me know if you need help with OctaneIT.lingvo ;)


Re: Octane Exporter Ideas

PostPosted: Sat Aug 07, 2010 7:45 am
by TIG
Will do...
Watch this space...<==>Guarda questo spazio... ;)

Re: Octane Exporter Ideas

PostPosted: Sun Aug 08, 2010 5:15 am
by nipparnlert