Getting to know my texture..

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 11 November 2012   #1
Getting to know my texture..

With touch xpresso (and a breath of magic), is it possible to have a object look at it's texture and adopt the textures resolution?
 
Old 11 November 2012   #2
there is a great plugin for cineversity members that imports PS layered files, Plane Smart,and sets up the projection of the textures on planes that are the correct size.. It does more than this, but this is one of its features...

Lee
__________________
http://www.buzzbox.eu
 
Old 11 November 2012   #3
Okay, good man. But is there any way of doing it without spending 300 bucks?
 
Old 11 November 2012   #4
If you're looking at setting a texture to its aspect ratio,
you could check texiX/texiDRIVER from my sign.

If you want to make planes from textures, NiklasR posted a script here:
http://forums.cgsociety.org/showpos...95&postcount=70

or search for an old script, called: imageplane.

Cheers
Lennart
__________________
MSA | OSX | xfiles ...Cinema4D Tools
 
Old 11 November 2012   #5
thanks for the leads..

I just want to make a plane adopt the same x & y size as the bitmap it's displaying..
 
Old 11 November 2012   #6
The bitmap node allows you to access width/height data, easy to transfer that to a parametric object
 
Old 11 November 2012   #7
brilliant, but what do i need to tag to the filename input node?
 
Old 11 November 2012   #8
Drag and drop the image thumbnail from the material channel into xpresso.
Create a bitmap node and link them up like shown.
Attached Images
File Type: jpg Width_Height.jpg (36.5 KB, 28 views)
 
Old 11 November 2012   #9
cheers for that mate, but i need it to adopt x & y size of the texture associated to it.

The bitmap node needs a file name and i cannot work out how to get that from the tag at the end of the object?!
 
Old 11 November 2012   #10
You don't drag it from the material tag, you drag it from the attributes manager.
Dropping it in a blank area of the xpresso manager will create a new node.
Attached Images
File Type: png DragNDrop.png (18.0 KB, 29 views)
 
Old 11 November 2012   #11
herin lies my problem. I need this to work on its own, as i need loads of them.

What i would like to be able to do is duplicate the plane, drop a new texture on the end and the dimensions of the plane change to the dimensions of the new texture..

Thanks for your help. I am quite savvy with xpresso, but i've never been down this avenue before..
 
Old 11 November 2012   #12
Gotcha.
I thought you must be dealing with a lot of them, I was imagining some big iteration setup.
No idea how to link it to the texture applied to an object however.
 
Old 11 November 2012   #13
me also not..
 
Old 11 November 2012   #14
Add this in a python expression tag.
Place the tag on a Plane Object and its
dimensions are set from the Color channel
of the material in the Texture tag placed at the Plane Object.


# Set Plane Object dimensions from Texturetags Material ColorChannel

import c4d
from c4d import bitmaps
#Welcome to the world of Python


def main():
    plane    = op.GetObject()
    if not plane.CheckType(c4d.Oplane):
        return False
    textag   = plane.GetTag(c4d.Ttexture)
    if not textag:
        return False
    mat      = textag[c4d.TEXTURETAG_MATERIAL]
    if not mat:
        return False
    try:
        filename = mat[c4d.MATERIAL_COLOR_SHADER][c4d.BITMAPSHADER_FILENAME]
    except:
        return False
    
    bm          = bitmaps.BaseBitmap()
    bm.InitWith(filename)
    getsize     = bm.GetSize()
    xpix        = getsize[0]
    ypix        = getsize[1]
    plane[c4d.PRIM_PLANE_WIDTH]  = xpix
    plane[c4d.PRIM_PLANE_HEIGHT] = ypix


Cheers
Lennart
__________________
MSA | OSX | xfiles ...Cinema4D Tools
 
Old 11 November 2012   #15
i just checked the (spanish) tutorial for picturesmart. That wouldn't be perfect either..

Lennart, i'll try that out. Thanks. I haven't done anything with python yet, exciting..

Its for the automatic scaling of sprites for wallpapers i'm making every day. For a new page i made recently.. http://www.facebook.com/hgutlwiwak
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:08 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.