Sun / Godrays in Formula 1 Racer

Little something I’m working on for a client:

Not quite right yet and way too dark, but it’s getting there.


Does this use Panda’s built-in godray code?

I’d suggest to use these programs for game recording for better performance:

and … c_Pack.htm

I adapted it from the sun in the Naith cove level. If there are better ways I’d love to hear about them. :slight_smile:

Ah. I think I used the same code in Naith as I integrated into Panda3D. :slight_smile:

…then I applaud your contribution. It’s really quite awesome! :slight_smile:

Nice work!

I’d make sure in the future that your work uses no copyrighted works (it could get you into trouble)

(The Intel logo’s, and the copyrighted Evanescence music…)

It looks pretty nice though!


It looks like the rays are lagging behind by a frame, you might need to set a priority on that pass/buffer so it gets rendered before the main render.

Covered I think. The track is something I managed to convert into Panda3D from an existing racer out there. There’s an agreement now between them and my client that I helped forge. All of the “sponsors” (Intel etc.) can and will be changed ultimately.

The music was just something YouTube offered up on its AudioSwap - so assume it must be ok. :slight_smile:

At teedee - not sure. I have been tweaking/improving it, it’s getting a lot better … but I’ll look at the priorities.

…ok, I added a sort value:

      self.updateTask = taskMgr.add(self.update, 'sky-update', sort=-1)

…is that what you meant? (all other tasks were added with the default sort value of zero). It does seem a lot less “flickery” now. :slight_smile: Or did you mean the priority on setShaderInput?

Guess I’ll just play around, bit of a learning curve going on here. :slight_smile:

Specifically, it seemed when the camera moved quickly that the rays were out of sync with the rest of the scene. You can see it between 8 seconds and 10 seconds in the video.

A task priority sounds like a good idea. If it renders into an off-screen buffer you might need to set a priority on that as well. I don’t know how it is implemented so I can’t say for sure.

Looking good, keep it up!

Looks good.

Bit of an update:

Not perfect, but getting closer daily. :slight_smile:


Bit more:

…I’m gonna stop posting it here now, since it could become annoying for some users. Those who are interested subscribe to my youtube channel and I’ll post periodic updates there.

Still - this is about my “best result” Panda3D project to date. I’m quite pleased with myself on this one. :slight_smile:

Best Regards,

Why do you think that reading about an interesting Panda project should be annoying? :open_mouth:
Moreover, Panda would benefit from showing projects which use it. :wink:
Anyway, subscribed. :wink:

Nice work so far, maybe add a desaturate filter shader to get not so strong colors.


I don’t know, it could get annoying for some to see constant updates of a project. It has, however, been a little while so I don’t feel so bad showing this video using collision solids to assist an AI driver:



darthrigg did you succeed in setting priority on the buffer like teedee suggested ? I’m having problems as well with texture buffers lagging frames behind.


I ended up dropping the god rays for now - the project has gotten quite complicated and I’m currently fighting performance issues. Mainly with a collision ray that is driving me nuts - just cannot seem to get the performance under control! Pstats is helping thankfully. :slight_smile:

darthrigg, is this going to be volume 2 for MGF? I followed volume 1 religiously and am going through withdrawals without another one!