Always face camera with View Observer - Would this work?

Always face camera with View Observer - Would this work?

Postby Pixero » Wed Oct 16, 2019 1:46 pm

I was thinking of a way to create a custom "always face camera" script and this is the idea.
Would this work or am I missing something about how a ViewObserver works?
If it did work, would it be terribly slow?

Idea:
Run script to set "Face camera" attribute for the selected component(s).
Use a ViewObserver that is called when the camera is moved.
Get the active camera position.
The ViewObserver "tells" components with the "Face camera" attribute to rotate towards the new camera position.
0
User avatar
Pixero 
 

Re: Always face camera with View Observer - Would this work?

Postby fredo6 » Mon Oct 21, 2019 9:56 pm

Pixero wrote:I was thinking of a way to create a custom "always face camera" script and this is the idea.

Are you willing to simulate in Ruby the 'Always Face camera' of Sketchup. Then what effect do you wish to get exactly?
0
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

Re: Always face camera with View Observer - Would this work?

Postby Pixero » Mon Oct 21, 2019 10:13 pm

If it was possible I thought it would be good to have that functionality in a form that might work better with third party render engines and also the possibility to enhance it with some new functionality.
0
User avatar
Pixero 
 

Re: Always face camera with View Observer - Would this work?

Postby pbacot » Mon Oct 21, 2019 11:46 pm

There's an issue in Twilight Render where you can designate the scene to render, but if SketchUp is not set to that scene, face-me is not right. (I think that's how it works).
0
MacOSX Mojave ShetchUp Pro v19 Twilight Pro v2 M2 Kerkythea PowerCADD
User avatar
pbacot 
Top SketchUcator
 

Re: Always face camera with View Observer - Would this work?

Postby Dan Rathbun » Mon Nov 04, 2019 9:58 pm

A major drawback is that you'd be modifying the model entities with every change of the camera.

Currently changing the camera position or even the active scene does not set the modified? flag.
0
    I'm not here much anymore. But a PM will fire email notifications.
    User avatar
    Dan Rathbun 
    PluginStore Author
    PluginStore Author
     

    SketchUcation One-Liner Adverts

    by Ad Machine » 5 minutes ago



    Ad Machine 
    Robot
     



     

    Return to Developers' Forum

    Who is online

    Users browsing this forum: kjy and 7 guests

    Visit our sponsors: