Hi @ll!
I want to create a simple game with vvvv.
The cam have to follow the street that is generated as a 3D grid(ex9) (girlpower/retro machine with arbitrary from kalle) like a car and have to look a few vertices ahead. I tried to solve this with lookat, but it doesnt seemed to work. The cam “jumps” or isnt in the wished direction. Im a novice in using vvvv and I found only one explanation for “lookat” especially for the upvectors (this might be the prob). I didnt get it. Please have a look at my patch and give me a hint how to solve the cam-movement.
@kalle: this kalle.modules.ex9.geometry helped to get an arbitrary grid(ex9) out of the retro machine for export the street as a x-file (see test.x in my link).
…or what are you asking for?
instead of moving the cam along the street by taking the vertices out of it. it might be much easier to model a cam path over the street model in a 3d program and import it as geometry too. then use b-spline or another interpolation method to move from vertex to vertex of the cam path.
I thought I could solve it in vvvv, because I have already the vertices out of the street for moving the cam. Additional to that I want to create a lot of streets. So the solution have to be more variable than creating a cam-path manually afterwards. But many thanks for this suggestion tonfilm! That might be a solution for one static street. I ll try it if I find a way to open x-files in Cinema.
btw:
I play around a bit and now the cam (without “lookat”) is moving along the vertices. Only the right angle is missing at the curves.
hmm could’t find “upvector” also
but if you connect cartesian node to lookat you would have flip on pitch 0.25 and -0.25 and most strange about that is that cartesian value range jumping from 0.4999 to -0.5…
that nasty flip freaks some time’s normally i avoid that with rotate transform…
I found “upvector” in the www. Its the cam rotation at the choosen axis (google is my friend). Whatever that means and however that will help, because I dont believe the Upvector-Pin is declared in angles or in a value range.
Anyway; I tried antokhio rotate advise (thx for that idea). Now I can move my cam with a simple rotate (multiplied with the cam view projection). Manually it worked great, but I still dont know, how I can choose the angle automatically for the rotation pins. I think the solution have to do with the difference of the positions of the taken vertices. I wish my knowledge of math would be better.
The next prob: if you rotating the cam, the renderer sometimes doesnt display the objects… (Cam: Initiall Interest-Pin settings are wrong?)
So here comes the solution manually operated (play with the roate node). I uploaded also a new x-file, to make it a bit more interesting.
Please let me know if someone knows how to generate a automatically angle recognition.
I zipped the whole project for you. Its still in progress, but the (now cheerful) Bakerman roadgenerator is ready to use.
The minute the project is designed and fully tested (some logical mistakes are still in there, because of the growing and growing project) Ill post it again.
I wish I had more time…
p.s.
If someone wants to create cool design stuff for the project (lights are still missing; background is black; player, bads and goods are not designed a.s.o.), feel free to implement and share it for some learning lessons.
The Bakerman roadgenerator purpose is only to generate nice level as xfiles.