I was attempting to recreate a fireball visual effect in panda3d.
Here is a link to what I was attempting to recreate(only the very first effect in the opening).
And this is what I could do.
I decided to go for a more generic fireball look as that was easier but I’m still dissapointed with the results. Any tips or suggestions to make the effect more visually appealing or similar to what I was attempting to copy???
Also I made my version using:
A bright glowing sphere model with a pointlight attached to it and the bloom filter enabled and using the motion trail demo:
self.ball = self.loader.loadModel("models/icosphere")
...
self.ball.setColor(150, 0.5, 0, 1.0)
...
filters = CommonFilters(self.win, self.cam )
filters.setBloom(blend=(10, 10, 10, 0), desat=-0.5, intensity=0.4, size="large")
...
ball_light = PointLight("ball-light")
ball_light.setColor((50, 50, 0, 1))
plnp = self.ball.attachNewNode(ball_light)
plnp.setPos(self.ball.getPos() + Vec3(-15, 0, -2))
ball_light.setAttenuation(LVector3(0.7, 0.05, 0))
self.render.setLight(plnp)
...
self.flame_colors = (
Vec4(1.5, 0.5, 0.0, 1),
Vec4(1.3, 0.5, 0.1, 1),
Vec4(0.2, 0.2, 0.2, 1),
Vec4(1.0, 0.0, 0.0, 1),
)
fire_trail = MotionTrail("fire trail", self.ball)
fire_trail.register_motion_trail()
fire_trail.geom_node_path.reparent_to(self.render)
fire_trail.set_texture(self.loader.load_texture("models/plasma.png"))
fire_trail.time_window = 0.5
center = self.render.attach_new_node("center")
around = center.attach_new_node("around")
around.set_z(1)
center = self.render.attach_new_node("center")
around = center.attach_new_node("around")
radius = 2.0 # make this bigger for a larger circle
around.set_pos(0, 0, radius) # offset from center by desired radius
res = 4
for i in range(res + 1):
center.set_r((360.0 / res) * i)
vertex_pos = around.get_pos(self.render)
fire_trail.add_vertex(vertex_pos)
start_color = self.flame_colors[i % len(self.flame_colors)] * 1.7
end_color = Vec4(1, 1, 0, 1)
fire_trail.set_vertex_color(i, start_color, end_color)
LerpHprInterval(fire_trail, 20, (0, 0, -360)).loop()
LerpTexOffsetInterval(fire_trail.geom_node_path, 4, (1, 1), (1, 0)).loop()
fire_trail.update_vertices()
I’d love any videos or resources for being able to make visual effects with Panda3d or any suggestions or tips.
