Go to advanced search

by pidd
Sun Jul 12, 2020 2:41 am
Forum: Advanced users
Topic: Cool-retro-term
Replies: 17
Views: 4895

Re: Cool-retro-term

The answer is here but you also have to look through multiple answers after this one https://pi3d.github.io/html/FAQ.html#egl-no-surface

The bit later on telling you to set up multiple links is probably the bit you need to do but I have no knowledge of any of this.
by SohCahToa
Sat Jul 11, 2020 4:18 pm
Forum: Other projects
Topic: Picture Frame: From basic to more advanced
Replies: 9
Views: 811

Picture Frame: From basic to more advanced

... I have figured out how to save my images to the cloud and then pull them down to the pi and display them full screen with feh. I moved to pi3d to get a nicer transition between the photos (slow fade). But I’d like to make some other types of transitions such as looping between slide right, ...
by Inkblot
Wed Jul 01, 2020 8:46 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 1771

Re: Pi3D - Embedding Display in Tkinter Window

Thanks again paddy, I'll be here waiting for a response ;) in the meantime, I'll see if I can optimise my end a bit to reduce cpu usage
by paddyg
Wed Jul 01, 2020 7:13 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 1771

Re: Pi3D - Embedding Display in Tkinter Window

Hiding the pi3d window is easy enough now. Use the Display.resize() method to move it off to one side (or off the bottom). I also created the blank canvas from the code rather than having an image the right size. from tkinter import ...
by Inkblot
Wed Jul 01, 2020 3:24 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 1771

Re: Pi3D - Embedding Display in Tkinter Window

@paddyg Great! So I've had a little play around and I can confirm the solution does work. I just need to setup the scene and then do all input reading via tkinter and then run the appropriate functions to alter the scene. Only issue is that the inputs are a little slow but for now it's perfectly fin...
by paddyg
Wed Jul 01, 2020 3:08 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 1771

Re: Pi3D - Embedding Display in Tkinter Window

@Inkblot, sounds hopeful, and I would be keen to add the code, once it's fixed, so there's a tk alternative to qt and gtk in pi3d_demos.

I will revisit the issue of hiding the screen as well possibly more efficient ways of doing this later tonight if I get a chance.

Paddy
by Inkblot
Wed Jul 01, 2020 2:11 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 1771

Re: Pi3D - Embedding Display in Tkinter Window

... is just taking a screenshot and pasting it into the GUI toolkit so I tried the same with tkinter: from tkinter import Tk, Canvas import pi3d from PIL import ImageTk, Image class TkWin(Tk): def __init__(self, title): super().__init__(className=title, baseName=title) self.DISPLAY = pi3d.Display.create(w=500, ...
by paddyg
Tue Jun 30, 2020 10:16 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 1771

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: 1771

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: 1771

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: 47
Views: 3101

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: 47
Views: 3101

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: 265
Views: 51444

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: 265
Views: 51444

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: 265
Views: 51444

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: 265
Views: 51444

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: 265
Views: 51444

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: 265
Views: 51444

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: 265
Views: 51444

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: 265
Views: 51444

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: 265
Views: 51444

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 of the screen ...
by paddyg
Tue May 12, 2020 1:52 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 265
Views: 51444

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) text.sprite.position(x=-DISPLAY.width ...
by satnerd
Tue May 12, 2020 11:15 am
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 265
Views: 51444

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(" "), size=0.99, spacing="F", ...
by paddyg
Tue Apr 21, 2020 8:12 pm
Forum: Graphics programming
Topic: PI3D - specify the HDMI port to use
Replies: 14
Views: 1401

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: 1401

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

Go to advanced search