blender 2.72b
A whopping 2 fps, 90% of frametime spent on logic and a “uniform initialization is not allowed in GLSL 1.10” message on the console. And it looks gorgeous.
Wow ok I can see what I can do, do you have the version with the moving grass? Because this takes a lot more graphic power. I could try to optimize it someday.
It’s not the rendering stage, there’s something in a python script that is draining the game engine cycle but I have no error messages about that. It’s weird that I’m the only one noticing it.
update:
the uniforms are xPos e yPos in LScatter.txt (changing from uniform float to float makes the AMD drivers happy again)
And I think it’s the wind, it’s the only thing that can actually suck up all the logic.
You could probably only process x patches of grass per frame and have it look nice and run fast,
Just have a list and a property[‘Index’] and only process every other patch per frame, or 1/8th
At 60 fps it should still look pretty good.
Hm I´ll check for the Light Scatter Filter. Also I´m not a coder at all, so BPR I´m afraid I don´t know how to set up what you were talking about
import bge
cont =bge.logic.getCurrentController()
own=cont.owner
WindList =[]
Length=0
if 'WList' not in own:
scene=bge.logic.getCurrentScene()
for items in scene.objects:
if 'wind' in items:
WindList+=[items]
Length+=1
own['WList']=WindList
own['index']=0
own['Length']=Length-1
else:
X=5 ## will move 5 items per frame
while(X>0):
if own['index']>own['Length']:
own['index']=0
Target=own['WList'][own['index']]
if 'upDown' not in Target:
Target['upDown']=0
Target['Flip']=False
else:
if Target['upDown']>10:
Target['Flip']=True
if Target['Flip']==False:
Target['upDown']+=1
else:
Target['upDown']-=1
if Target['upDown']<0:
Target['Flip']=False
Target.worldPosition.z=Target.parent.worldPosition .z
Target.applyMovement((0,0,Target['upDown']*.1),1)
own['index']+=1
X-=1
Attachments
DivideLoad.blend (625 KB)
Bump -> added video