Jump to content

Attach lights to instances


yp
 Share

Recommended Posts

Thanks for your reply.

 

Sorry if it was unclear: I have some imported geometry which are instances- in this case light fixtures.

I wanted to attach Vray lights to one of them so the get distributed along with the instances.

 

I was thinking about maybe grouping the instance together with the light (another advantage would be just to change eg. the light and therefor all at the same time) but that didn't work.

 

I now have used a script to distribute an instance of a Vray light to all selected objects (imaga_2-instance_align).

 

Works- but it would be great to have the lights directly grouped with or linked to the instances they got distributed to..

 

Maybe I'm thinking something wrong- or it can be done with native Max tools or maybe another script..?

Link to comment
Share on other sites

wait i dont get it.. lets say there is an array of wall light fixtures with 2 metres of spaces.. u place a vraylight and array it in the same settings.. so u got 10 light fixtures and 10 vraylights below each of them.. whats the problem with linking them to the fixtures? why would u wanna do that anyways? i only need to link lights to moving animated objects like cars..

Link to comment
Share on other sites

Well, for flexibility purposes..

 

If there a fixed array and it will not be changed later your proposal would work.

 

But if I attach a light to a lantern which is distibuted along a street, sometimes rotated, it would not be possible to get lights distributed to them easily.

 

Another purpose is to have ceiling lights which are rotated and pointing in different directions.

So adding the light to the basic instance would be beneficial.

Link to comment
Share on other sites

Then i guess you did it in the wrong order unfortunately. If you had added the light to the group first, and then instanced the group instead, there would be no problem. Unfortunately, as far as i can tell, the grouping has no impact on the instance, as the grouping is sortof just a link between objects in the sense that "you will now manipulate these two objects as one". If you took one instance of the light fixture and grouped it with a light, the instance of the light fixture would be updated inside the group if you manipulated another instance of the light fixture, as it references the other instances of that light fixture. The grouping of a light and a fixture does not "include it" in the instance and applies it to all the instances of the fixture, it merely says this instance of the light fixture and the light are to be manipulated together. Dunno if that made sense, but that is pretty much how it works. So the faster you fix this problem, allthough it may be a pain to do, the better.

 

Edit: also, in case you later want to tilt/rotate some of the the lights, make sure they are not targeted!

Link to comment
Share on other sites

Hm, yes, that's what I was assuming too.

 

Made a test some minutes ago with grouping two objects and instancing the group- but chaning the position of object 1 in group 1 did not change the positon of object 1 in group 2 (hope that was clear enough ;) )

 

Sure if i was grouping an existing instance with eg. a light changes will only affect this group- or instances of it.

 

The problem is, that I do my poly modeling in Sketchup because it works faster for me and the import workflow is good.

So-called components from SU are recognized as instances.

 

Actually the script i mentioned above did the job now but still is limited- definitely in the future.

 

Would like to keep the workflow as described as I really like to design in SU..

 

Maybe there's a script that converts "same" objects to instances- or finds instances (SU instances are called eg. LightFixture#10_001, .._002, .._003 and so on) and transfers them back??

Reminds me of something.. maybe TrackScripts package?

Link to comment
Share on other sites

Use the Clone and Align tool, it comes standard with Max. Select your Vray light you want to distribute. Go to Tools -> Align -> Clone and Align. Use the pick list to select all of your light fixtures. Check "Link To Destination" and Viola! you've just aligned your lights and linked them to the individual destination plus your vray lights are also instances of each other.

 

Yes, it also works on groups. It aligns and links them to the group head.

Edited by VelvetElvis
Link to comment
Share on other sites

Use the Clone and Align tool, it comes standard with Max. Select your Vray light you want to distribute. Go to Tools -> Align -> Clone and Align. Use the pick list to select all of your light fixtures. Check "Link To Destination" and Viola! you've just aligned your lights and linked them to the individual destination plus your vray lights are also instances of each other.

 

Yes, it also works on groups. It aligns and links them to the group head.

 

I've been thinking about finding solution for this issue, for years...

THANKS!!!

 

@Erkut

Yes, but to be honest, Elvis's writing was much clear for newbies!

Best R!

Edited by okmijun
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...