Results 1 to 6 of 6

Thread: I want to be able to change texture maps for instances using Clone Instance method

  1. #1
    Stuck in a very big cube Waves of light's Avatar
    Join Date
    Aug 2007
    Location
    South Yorkshire, England
    Posts
    2,500

    I want to be able to change texture maps for instances using Clone Instance method

    Hi,

    I'm currently evaluating LW11 and started out by playing with Instancing.

    I've recently finished a scene which included a Lancaster Bomber (http://forums.newtek.com/showthread....12#post1223812). My thought was, wouldn't it be a great time saver if I were able to use the Instance ID to change the material of a given instance, in this case the decal and insignia of different instances of the Lancaster. So bump, normals, reflection settings all stay the same.

    So I reduced the scene down to one Lancaster, with one propeller (cloned 3 further times). Set up rotate and placement of the props and keyframed for MB on the props.

    Now, I can get make an instance of the Lancaster using either Instance Generator or DP Instancer (the first attached image is the nodel setup to change the material of each plane) thanks Denis for popping over in the other thread and given your suggestions. But, and this maybe down to my inexperience with instancing, I don't seem to have a lot of control over the placement over my instances. I.e. I want to be able to move them into preferred positions. I also want to be able to have control over the rotation of each prop, on each instance (so that MB looks different for each prop).

    So, instead I used the 'Clone instance' option from the Items | Add menu in layout. This gives me an instance of the Lancaster and of each prop. It didn't respect heirachy, but I changed that in the scene editor. However, I had complete control over placement and rotation, and it was clear it was an instance of the original, as it contained the suffix _inst.

    However, the nodel set up below doesn't work. Is this because this set up, even though it is an instance, does not carry that value through to the Instance Info node?

    Your suggestions are more than welcome.

    Ricky.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	LW11_NodeSetupforInstancing2.jpg 
Views:	128 
Size:	648.1 KB 
ID:	102185   Click image for larger version. 

Name:	LW11_NodeSetupforInstancing3.jpg 
Views:	88 
Size:	312.8 KB 
ID:	102186  


    Systen Spec: i7 4930k (OC @4.5ghz),ASUS p9x79 MB, 32GB Ballistix RAM, H60 cooling, Samsung SSD 120GB, WD 1TB

  2. #2
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,959
    A test with instances attached to a bunch of NULLs
    with LW Instancer and the Instance ID from LW Instance Info node to drive the color,
    Click image for larger version. 

Name:	lw_instancer_id.jpg 
Views:	58 
Size:	230.7 KB 
ID:	102189

    As you can see, the ID number is local, always set to zero
    because it is the first instance for each generator,
    no way to vary the color (or material).

    Same thing using DP Instancer and its own Instance Info node,
    Click image for larger version. 

Name:	dp_instancer_id.jpg 
Views:	100 
Size:	239.4 KB 
ID:	102190

    the ID number is global, different for all the generators.

    Denis.

  3. #3
    Stuck in a very big cube Waves of light's Avatar
    Join Date
    Aug 2007
    Location
    South Yorkshire, England
    Posts
    2,500
    Quote Originally Posted by dpont View Post
    A test with instances attached to a bunch of NULLs
    with LW Instancer and the Instance ID from LW Instance Info node to drive the color,
    Click image for larger version. 

Name:	lw_instancer_id.jpg 
Views:	58 
Size:	230.7 KB 
ID:	102189

    As you can see, the ID number is local, always set to zero
    because it is the first instance for each generator,
    no way to vary the color (or material).

    Same thing using DP Instancer and its own Instance Info node,
    Click image for larger version. 

Name:	dp_instancer_id.jpg 
Views:	100 
Size:	239.4 KB 
ID:	102190

    the ID number is global, different for all the generators.

    Denis.
    Oh finally the penny drops. Sorry Denis, it wasn't the execution of the nodel setup it was how I was setting up Instance Generator or DP Instancer. I'd got it in my head, that I selected the first Lancaster Bomber, then DP Instancer, then create however many Plane instances I wanted, then look at how to manipulate each instance.

    What I couldn't get through my think cranium, was I needed to add nulls and reference the Lancaster as an instance.

    Ok, it looks like I have it working. However, I've noticed that MB doesn't work with instanced hierarchy items and for some reason, one of the props is missing (green plane 4th prop).

    Thank you again for your help.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Newtek_InstanceIssues.jpg 
Views:	73 
Size:	344.1 KB 
ID:	102197   Click image for larger version. 

Name:	Newtek_InstanceIssues_Screen.jpg 
Views:	93 
Size:	543.9 KB 
ID:	102198  
    Last edited by Waves of light; 02-28-2012 at 01:22 PM.


    Systen Spec: i7 4930k (OC @4.5ghz),ASUS p9x79 MB, 32GB Ballistix RAM, H60 cooling, Samsung SSD 120GB, WD 1TB

  4. #4
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,959
    For Motion Blurred instances,
    in LW Instancer check "Parent" coordinates for the Reference,
    in DP Instancer, check "Timing world" coordinates.

    Denis.

  5. #5
    Stuck in a very big cube Waves of light's Avatar
    Join Date
    Aug 2007
    Location
    South Yorkshire, England
    Posts
    2,500
    Merci Beaucoup Denis.

    I will have another go in the morning. I want to try the MB and then clone the props from plane one and parent them to each plane null, so that I have full control over each of their own independent rotation.

    Ricky.


    Systen Spec: i7 4930k (OC @4.5ghz),ASUS p9x79 MB, 32GB Ballistix RAM, H60 cooling, Samsung SSD 120GB, WD 1TB

  6. #6
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,876
    Clone Instance is adding null, then in Object Properties > Instancer adds instancer where there is set reference item. And that's it.

    If you're making instancing by hand, there is just one instancer, with multiple instances, so every of them gets unique number.

    But while using Clone Instance tool, there is just one instance per instancer. They don't exchange InstanceID between multiple instancers.

    You can try using mine Extended Item Info > Clone Index from TrueArt's Node Library. It's analyzing digits at the end of item name (in brackets), so it should work.
    Last edited by Sensei; 02-28-2012 at 02:44 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •