#387541
it would be nice to have an option for the projection of the override material!

thereby I'd be able to f.e. use a laminate texture in cubic projection to make the whole model appear to be made of laminate.
now it works fine with simple colored materials but having the UV projection makes stuff go completely out of shape.
#387544
The problem is that it is texture tags, not materials, which define UVs. So to make a cubic projection for the whole model, you would need to remove all texture tags, group everything under a null, and then put a single texture tag, with projection set to cubic, on that null.
#387547
I think it should be pretty easy (famous last words) to write a python script which would make a copy of the document, with these modifications, which you could then open and render. When I get a minute, I can check that out.
#387551
Here is a script which:
  1. creates a copy of the current document
  2. removes all of its texture tags
  3. groups everything under a single null
  4. assigns a cubic-projection texture tag to the null
  5. saves the copy to a .c4d file
You can then open the saved copy and render. Of course, when using this method, it's not actually necessary to use the override material at all, since everything is now using a single texture tag -- just apply your desired material to that, and adjust the projection as desired.
Code: Select all
import c4d

def kill_tags(o, t):
    while o and o.GetTag(t):
        o.KillTag(t)

def remove_tags(o):
    while o:
        kill_tags(o, c4d.Ttexture)
        #kill_tags(o, c4d.Tpolygonselection)
        remove_tags(o.GetDown())
        o = o.GetNext()

def group_objects(d):
    p = None
    o = d.GetFirstObject()
    n = c4d.BaseObject(c4d.Onull)
    d.InsertObject(n)
    while o:
        t = o.GetNext()
        if p:
            o.InsertAfter(p)
        else:
            o.InsertUnder(n)
        p = o
        o = t

def apply_override(d):
    m = c4d.BaseMaterial(c4d.Mmaterial)
    m.SetName('Override')
    d.InsertMaterial(m)
    n = d.GetFirstObject()
    t = n.MakeTag(c4d.Ttexture)
    t.SetMaterial(m)
    t[c4d.TEXTURETAG_PROJECTION] = 3;

def main():
    d = c4d.documents.GetActiveDocument().GetClone()
    remove_tags(d.GetFirstObject())
    group_objects(d)
    apply_override(d)
    c4d.documents.SaveDocument(d, 'clone.c4d', saveflags=c4d.SAVEDOCUMENTFLAGS_0, format=c4d.FORMAT_C4DEXPORT)

if __name__=='__main__':
    main()
To run the script, open Script > Script Manager, make sure you have selected the Python (as opposed to C.O.F.F.E.E) tab, click File > New, and paste in the script. You can then use File > Save As to save it for later, and/or create a toolbar button for it by clicking the "Shortcut..." button near the bottom-right corner of the Script Manager.
Let's talk about Maxwell 5.2

We have planned a 5.1.2 patch for September, but[…]

Help with plastic/glass material

Tinted polycarbonate plastic works only in a Viewp[…]

4K Support not working

Oops. Sorry, I opened V4 not V5. The latter fits i[…]

Hi again dear customers, In the version we upload[…]