Go to advanced search

by paddyg
Sun Jan 17, 2021 11:40 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 53023

Re: Image viewer with transition between images

... the code has now diverged - in which case I manually integrate the changes... However if you look at the issues and discussion https://github.com/pi3d/pi3d_demos/discussions/41#discussioncomment-268838 you will see that (partly because of all the excellent contributions over the years) the picture ...
by paddyg
Fri Jan 15, 2021 10:30 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 53023

Re: Image viewer with transition between images

Yes, of course. Well spotted. If you look in PictureFrame2020 you will see that the alpha value of the text_bkg Shape is set to a value varying from 0 to 0.6 then back to 0 . That alpha setting changes a uniform variable unif[17] that is passed to the shader (where it is interpreted as a 2D array un...
by jgodfrey
Fri Jan 15, 2021 6:26 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 53023

Re: Image viewer with transition between images

... overlay an image, it's *much* too dark - which is why I settled on 40-50% transparency at the bottom. Is there some other blend-mode at work in pi3d that makes the resulting blend much lighter than I see elsewhere?
by jgodfrey
Thu Jan 14, 2021 11:35 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 53023

Re: Image viewer with transition between images

... (from your originally posted code above) that allows it to work with varying scrim heights. So, this.. bkg_ht = DISPLAY.height // 4 . . text_bkg = pi3d.Plane(w=DISPLAY.width, h=bkg_ht, y=-DISPLAY.height // 2 + bkg_ht // 2, z=4.0)
by jgodfrey
Thu Jan 14, 2021 8:11 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 53023

Re: Image viewer with transition between images

Thanks for the update @paddyg and I'm happy that you like the scrim idea... Also, thanks for the pi3d core updates and the sample numpy scrim-transparency creation code. I'll replace my static image with something similar.
by paddyg
Thu Jan 14, 2021 6:43 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 53023

Re: Image viewer with transition between images

... system is amazing. It really is almost impossible to see. I think I will convert the standard system as per this """ back_shader = pi3d.Shader("mat_flat") text_bkg = pi3d.Sprite(w=DISPLAY.width, h=90, y=-DISPLAY.height * 0.4 - 20, z=4.0) text_bkg.set_shader(back_shader) ...
by jgodfrey
Thu Jan 14, 2021 6:14 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 53023

Re: Image viewer with transition between images

... for your review (perhaps as a standard pull request?) if there's any interest. Anyway, thanks again for the input and the great work on pi3d and the pictureframe script.
by paddyg
Thu Jan 14, 2021 5:53 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 53023

Re: Image viewer with transition between images

... that the simple conversion of uint8 2. the ability of GLSL to define floats as highp, mediump, lowp and some GPUs (Mali) that have been used with pi3d don't support highp (can't remember if they support medium) but I think lowp is fixed with 1/256 precision. So just in case the cut-off value gets ...
by jgodfrey
Wed Jan 13, 2021 10:51 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 53023

Re: Image viewer with transition between images

I've recently started playing with a Pi4-based photo frame using Pi3D and the PictureFrame2020.py demo. I've been hacking on the script and have run into something I have a question about. For the text overlay, I'm not really fond of the "gray bar" ...
by paddyg
Wed Jan 06, 2021 11:27 am
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 53023

Re: Image viewer with transition between images

TLDR; ... "--show_text", default="", ... Hi, Yes this forum still sends me emails when anyone posts something on this thread! The value of config.SHOW_TEXT controls what text gets show see here and that gets set in config.py by looking at the string entered in --show_text see her...
by gnic
Tue Jan 05, 2021 10:20 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 279
Views: 53023

Re: Image viewer with transition between images

Not sure if anyone is reviewing this forum anymore, but figured I'd post anyway and see what happens... Installed Pi3d today for use as a picture frame with the PictureFrame2020.py program. AMAZING STUFF !!!! Reviewing the config file, it's not clear to me how to DISABLE displaying ...
by RaTTuS
Tue Dec 08, 2020 12:36 pm
Forum: Beginners
Topic: Service file syntax
Replies: 4
Views: 180

Re: Service file syntax

so much wrong ... but lets start User=pi ExecStart=sudo vcgencmd display_power 1 don't use use pi and then sudo - this is wrong on so many levels do you need sudo to do this - make it all work as a user then have a script in your home directory call it e.g. piccy #!/bin/bash vcgencmd display_power 1...
by Duzeper
Tue Dec 08, 2020 12:28 pm
Forum: Beginners
Topic: Service file syntax
Replies: 4
Views: 180

Re: Service file syntax

Sorry, I'm a complete newbie at this: [Unit] Description=Photo Frame On service [Service] Type=oneshot User=pi ExecStart=sudo vcgencmd display_power 1 test -f usbdrive/subdir.txt && subdirvar=$(cat usbdrive/subdir.txt) || subdirvar="" ExecStart=/usr/bin/python3 /home/pi/pi3d_demos/...
by tasulife
Sun Nov 22, 2020 6:16 am
Forum: Graphics programming
Topic: RPI4 - what options for shader programming?
Replies: 20
Views: 1242

RPI4 - what options for shader programming?

... and configured to run without warnings. It's hard for me to determine if these libraries are even working on RPI4 at all. I have not tried pi3d yet, I'll do that tomorrow. I can program in Python or c++ or whatever, I don't care what the language is. I'm looking for suggestions on how to ...
by mblovell
Fri Nov 20, 2020 2:37 am
Forum: Graphics programming
Topic: Questions on DRM/KMS, dumb buffers, fbdev, etc
Replies: 16
Views: 1126

Questions on DRM/KMS, dumb buffers, fbdev, etc

... If I did want to make the Python script more sophisticated, is there any good library that provides DRI bindings for Python? This project, http://pi3d.github.io/html/index.html , seems promising, even though I'm not really aiming for any 3D rendering. There, I think that's it! :) Basically, I ...
by paddyg
Fri Nov 06, 2020 11:23 am
Forum: Other programming languages
Topic: Installing Rust on Pi 4, 32 bit Pi OS.
Replies: 2
Views: 839

Re: Installing Rust on Pi 4, 32 bit Pi OS.

... fine. So it looks like the problem has been fixed. Paddy PS I wonder if this was related to the 'adoption' of RPi by cannonical. //TODO test out pi3d and rust on ubuntu desktop.
by paddyg
Sun Nov 01, 2020 12:48 am
Forum: General discussion
Topic: Integrating with physics engine
Replies: 2
Views: 178

Re: Integrating with physics engine

... you've brought it to my attention. I don't see any reason not to. Generally the rotations in physics engines are defined as quaternion whereas pi3d uses euler angles - but you can almost certainly get those, or else actual translation matrices which can be applied to pi3d objects. I will let ...
by sprotz
Sat Oct 31, 2020 8:03 pm
Forum: General discussion
Topic: Integrating with physics engine
Replies: 2
Views: 178

Integrating with physics engine

I just wanted to ask. Can pi3d be easily integrated with a physics engine like Newton, ODE or Bullet ?
by Inkblot
Fri Jul 31, 2020 8:05 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 1891

Re: Pi3D - Embedding Display in Tkinter Window

I think a warning and then the attribute error is a bit overkill, how about a custom exception/assertion that signifies the warning? Similar to the single instance display assertion.
by paddyg
Fri Jul 31, 2020 7:01 am
Forum: Other projects
Topic: Picture Frame: From basic to more advanced
Replies: 9
Views: 861

Re: Picture Frame: From basic to more advanced

I put some stuff up here. Not sure if it clarifies it or not. http://paddywwoof.github.io/pi3d_book/_ ... index.html

Paddy

PS matrices, vectors and linear algebra are really quite lovely when you get into 3D graphics!
by paddyg
Thu Jul 30, 2020 12:12 pm
Forum: Graphics programming
Topic: Pi3D - Embedding Display in Tkinter Window
Replies: 19
Views: 1891

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

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

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

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

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

Go to advanced search