Go to advanced search

by paddyg
Tue Jun 30, 2020 10:16 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2728

Re: Pi3D - Embedding Display in Tkinter Window

@Inkblot, sorry not to respond before. I do all the development of pi3d on ubuntu 18.04 so it ought to work ok. Embedding the display surface that pi3d (OpenGL) writes to in another GUI toolkit is a bit messy - I've done a couple of examples in pi3d_demos ...
by Inkblot
Fri Jun 26, 2020 6:28 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2728

Re: Pi3D - Embedding Display in Tkinter Window

Just an update on some issues I've run into I'm trying to read mouse inputs from the Pi3D window but have run into some difficulties. Assuming a mouse attribute inside in a class: def loop(self): mx, my = self.mouse.position() self.mouse_clicked(self.mouse.button_status(), ...
by Inkblot
Tue Jun 23, 2020 9:04 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2728

Pi3D - Embedding Display in Tkinter Window

I'm trying to place a Pi3d Display in a tkinter Frame Looking over the source code, I can see that the TkWin class inherits from Tk so I could (in theory) use: from pi3D import Display from tkinter import Tk def config(parent, win): ...
by Gavinmc42
Fri Jun 12, 2020 6:36 am
Forum: Gaming
Topic: Game Engine
Replies: 49
Views: 8011

Re: Game Engine

I started with Pygame years ago. Pi3D now has a Rust version. I nearly got Vulkan working, which means it is very close. Godot 4 is nearly here too, it is Vulkan capable. But Pi4 and min 4GB is need to compile this stuff yourself. I use my ...
by Parkle_Parkle
Wed Jun 10, 2020 1:24 am
Forum: Gaming
Topic: Game Engine
Replies: 49
Views: 8011

Game Engine

... works well on the Raspberry Pi 3B + :D ------------------------------------------------------------- :?: Now I think about Panda3d? or Uhro3D? or Pi3D? ))))))) maybe libraries will be needed and I don’t know which ones. ?????????????? Please tell me which engines and libraries are worth trying ...
by sapnho
Fri Jun 05, 2020 3:25 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 59847

Re: Image viewer with transition between images

And all the current options of Pi3D are summarized here: https://www.thedigitalpictureframe.com/ ... ry-config/

Thanks, Paddy, for a great update of Pi3D!
by sapnho
Fri Jun 05, 2020 3:21 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 59847

Re: Image viewer with transition between images

... was busy updating PictureFrame2020, I updated all the tutorials for building digital picture frames: https://www.thedigitalpictureframe.com/?s=pi3d If you want to change subdirectories you can use PiHelper (https://www.thedigitalpictureframe.com/pihelper-remote-control-raspberry-pi-picture-frame/) ...
by paddyg
Fri Jun 05, 2020 2:32 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 59847

Re: Image viewer with transition between images

... image loading I check if the variable a (for alpha but it's actually a uniform parameter passed to the shader) is less than 1 https://github.com/pi3d/pi3d_demos/blob/master/PictureFrame.py#L332 and prevent any file loading while the transition is taking place. If you do the image loading and ...
by satnerd
Fri Jun 05, 2020 1:33 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 59847

Re: Image viewer with transition between images

... I managed to get the .PNG based scrolling to work. Now, I noticed that the function tex_load in PictureFrame.py takes quite some time to load the pi3d.Texture: It takes 0.2s for a 100k picture, but whopping 4s for 3Mb. The effect on the scrolling items: The scrolling grinds to a halt. How would ...
by paddyg
Sat May 23, 2020 7:11 am
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 59847

Re: Image viewer with transition between images

... main image and probably not get nice edges. 2 stencil mask 3 tweak the shader. The latter two are further into the workings of OpenGL than most of pi3d but not so tricky. I will post some ideas later. Paddy EDIT: using the stencil is probably the easiest. Like this, i.e. enable just before drawing ...
by satnerd
Sat May 23, 2020 5:50 am
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 59847

Re: Image viewer with transition between images

... prevent the picture on display showing much longer than average. I retrieve weather information every 30 minutes. I am currently looking into the pi3d.TextBlock/pi3d.PointText implementation which is offering a rich set of functionality. Would it not possible to use «moving string/string moving» ...
by paddyg
Fri May 22, 2020 5:06 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 59847

Re: Image viewer with transition between images

... effect by changing the UV values on the plane you use to display the text. Here is a cut-down version to give you an indication what to do. import pi3d SCALE_FACTOR = 2.0 # this will make it half as big disp = pi3d.Display.create(w=960,h=600, frames_per_second=20) cam = pi3d.Camera(is_3d=False) ...
by satnerd
Fri May 22, 2020 12:00 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 59847

Re: Image viewer with transition between images

Hi Paddy For long texts, it would be nice to display a subset of the string as horizontally scrolling text. I implemented scrolling text using pi3d.TextBlock. I just update the text object with a varying substring. The resulting scrolling is very jerky. In ~/pi3d_demos/StringMulti.py is an example ...
by paddyg
Tue May 12, 2020 5:30 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 59847

Re: Image viewer with transition between images

... z location in front of the slide, use the uv_flat shader, set Texture.blend = True and draw() after drawing slide. Approximately like ... libre = pi3d.Textures("myfile.png", blend=True) plane = pi3d.Plane(w=libre.ix, h=libre.iy, z=0.1) #NB x,y both default zero puts it in the middle ...
by paddyg
Tue May 12, 2020 1:52 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 59847

Re: Image viewer with transition between images

... ###################################################### # FixedString. If SHOW_NAMES is False then this is just used for no images message text = pi3d.FixedString(config.FONT_FILE, "place-holder", justify="L") flatsh = pi3d.Shader("uv_flat") text.set_shader(flatsh) ...
by satnerd
Tue May 12, 2020 11:15 am
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 59847

Re: Image viewer with transition between images

... While using below block from PictureFrame.py, I noticed that sending a carriage return would not break lines as expected. textblock = pi3d.TextBlock(x=-DISPLAY.width * 0.5 + 50, y=-DISPLAY.height * 0.4, z=0.1, rot=0.0, char_count=199, text_format="{}".format(" "), ...
by paddyg
Tue Apr 21, 2020 8:12 pm
Forum: Graphics programming
Topic: PI3D - specify the HDMI port to use
Replies: 14
Views: 2121

Re: PI3D - specify the HDMI port to use

Sven, that sounds good. Rather than try to do any major re-engineering inside pi3d to cope with two Display instances, it's probably easiest to a) make the transition time long so the change in alpha with each frame is very small b) ensure that only one PictureFrame.py ...
by /tmp/sven
Tue Apr 21, 2020 6:09 pm
Forum: Graphics programming
Topic: PI3D - specify the HDMI port to use
Replies: 14
Views: 2121

Re: PI3D - specify the HDMI port to use

Ran fine the whole day.
Only the transition looks a little jerky, especially when both instances doing it at the same time, but can't see any memory or cpu peaks.

Might be an idea to change the code to use single pi3d instance and 2 sprites or something..

Sven
by paddyg
Mon Apr 20, 2020 5:35 pm
Forum: Graphics programming
Topic: PI3D - specify the HDMI port to use
Replies: 14
Views: 2121

Re: PI3D - specify the HDMI port to use

Sven, from James' comment it sounds like there might be issues with that. At some stage I will get a second screen set up and do some experiments... Meanwhile have you managed to get two instances of the PictureFrame app running at the same time? Does it run OK? There might be problems with memory i...
by /tmp/sven
Mon Apr 20, 2020 4:50 pm
Forum: Graphics programming
Topic: PI3D - specify the HDMI port to use
Replies: 14
Views: 2121

Re: PI3D - specify the HDMI port to use

Creating the pi3d window on the second screen works just fine with: DISPLAY = pi3d.Display.create(x=1920, y=0, w=1920, h=1080, .. Might be off topic now but is there a way to disable the screen spanning having 2 screens (:0.0, :0.1) ...
by paddyg
Mon Apr 20, 2020 1:45 pm
Forum: Graphics programming
Topic: PI3D - specify the HDMI port to use
Replies: 14
Views: 2121

Re: PI3D - specify the HDMI port to use

... back. OK back now. What I can do on my ubuntu laptop - which sounds like it's the way rasbian might be set up - is to start a second instance of pi3d running, and in that one move the display off to one side. If I make the x position equal to the screen width it goes right off and appears on ...
by /tmp/sven
Mon Apr 20, 2020 1:31 pm
Forum: Graphics programming
Topic: PI3D - specify the HDMI port to use
Replies: 14
Views: 2121

Re: PI3D - specify the HDMI port to use

Indeed, performance is quite non-existing.

Any other hint to get access to the screens individually in Xorg by 0.0 and 0.1?
by jamesh
Mon Apr 20, 2020 1:22 pm
Forum: Graphics programming
Topic: PI3D - specify the HDMI port to use
Replies: 14
Views: 2121

Re: PI3D - specify the HDMI port to use

Hey Paddy, thank you for guiding me into the right direction. To get both displays running I can't use 'dtoverlay=vc4-fkms-v3d'. But having this commented out vc4 module isn't loaded. I loaded it by hand and all of a sudden everything just works fine. To sum things up: config.txt [pi4] # dtoverlay=...
by /tmp/sven
Mon Apr 20, 2020 12:43 pm
Forum: Graphics programming
Topic: PI3D - specify the HDMI port to use
Replies: 14
Views: 2121

Re: PI3D - specify the HDMI port to use

Hey Paddy, thank you for guiding me into the right direction. To get both displays running I can't use 'dtoverlay=vc4-fkms-v3d'. But having this commented out vc4 module isn't loaded. I loaded it by hand and all of a sudden everything just works fine. To sum things up: config.txt [pi4] # dtoverlay=v...
by paddyg
Sun Apr 19, 2020 9:09 am
Forum: Graphics programming
Topic: PI3D - specify the HDMI port to use
Replies: 14
Views: 2121

Re: PI3D - specify the HDMI port to use

... (using raspi-config/advanced/GLdriver) to Fake KMS. I checked that does indeed toggle the existence of the vc4 line in /proc/modules. So for pi3d to work on RPi4, PLATFORM has to be PLATFORM_LINUX (i.e. 3). (Also the X11 server has to be running, using boot to desktop, startx or xinit etc) ...

Go to advanced search