Hello Ventuzians!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
CAMERA VIEW
Moderator: Support
CAMERA VIEW
Hi guys !
I would like to know if there is a way, to control camera like video games?
For example, actually, if i rotate my camera with Pan, it work well but if i move camera above X,Y or Z Position, it dont move where camera was looking at..
STEP 1 TO 3, i don't want camera to go to red arrow, but green arrow, following Pan rotation (step2)
Thanks
I would like to know if there is a way, to control camera like video games?
For example, actually, if i rotate my camera with Pan, it work well but if i move camera above X,Y or Z Position, it dont move where camera was looking at..
STEP 1 TO 3, i don't want camera to go to red arrow, but green arrow, following Pan rotation (step2)
Thanks
- Agalar Ragimov
- Posts: 33
- Joined: 02 May 2017, 11:29
- Location: UAE - Dubai
Re: CAMERA VIEW
Hi Sribas!
Very interesting topic.
As an option, I can suggest to rotate the world instead of the camera, if it is possible in your project.
Of course it will not look with Global Light or HDR lighting but works well with some futuristic environment.
Very interesting topic.
As an option, I can suggest to rotate the world instead of the camera, if it is possible in your project.
Of course it will not look with Global Light or HDR lighting but works well with some futuristic environment.
*_* - You gotta do what you gotta do (even if you don't like it)
Re: CAMERA VIEW
Thanks for your reply, but i think there is a way to solve my problem trough camera...Agalar Ragimov wrote:Hi Sribas!
Very interesting topic.
As an option, I can suggest to rotate the world instead of the camera, if it is possible in your project.
Of course it will not look with Global Light or HDR lighting but works well with some futuristic environment.
here is my WIP (on X and Z for now) :
BLACK : POSITION OF CAMERA
BLUE : ROTATION ANGLE OF CAMERA (PAN)
GREEN : RATIO OF USE BETWEEN X AND Z POSITIONS(this ratio will make camera to moves on the exact angle given by PAN)
And now i have to found an expression to regulate X and Z positions uses with this 0-100%...
Re: CAMERA VIEW
So, finally, i used my scheme and find a ratio between X and Z to control camera.
Now camera allways follow rotation and position (here i made a video where i control camera with keyboard) :
https://youtu.be/W6OBg14Drr8
the ratio is clipped Ax0 to Ax1 matching with 0-100% angle each 90°.
Now camera allways follow rotation and position (here i made a video where i control camera with keyboard) :
https://youtu.be/W6OBg14Drr8
the ratio is clipped Ax0 to Ax1 matching with 0-100% angle each 90°.
- Agalar Ragimov
- Posts: 33
- Joined: 02 May 2017, 11:29
- Location: UAE - Dubai
Re: CAMERA VIEW
Well done! can yous share .vza file with us?sribas wrote:So, finally, i used my scheme and find a ratio between X and Z to control camera.
Now camera allways follow rotation and position (here i made a video where i control camera with keyboard) :
https://youtu.be/W6OBg14Drr8
the ratio is clipped Ax0 to Ax1 matching with 0-100% angle each 90°.
Thanks
*_* - You gotta do what you gotta do (even if you don't like it)
Re: CAMERA VIEW
There is still problem with this camera...Agalar Ragimov wrote:Well done! can yous share .vza file with us?sribas wrote:So, finally, i used my scheme and find a ratio between X and Z to control camera.
Now camera allways follow rotation and position (here i made a video where i control camera with keyboard) :
https://youtu.be/W6OBg14Drr8
the ratio is clipped Ax0 to Ax1 matching with 0-100% angle each 90°.
Thanks
I have to fix it :
when i move Pan rotation, then move position, then move Pan rotation and then when i move again position, it jump back to the 0 position.
Re: CAMERA VIEW
I have seen this video where the guy used Unity and Ventuz ( https://www.youtube.com/watch?v=KHf0IkeMiUc )
is it possible to use unity to control ventuz camera only?
is it possible to use unity to control ventuz camera only?
- Agalar Ragimov
- Posts: 33
- Joined: 02 May 2017, 11:29
- Location: UAE - Dubai
Re: CAMERA VIEW
Yes, you can control camera by sending values for the camera via OSC.sribas wrote:I have seen this video where the guy used Unity and Ventuz ( https://www.youtube.com/watch?v=KHf0IkeMiUc )
is it possible to use unity to control ventuz camera only?
Will it behave same as in Unity? I don't think so.
Anyway you have to add new expressions to the values that you will receive from Unity.
*_* - You gotta do what you gotta do (even if you don't like it)
Re: CAMERA VIEW
OSC ? so my problem still the same...Agalar Ragimov wrote:Yes, you can control camera by sending values for the camera via OSC.sribas wrote:I have seen this video where the guy used Unity and Ventuz ( https://www.youtube.com/watch?v=KHf0IkeMiUc )
is it possible to use unity to control ventuz camera only?
Will it behave same as in Unity? I don't think so.
Anyway you have to add new expressions to the values that you will receive from Unity.
I think i need to go through C# to get a camera controller like games.
Re: CAMERA VIEW
Hey guys,
doing this in C# is a lot easier of course, since you can easily store values across frames in a script node. Thus it is very easy to keep the old Pan and Position of the Camera and just add the changes to it every frame.
But you can achieve this with expressions as well. You can use the Loopbreaker Node to keep a value for a frame and additionally you can bind it to the Expression it came from.
Also I do not know if it is clear, but if you are rotating around the Y Axis you can calculate the forward vector easily using the Rotation, assuming that 0° has a forward vector of (0,0,1):
Forward.X = Sine(Angle), Forward.Z = Cosine(Angle).
I have attached a scene that does something similar like you need using expressions.
Also with this approach you can think of simulating more natural behavior like acceleration/deceleration, etc. You can compensate for frame drops by using a delta time (current time - last update).
For reference the scene contains a second 3D layer doing the same with a script plus adding acceleration behavior to it.
The examples are very rough and I have simplified the problem for your special case but you should get an idea of how to extend it in case you need to. For example you can use the Relative coordinates of the Direct Mouse Input Node to rotate the camera with the mouse instead of the keyboard. And of course doing stuff like acceleration is also possible with expressions - you just need to do some work for it.
Side Note:
Using Unity for such cases is pure overkill - although you could just send the values of View Matrix via OSC and put them together in a Manual Matrix Node. Both the effort for implementing and the performance during runtime are probably not worth calculating just some values.
Anytime you want to calculate data outside Ventuz it is a better idea to write a small command line tool that sends OSC commands.
doing this in C# is a lot easier of course, since you can easily store values across frames in a script node. Thus it is very easy to keep the old Pan and Position of the Camera and just add the changes to it every frame.
But you can achieve this with expressions as well. You can use the Loopbreaker Node to keep a value for a frame and additionally you can bind it to the Expression it came from.
Also I do not know if it is clear, but if you are rotating around the Y Axis you can calculate the forward vector easily using the Rotation, assuming that 0° has a forward vector of (0,0,1):
Forward.X = Sine(Angle), Forward.Z = Cosine(Angle).
I have attached a scene that does something similar like you need using expressions.
Also with this approach you can think of simulating more natural behavior like acceleration/deceleration, etc. You can compensate for frame drops by using a delta time (current time - last update).
For reference the scene contains a second 3D layer doing the same with a script plus adding acceleration behavior to it.
The examples are very rough and I have simplified the problem for your special case but you should get an idea of how to extend it in case you need to. For example you can use the Relative coordinates of the Direct Mouse Input Node to rotate the camera with the mouse instead of the keyboard. And of course doing stuff like acceleration is also possible with expressions - you just need to do some work for it.
Side Note:
Using Unity for such cases is pure overkill - although you could just send the values of View Matrix via OSC and put them together in a Manual Matrix Node. Both the effort for implementing and the performance during runtime are probably not worth calculating just some values.
Anytime you want to calculate data outside Ventuz it is a better idea to write a small command line tool that sends OSC commands.
- Attachments
-
- firstpersoncam.vzs
- (27.87 KiB) Downloaded 219 times