Rain does not show in cutscenes

Rain does not show in cutscenes

Postby anne10 » 12 Jul 2017, 08:26

Hello I'm a new member to this forum. I want to contribute and have already built the game which is running. The issue is that rain does not show in cutscenes and it was suggested to me by @samuncle. The link to the issue is
https://github.com/supertuxkart/stk-code/issues/2874

Since I'm new to this, it'll be very helpful to be given some direction as to how I should proceed. Awaiting your reply..
Thanking you
anne10
 
Posts: 3
Joined: 06 Jul 2017, 21:56

Re: Rain does not show in cutscenes

Postby QwertyChouskie » 12 Jul 2017, 20:59

Related (though fixed): https://github.com/supertuxkart/stk-code/issues/1704
Might have some useful info.
User avatar
QwertyChouskie
 
Posts: 92
Joined: 29 Jun 2016, 14:57

Re: Rain does not show in cutscenes

Postby MTres19 » 12 Jul 2017, 21:41

Yes, most likely the particle emitter needs to follow the cutscene camera rather than the kart.
User avatar
MTres19
 
Posts: 135
Joined: 17 Aug 2015, 20:15

Re: Rain does not show in cutscenes

Postby Auria » 14 Jul 2017, 23:26

Another hint, take a look at Dm_sky_particles in file tracks/track.cpp and m_sky_particles_emitter in karts/controller/local_player_controller.cpp . It is indeed attached to a kart at this time
Image
User avatar
Auria
STK Moderator
 
Posts: 2786
Joined: 07 Dec 2009, 03:52

Re: Rain does not show in cutscenes

Postby anne10 » 15 Jul 2017, 11:35

Hey Auria, thanks for your suggestion..
Here what i find is "m_sky_particles_emitter" is getting initialized over here:

{l Code}: {l Select All Code}
m_sky_particles_emitter =
            new ParticleEmitter(track->getSkyParticles(),
                                core::vector3df(0.0f, 30.0f, 100.0f),
                                m_kart->getNode(),
                                true);


so i think, i need to pass instance of cut scene or the cut scene camera in place of "m_kart".
Am I right ? if so then please let me know which exact instance i need to pass over here ?

(edit by charlie/mod - wrapped the code in appropriate tags)
anne10
 
Posts: 3
Joined: 06 Jul 2017, 21:56

Re: Rain does not show in cutscenes

Postby MTres19 » 15 Jul 2017, 14:26

Sorry this isn't exactly an answer to your question, but I suggest looking at http://supertuxkart.sourceforge.net/doxygen/. You might find useful documentation there.
User avatar
MTres19
 
Posts: 135
Joined: 17 Aug 2015, 20:15

Re: Rain does not show in cutscenes

Postby Auria » 15 Jul 2017, 23:07

anne10 {l Wrote}:Hey Auria, thanks for your suggestion..
Here what i find is "m_sky_particles_emitter" is getting initialized over here:
m_sky_particles_emitter =
new ParticleEmitter(track->getSkyParticles(),
core::vector3df(0.0f, 30.0f, 100.0f),
m_kart->getNode(),
true);
so i think, i need to pass instance of cut scene or the cut scene camera in place of "m_kart".
Am I right ? if so then please let me know which exact instance i need to pass over here ?


I have not actually tried looking at the issue in detail, but from the top of my head what you are suggesting seems right

You can get the camera using Camera::getActiveCamera()->getCameraSceneNode() (graphics/camera.hpp)
Image
User avatar
Auria
STK Moderator
 
Posts: 2786
Joined: 07 Dec 2009, 03:52

Re: Rain does not show in cutscenes

Postby anne10 » 23 Jul 2017, 18:52

Hey Auria
Could you please tell me how do I test the cutscenes if I've been successful in adding rain in that or not?
Kindly reply to the question..
anne10
 
Posts: 3
Joined: 06 Jul 2017, 21:56

Re: Rain does not show in cutscenes

Postby QwertyChouskie » 23 Jul 2017, 21:06

Add:

{l Code}: {l Select All Code}
<weather particles="rain.xml" lightning="true" sound="rain"/>


to the scene.xml of a cutscene, then run the cutscene. The easiest way is to add it to the GPwin cutscene, create a custom GP in the game that just has one lap of a short race e.g. mathclass, the win that "GP" to trigger the GPwin scene.
User avatar
QwertyChouskie
 
Posts: 92
Joined: 29 Jun 2016, 14:57

Re: Rain does not show in cutscenes

Postby Auria » 23 Jul 2017, 23:43

QwertyChouskie {l Wrote}:Add:

{l Code}: {l Select All Code}
<weather particles="rain.xml" lightning="true" sound="rain"/>


to the scene.xml of a cutscene, then run the cutscene. The easiest way is to add it to the GPwin cutscene, create a custom GP in the game that just has one lap of a short race e.g. mathclass, the win that "GP" to trigger the GPwin scene.


That's right, to elaborate a bit more, cutscenes are found under the "tracks" folder in the data folder, for instance tracks/gpwin. Another way to test without having to race every time is to edit file states_screens\main_menu_screen.cpp and change "#define DEBUG_MENU_ITEM 0" to "#define DEBUG_MENU_ITEM 1", this will enable debug options on the main menu screen that make it easier to trigger cutscenes from the main menu
Image
User avatar
Auria
STK Moderator
 
Posts: 2786
Joined: 07 Dec 2009, 03:52

Who is online

Users browsing this forum: No registered users and 1 guest