Rendering flashes on the screen

Rendering flashes on the screen

Postby jobenmoe » 15 Sep 2017, 02:03

Hello,
I'm trying to index the replay of the race recordings based on flashes. I want to programatically render a flash every other frames of the race. Can someone guide me on how I could do that? I'm already familiar with the GL32_draw2DRectangle function for drawing image but I need to know How I can draw flashes every other frame. I'm not too familiar with the structure of the code so it would help alot if someone could help with this.

Best,
Jason
jobenmoe
 
Posts: 11
Joined: 22 Aug 2017, 21:26

Re: Rendering flashes on the screen

Postby Auria » 15 Sep 2017, 02:11

Hi,

I guess it depend whether you envision the flash as being a light in the 3D world, or a GUI overlay.

For an in-engine flash done with lighting I'm probably not the best person to ask. This would likely involve changs to shaders

If you envision it as an overlay, take a look at states_screens/race_gui.cpp, that's where all the stuff is drawn.
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Rendering flashes on the screen

Postby Auria » 15 Sep 2017, 02:15

Oh I forgot... we already have a similar effect used to render lightning, take a look at graphics/post_processing.cpp, "renderLightning"
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Rendering flashes on the screen

Postby jobenmoe » 15 Sep 2017, 20:53

Auria,
Thank you for the reply. I was able to find another solution.
jobenmoe
 
Posts: 11
Joined: 22 Aug 2017, 21:26

Who is online

Users browsing this forum: Google [Bot] and 1 guest