it runs on my machine with ~ 20 fps :frowning:
how is it working to set the jpg compression??

#dirk-r.hochegger 2007 streamRENDER

have fun

from pandac.PandaModules import loadPrcFileData
loadPrcFileData( ‘’, ‘framebuffer-multisample 2’ )
loadPrcFileData( ‘’, ‘win-size 320 240’ )
loadPrcFileData( ‘’, ‘fullscreen 0’ )
from direct.directnotify.DirectNotifyGlobal import *

from pandac.PandaModules import *
from direct.showbase.DirectObject import DirectObject
from direct.gui.OnscreenText import OnscreenText

from pandac.PandaModules import CollisionTraverser,CollisionNode
from pandac.PandaModules import CollisionHandlerQueue,CollisionRay
from pandac.PandaModules import Filename
from pandac.PandaModules import PandaNode,NodePath,Camera,TextNode
from pandac.PandaModules import Vec3,Vec4,BitMask32
from direct.gui.OnscreenText import OnscreenText
from import Actor
from direct.task.Task import Task
from direct.showbase.DirectObject import DirectObject
import random, sys, os, math
from pandac.PandaModules import AmbientLight,PointLight
from pandac.PandaModules import Point3,Vec3,Vec4
from pandac.PandaModules import Filename,Shader
from pandac.PandaModules import Material,LRotationf,NodePath
from pandac.PandaModules import DirectionalLight
from pandac.PandaModules import LightAttrib
from direct.gui.OnscreenImage import OnscreenImage
from pandac.PandaModules import TransparencyAttrib

import direct.directbase.DirectStart

class frame(DirectObject):

def __init__(self):
    # model
    self.model = loader.loadModel('models/infoBOX')
    self.ONscreenROOM=OnscreenImage(image = 'onscreen/overlayDUMMY.tif', pos = (.1, 0, -.3), scale = (1.45,1,1.3))
    print "XX"
    # RendertoTEXTURE

    self.sceneBuffer ='xx', 320,240 )
    self.card = base.bufferViewer
    x = self.sceneBuff.getXSize()
    y = self.sceneBuff.getYSize()

    print x
    print y

    self.sceneCam = base.makeCamera(self.sceneBuffer) = self.sceneCam

    def renderSTREAM(task):
        return Task.cont
    taskMgr.add(renderSTREAM, "renderSTREAM")

f = frame()



If I had to take a wild guess, there’s probably a config variable in panda’s config file.

Oh, I didn’t understand the poster’s question at first. You mean you’re asking to set the level of compression for writing jpeg images? Yes, there is a config variable:

jpeg-quality 95

95 is the default value; legitimate values range from 0 to 100, with 95 being the largest useful value (larger values produce much bigger files without much better quality).


It definately helps increasing your framerate if you make the texture a power of two. (e.g. 512x512, 128x128, 1024x32, or something like that)

I suspect that encoding a JPG isn’t a particularly fast operation, so I wouldn’t expect the framerate to ever get that high.

thanks alot :slight_smile:. ive to make perfomance tests -> compression speed and decompression.

i cant find a function to kick the texture buffer in the engine. so, i wanna load that stream into another panda app by setting a flexible refreshrate, but panda buffers the texture and not refreshes it!

about the result which i wanna test:
its years ago where i start to think on that way of relation rendering (i got this idea by rebuilding a city in 3d) so why should engine have to render everything which is in view for each frame??? its humbug!! hidden surface elimation is such great in combination with dynamic distance refreshrenderer :smiley: -> like models which overlap a distance from ~ 50 meters to render just ~20fps at 100 meters ~15fps at 150 m ~ 10fps … and project those renderd objects on a billboard (plane) . the result should be a dynamic realtion rendering. to get a complete city into the screen. i hope :wink: