Hello, i create a basic totalwar like game, and i have a problem for generate a big army.
i want to generate 40k soldiers, for make this i can create a model for far unit that represent 1000 soldiers for example.
But I would like to know what other options are with panda3d.
i make an exemple with cube, i use the Advanced Instancing
and i call a flattenstrong at the end, but flattenstrong “not work”, the function work, but with or without flattenstrong, i have same fps, why ?
if I’ve understood correctly, the aim of flattenstrong is to merge several objects into 1 and reduce drawcall.
But maybe I’m using it wrong.
from direct.showbase.ShowBase import ShowBase
from panda3d.core import load_prc_file_data, NodePath
class Application(ShowBase):
def __init__(self):
super().__init__()
base.setFrameRateMeter(True)
box = self.loader.load_model("box.egg")
box.setPos(0, 0, 0)
chorusline = NodePath('chorusline')
for y in range(10):
for i in range(200):
placeholder = chorusline.attachNewNode("mybox")
placeholder.setPos(i * 3, y * 3, 0)
box.instanceTo(placeholder)
chorusline.flattenStrong()
chorusline.reparentTo(render)
Application().run()
an other way, it’s possible to create a 2d object for far unit ?
it’s a shame to create “complex” 3d objects just to draw a far army in 2d.
for near soldiers, i use lod, my issue is only for far unit, what is best way.