Go to advanced search

by paddyg
Thu Jul 30, 2020 12:12 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2706

Re: Pi3D - Embedding Display in Tkinter Window

... and there isn't one! Like "you are running this before a Display has been created, are you sure?" Hopefully the issue trying to re-run pi3d within the same python process is relatively simple, a matter of deleting or not deleting something critical, as you noticed, an awful lot of the ...
by Inkblot
Thu Jul 30, 2020 11:38 am
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2706

Re: Pi3D - Embedding Display in Tkinter Window

... I also had to comment out starting the mouse because I get the following error: Traceback (most recent call last): File "/home/user/Desktop/pi3d_test.py", line 188, in <module> draw() File "/home/user/Desktop/pi3d_test.py", line 139, in draw mymouse.start() File "/home/user/Desktop/pi3d_new/pi3d/Mouse.py", ...
by SohCahToa
Thu Jul 30, 2020 1:31 am
Forum: Other projects
Topic: Picture Frame: From basic to more advanced
Replies: 9
Views: 1504

Re: Picture Frame: From basic to more advanced

... correct math to do the rotation I am after. It was easier to visualise and simple angles to move the camera to face each side of the cube. import pi3d # create display DISPLAY = pi3d.Display.create(background=(0,0,0,0), frames_per_second=30) # create shader shader = pi3d.Shader('uv_flat') # create ...
by paddyg
Wed Jul 29, 2020 10:09 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2706

Re: Pi3D - Embedding Display in Tkinter Window

You don't need to worry about using the default centrally installed pi3d, adding the sys.path.insert before import pi3d works fine (That's why it's inserted at position 1 so it comes before anything else that might have pi3d in it too (the first entry in the ...
by Inkblot
Wed Jul 29, 2020 4:23 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2706

Re: Pi3D - Embedding Display in Tkinter Window

... and checkout the develop branch again (git clone ... then git checkout develop) and my code is: import sys sys.path.insert(1, '/home/user/Desktop/pi3d_new') import pi3d_new.pi3d as pi s = pi.Sphere() DISPLAY = pi.Display.create(w=500, h=500) while DISPLAY.loop_running(): s.draw() Then gives an ...
by paddyg
Wed Jul 29, 2020 2:12 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2706

Re: Pi3D - Embedding Display in Tkinter Window

... the windows etc. Also lines 361 to 405 in destroy() are common to all platforms so not likely to be x11 v Wayland issue. It would be nice if pi3d just worked under Wayland but I'm not holding my breath... What do you get if you $ loginctl then take the session number under SESSION - in my ...
by Inkblot
Wed Jul 29, 2020 1:35 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2706

Re: Pi3D - Embedding Display in Tkinter Window

I started to add print statements and none showed up and so decided to put one as the first line of the destroy method - it wasn't printed either. I looked around the code and saw a lot of x11 talk and literally just remembered that my Ubuntu version (18.04) uses gdm instead of x11 - could that poss...
by paddyg
Wed Jul 29, 2020 7:36 am
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2706

Re: Pi3D - Embedding Display in Tkinter Window

@Inkblot, It's possible to kill the window (not completely trivial if you look at the code https://github.com/tipam/pi3d/blob/develop/pi3d/util/DisplayOpenGL.py#L212 you will see that the X11 controls are a bit unweildly called from python) However the code wasn't getting to the ...
by Inkblot
Tue Jul 28, 2020 9:19 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2706

Re: Pi3D - Embedding Display in Tkinter Window

... or using the 'x' button The tkinter canvas I can simply close by calling destroy() and it removes the canvas Perhaps there is a way to get the pi3d process pi3d and then forcefully kill it using a module like psutil? Calling the destroy method of the display resets the instance (so it should ...
by paddyg
Tue Jul 28, 2020 9:57 am
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2706

Re: Pi3D - Embedding Display in Tkinter Window

... trace so the only way to pin them down is to put in print statements every other line! And there were several issues. see https://github.com/tipam/pi3d/commit/a637825af086858cb8587878ed2b4cd33f337ea4 It's only in the develop branch at the moment so if you want to try it you will have to `git clone ...
by paddyg
Mon Jul 27, 2020 6:57 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2706

Re: Pi3D - Embedding Display in Tkinter Window

Sorry @Inkblot, diverted onto other things but hopefully get back to the tk display surface eventually. But I will checkout why you can't kill off the pi3d display - that ought be be possible.

Paddy
by Inkblot
Mon Jul 27, 2020 6:51 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 2706

Re: Pi3D - Embedding Display in Tkinter Window

*Bump*

Just checking in ... but I should also add that calling DISPLAY.destroy(), DISPLAY.stop(), setting DISPLAY.loop_running to False all do not actually close the pi3d window. I would like to close the window but keep the program alive if possible
by paddyg
Sun Jul 26, 2020 4:53 pm
Forum: Other projects
Topic: Picture Frame: From basic to more advanced
Replies: 9
Views: 1504

Re: Picture Frame: From basic to more advanced

... the name? I would suggest trying different images to narrow down the issue - can you view the images using other apps or patching into one of the pi3d demos? Let me know if you're still stuck. I also see that you are rotating the Camera around the cube which simplifies the process of rotating ...
by SohCahToa
Sun Jul 26, 2020 2:23 pm
Forum: Graphics programming
Topic: pi3d light all sides of a cube made of planes
Replies: 0
Views: 507

pi3d light all sides of a cube made of planes

I have created this simple pi3d script in the process of trying to learn the framework. I hit a roadblock where two of the sides are always black when I am rotating the camera. I suspect it is a lighting issue, but I cannot figure out ...
by SohCahToa
Sun Jul 26, 2020 2:04 pm
Forum: Other projects
Topic: Picture Frame: From basic to more advanced
Replies: 9
Views: 1504

Re: Picture Frame: From basic to more advanced

... fast enough... PS presumably you've looked at thedigitalpictureframe.com Thanks for the reply, thedigitalpictureframe.com is what introduced me to pi3d. I love how simple the basic picture frame is to setup with the demo picture frame project, and just this month noticed the 2020 update. I am interested ...
by paddyg
Sun Jul 26, 2020 9:00 am
Forum: Troubleshooting
Topic: HDMI output isn't smooth
Replies: 1
Views: 287

Re: HDMI output isn't smooth

... coded values (i.e. 4, 8, 16, 32, 48, 64, 72, 96, 128, 144, 192, 256, 288, 384, 512, 576, 640, 720, 768, 800, 960, 1024, 1080, 1920) so by default pi3d will resize images to match these. On the RPi4 the GPU isn't constrained to these values and can go up to 3840 i.e. 4k monitors, which is what ...
by starmike
Thu Jul 23, 2020 1:27 pm
Forum: Troubleshooting
Topic: HDMI output isn't smooth
Replies: 1
Views: 287

HDMI output isn't smooth

Good day, I'm using pi3d's PictureFrame2020 to show movie posters on our old LG HDTV. It's working well, but I noticed that the images aren't antialiased. I tried everything I could think of to fix this with the HDMI settings and nothing ...
by kgc60
Sun Jul 12, 2020 5:25 am
Forum: Advanced users
Topic: Cool-retro-term
Replies: 17
Views: 6403

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. Thanks ...
by pidd
Sun Jul 12, 2020 2:41 am
Forum: Advanced users
Topic: Cool-retro-term
Replies: 17
Views: 6403

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

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

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

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

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

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

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, ...

Go to advanced search