Closed GoogleCodeExporter closed 9 years ago
Original comment by Kai.Saerthen.Darker
on 16 Feb 2012 at 9:04
We need linear and Hermite interpolations. Hermite one is useful for "rounding
angles".
Original comment by korn...@gmail.com
on 30 Apr 2012 at 8:51
http://people.sc.fsu.edu/~jburkardt/cpp_src/hermite/hermite.html
http://people.sc.fsu.edu/~jburkardt/cpp_src/spline/spline.html
Original comment by korn...@gmail.com
on 30 Apr 2012 at 8:54
http://forums.indiegamer.com/showthread.php?4905-Teach-me-splines-for&p=66079#po
st66079
http://www.ogre3d.org/docs/api/html/classOgre_1_1SimpleSpline.html
Original comment by korn...@gmail.com
on 1 May 2012 at 11:40
http://www.mvps.org/directx/articles/catmull/
Original comment by korn...@gmail.com
on 1 May 2012 at 12:14
Is Catmull-Rom enough for us? What is "направление камеры"?
Original comment by korn...@gmail.com
on 1 May 2012 at 12:27
Выглядит достаточным.
Направление камеры это точка в которую
смотрит камера ИЛИ поворот камеры. Пока
делай как тебе проще, в будущем нужно будет
поддержать оба варианта задания
направления для разных типов камератреков.
Original comment by Kai.Saerthen.Darker
on 1 May 2012 at 7:22
Since C-R algorithm takes t from 0.0 to 1.0, the formula to convert time to f
is calculated like this.
Suppose, we have 5 seconds time for interpolation. That means that 0f = 0t, and
1f = 5t, i.e., f(t) = t/5, where 5 is the specified time.
Thus we have:
f(t) = t/tmax.
Original comment by korn...@gmail.com
on 6 May 2012 at 12:45
I need to implement C-R interpolation in MJIN and add a new test. Or two tests
(for Linear one too).
Original comment by korn...@gmail.com
on 6 May 2012 at 12:47
[deleted comment]
Start with CatmullRomSpline class.
Original comment by korn...@gmail.com
on 6 May 2012 at 12:52
I can see some tangent recalculation in Ogre C-R implementation, but after
reading at MVP I can't get what they are for. Skip them for now. I will return
if my class won't work.
Original comment by korn...@gmail.com
on 6 May 2012 at 12:58
Continue.
Original comment by korn...@gmail.com
on 6 May 2012 at 1:26
Class is ready. Test it.
Original comment by korn...@gmail.com
on 7 May 2012 at 4:40
Fix CR impl so that non-passable (ending) points are generated automatically
(pnext - prev).
Original comment by korn...@gmail.com
on 8 May 2012 at 7:56
Continue with CatmullRomSpline::genAllPoints.
Original comment by korn...@gmail.com
on 8 May 2012 at 8:08
Done. Looks fine to me: http://www.youtube.com/watch?v=_BxUwSGgSmM
Now I need to implement scene nodes.
Original comment by korn...@gmail.com
on 8 May 2012 at 9:00
Before that, make it accept up to 6 values to interpolation, since camera
tracks will have 3 values for position, and 3 values for rotation.
Original comment by korn...@gmail.com
on 8 May 2012 at 1:55
No, first make up the format, since this time interpolations will only be used
for Camera tracks, thus, it's faster done by somewhat hard coding.
Original comment by korn...@gmail.com
on 9 May 2012 at 8:34
Also, add printing of camera pos + rot on some key for easier camera track
assembly.
Original comment by korn...@gmail.com
on 9 May 2012 at 8:38
Ok. Format has been already given some thought in the past, and it's fine.
I should only rename it's from Track to CameraTrack and add smth like
addCameraTrack method to Camera, along with a way to start/stop certain camera
track by name.
I need to think about CameraTrack class. May be I should change
CatmullRomSpline to interpolate only one variable? Think.
Original comment by korn...@gmail.com
on 9 May 2012 at 8:48
Create Sequence class which accepts points and can select interpolation type.
Original comment by korn...@gmail.com
on 9 May 2012 at 8:54
Nah. Let it be CameraTrack with position and rotation. Otherwise it can't be
automated to accept any number of values.
Original comment by korn...@gmail.com
on 9 May 2012 at 9:08
Try to make ending points the same as specified ones. Looks like it won't make
anything bad.
Original comment by korn...@gmail.com
on 9 May 2012 at 9:11
Continue with Sequence.
Original comment by korn...@gmail.com
on 9 May 2012 at 9:40
Sequence done. testSequence shows None, Linear, and Spline fine.
Now back to CameraTrack and how we're gonna bind it with Sequence.
Original comment by korn...@gmail.com
on 9 May 2012 at 12:50
Scene should load Tracks.
And CameraTrack should accept Camera and Scene. Then
CameraTrack::startSequence("Name") will be launching sequence read by Scene for
Camera.
Left:
1) Scene: read Tracks;
2) CameraTrack implementation.
Original comment by korn...@gmail.com
on 9 May 2012 at 1:30
Scene can now read CameraTracks. There's no need to save CameraTrack, because
of the coming changes in the future.
Left:
2) CameraTrack impl.
Original comment by korn...@gmail.com
on 9 May 2012 at 2:28
Due to new PC, build MJ/MJIN here.
Original comment by korn...@gmail.com
on 16 May 2012 at 2:22
MJIN compiled. MJ needs fixing after I finish it since I didn't yet fix Timer
usage.
Original comment by korn...@gmail.com
on 16 May 2012 at 3:04
Tests that render Scene in OGRE don't work on my new PC. Mahjong 0.9.1 works
perfect. Amazing.
I should fix MJ with Timer to see if it will run on my PC.
Original comment by korn...@gmail.com
on 16 May 2012 at 4:13
If MJ doesn't run, copy ogre,cegui,etc libs from previous PC to current one. No
time to search for problems. Especially in OGRE.
Original comment by korn...@gmail.com
on 18 May 2012 at 11:46
Doesn't work. The same problem with OGRE:
Program received signal SIGSEGV, Segmentation fault.
0x00000000000009b0 in ?? ()
(gdb) bt
#0 0x00000000000009b0 in ?? ()
#1 0x00007ffff6db44f7 in Ogre::Entity::getShadowVolumeRenderableIterator
(this=0x4082ed0,
shadowTechnique=<optimized out>, light=0x4083580, indexBuffer=0x1b38f80, extrude=false,
extrusionDistance=99850, flags=6) at /home/kornerr/rep/ogre/OgreMain/src/OgreEntity.cpp:1997
#2 0x00007ffff6f1c987 in Ogre::SceneManager::renderShadowVolumesToStencil
(this=0x1b34a60,
light=0x4083580, camera=0x1a16340, calcScissor=<optimized out>)
at /home/kornerr/rep/ogre/OgreMain/src/OgreSceneManager.cpp:5590
#3 0x00007ffff6f10acc in
Ogre::SceneManager::renderModulativeStencilShadowedQueueGroupObjects (
this=0x1b34a60, pGroup=0x41f5970, om=Ogre::QueuedRenderableCollection::OM_PASS_GROUP)
at /home/kornerr/rep/ogre/OgreMain/src/OgreSceneManager.cpp:2474
#4 0x00007ffff6eb3c92 in
Ogre::SceneManager::renderVisibleObjectsDefaultSequence (this=0x1b34a60)
at /home/kornerr/rep/ogre/OgreMain/src/OgreSceneManager.cpp:2316
#5 0x00007ffff6f07ed9 in Ogre::SceneManager::_renderScene (this=0x1b34a60,
camera=0x1a16340, vp=
0x16317e0, includeOverlays=<optimized out>)
at /home/kornerr/rep/ogre/OgreMain/src/OgreSceneManager.cpp:1529
#6 0x00007ffff6d7a03c in Ogre::Camera::_renderScene (this=0x1a16340,
vp=0x16317e0,
includeOverlays=false) at /home/kornerr/rep/ogre/OgreMain/src/OgreCamera.cpp:426
#7 0x00007ffff6e9c4b8 in Ogre::RenderTarget::_updateViewport (this=0x1c58aa0,
viewport=0x16317e0,
updateStatistics=true) at /home/kornerr/rep/ogre/OgreMain/src/OgreRenderTarget.cpp:199
#8 0x00007ffff6e9af4b in Ogre::RenderTarget::_updateAutoUpdatedViewports
(this=0x1c58aa0,
updateStatistics=true) at /home/kornerr/rep/ogre/OgreMain/src/OgreRenderTarget.cpp:177
#9 0x00007ffff6e978be in Ogre::RenderTarget::updateImpl (this=0x1c58aa0)
at /home/kornerr/rep/ogre/OgreMain/src/OgreRenderTarget.cpp:154
#10 0x00007ffff6eb65cc in Ogre::RenderTarget::update (this=0x1c58aa0,
swap=false)
at /home/kornerr/rep/ogre/OgreMain/src/OgreRenderTarget.cpp:611
---Type <return> to continue, or q <return> to quit---
#11 0x00007ffff6e9a37f in Ogre::RenderSystem::_updateAllRenderTargets
(this=0x797320,
swapBuffers=false) at /home/kornerr/rep/ogre/OgreMain/src/OgreRenderSystem.cpp:122
#12 0x00007ffff6f0894a in Ogre::Root::_updateAllRenderTargets
(this=this@entry=0x77d2b0)
at /home/kornerr/rep/ogre/OgreMain/src/OgreRoot.cpp:1403
#13 0x00007ffff6f08a10 in Ogre::Root::renderOneFrame (this=0x77d2b0)
at /home/kornerr/rep/ogre/OgreMain/src/OgreRoot.cpp:988
#14 0x00007ffff69ce2c1 in mjin::Window::onTimerTick (this=0x8b2df0)
at /home/kornerr/p/mjin/src/mjin/Window.cpp:88
#15 0x00007ffff69cd91d in mjin::Timer::update (this=0x8b2d90)
at /home/kornerr/p/mjin/src/mjin/Timer.cpp:111
#16 0x0000000000495cae in mj::Application::run (this=0x7fffffffe050)
at /home/kornerr/p/mj/src/mj/Application.cpp:140
#17 0x00000000004939cf in main (argc=3, argv=0x7fffffffe2d8) at
/home/kornerr/p/mj/src/main.cpp:44
Original comment by korn...@gmail.com
on 18 May 2012 at 11:55
Better yet: take 0.9.2 libraries which are known to work 100%.
Original comment by korn...@gmail.com
on 18 May 2012 at 11:58
Those libs work fine.
Time to write CameraTrack test.
Original comment by korn...@gmail.com
on 18 May 2012 at 12:23
Test done: http://www.youtube.com/watch?v=dIe0-ZfQ46w
Works fine, but there exist gimbal lock issues which should be carefully
avoided.
Now to make it into Mahjong.
Original comment by korn...@gmail.com
on 18 May 2012 at 1:27
looks good
Original comment by Kai.Saerthen.Darker
on 18 May 2012 at 8:22
Not clear how to be with Pause, Unpause, Loss, Victory camera tracks, because
the scene is hidden in these states.
Original comment by korn...@gmail.com
on 19 May 2012 at 7:03
Start: MainCore::onGameStart.
Pause/Unpause: MainCore::setActive.
Loss/Victory: MainCore::onGameStateChange(LOSS,VICTORY).
Original comment by korn...@gmail.com
on 19 May 2012 at 7:08
Implemented camera track "Start" sequence. Example in Room scene.
Original comment by korn...@gmail.com
on 19 May 2012 at 8:38
For other states we should not hide the scene. Try make it visible to some
extent.
Original comment by korn...@gmail.com
on 20 May 2012 at 2:06
We should simply shade the scene by half instead of displaying an image.
Original comment by korn...@gmail.com
on 21 May 2012 at 9:52
Added MenuBackgroundTransparent.png image which only contains text.
There's also a bug with startup sequence: after stopping it re-enables dynamic
camera, if we've paused the game, it re-enables it during that pause.
Original comment by korn...@gmail.com
on 21 May 2012 at 10:17
The bug will be solved separately: issue 482.
Continue with implementing pause/unpause sequences.
Original comment by korn...@gmail.com
on 21 May 2012 at 10:23
All sequences except for quit one have been implemented.
Original comment by korn...@gmail.com
on 22 May 2012 at 12:48
There's a problem with Victory/Loss textures however. Due to bug issue 483
Victory/Loss texture is defined by Classic since it's the first theme. To see
Distro's theme you have to move Classic somewhere else so that Distros become
the first.
As for quit sequence, I'm not sure if we want to hold user for long.
Original comment by korn...@gmail.com
on 22 May 2012 at 12:53
Original comment by korn...@gmail.com
on 22 May 2012 at 12:54
Fixed overlay bug. Only SCC left.
Original comment by korn...@gmail.com
on 22 May 2012 at 5:59
Fixed SCC.
Original comment by korn...@gmail.com
on 23 May 2012 at 12:31
Done.
Original comment by korn...@gmail.com
on 23 May 2012 at 12:34
Original issue reported on code.google.com by
Kai.Saerthen.Darker
on 18 Dec 2011 at 10:31