Moving Ungrouped geometry via DC


#1

I am trying to figure out how to simulate a lens shift offset on a model of the frustum of a projector lens. I have a working DC that is essentially a 4-sided pyramid (the beam from a projector lens) that I can scale, resize and adjust the throw ratio. The rectangle face of this pyramid is the “screen” that is being projected. What I want to add is the ability to “offset” the lens based on a percentage of one of the sides of the screen, either the length or the width of the rectangle. Because the object is all connected (ungrouped) at its lowest level, I’m not sure how to do this. I need the apex of the pyramid (the edge of the “lens”) to remain in the same location and then move the projected rectangle on the x or y axis while keeping the lines connecting back to the apex all intact and dynamically updating. Any clever ideas on how to achieve this?

See the image below comparing the original lens Frustum with an offset result example that I am trying to achieve.


#2

I’m thinking that it could be made out of four triangular pyramids as long at the offset did not exceed the height or width

PROJECTION.skp (146.0 KB)


#3

hmm, interesting. So how would I achieve the offset in this setup? What DC function would I be using?


#4

you would make each a component and then change there sizes (Lenxyz)
based on the projected length and offset

probably with a common axis where they meet

Correction:
no now that I think about it my drawing is correct the projected edge needs to be 45deg angle


#5

But to actually offset the triangular pyramid (not just change its size) you would have move the face at one end - essentially the same problem I have now. Unless I’m misunderstanding…


#6

Now that i think some more the offset could only be half the projected width and length max

You would need to change the size of each independently. So it would be a component with four sub components

I guess that if you need more offset it could be made of 5 subcomponents

The things to keep in mind when working with angles in DC’s is that:

DC change shape the same way the scale tool works
every object has to have at least one right angle


#7

Ah, I get it now. I think this would break or override the throw ratio scaling I have built already. The cleanest and easiest thing my be to just manually move things at the ungrouped geometry level like I have been doing… Wish the DC tool allowed for interacting with ungrouped geometry in some way. It would open up a lot of new possibilities.


#8

I guess you could do a ruby script but that is a whole other can of worms.

Maybe someone has a way I do not know about.

I think you are correct it is easier just to grab the apex or lens point and drag it where you want it

I guess you could just calculate the lens position and then make a component with a small cross to mark it so you would know exactly where to position it


#9

Thanks Chris. Ya, someone needs to build a full featured projection tool for Sketchup. I’d pay money for that. Its hugely useful our company uses the one I have built all the time. Very real-world accurate and a real time saver. The important part is to see the whole frustum in 3D so you can plan out complex projection installation on non-planar surfaces (ie, projecting on architecture, or stage props, etc) Just need an accurate lens shift!


#10

Maybe what you could do is just use a scaleable image (jpeg) with what ever reference marks you need

and then just make a DC that will calculate the correct size and offset.

even though it will not apply it to non parallel surfaces you could move it to different points and then see where the reference lines are intersecting with the model.


#11

Now you know why the SketchUp Team themselves resorted
to an extension for Advanced Camera Tools.

Advanced Camera Tools can do this. You just click a button on the ACT toolbar, to show/hide frustum lines:

The “ACT” extension is distributed with SketchUp Pro. (You may need to switch it on via Preferences dialog, and then turn on it’s toolbar, via View > Toolbars…)


The mini-guide (inside SketchUp’s User Guide) to Advanced Camera Tools begins here:


#12

@Anthony_CandS Hello Anthony, have you tried Advanced Camera Tools yet ?


#13

Yes, I’m pretty familiar with that tool. Its useful for certain things but the functionality is not ideal for projection for a number of reasons. It does not have a lens shift/offset function (as per my original post) and you can not adjust the camera without “looking through the lens”. Its useful for certain applications in pre-vis but I have had better success recreating a similar tool with a DC object that I have built.


#14

Ah, okay, it sounded like you were not aware of it. (“My bad.”)

Wouldn’t it make sense as a feature request for ACT ?