Go to advanced search

by paddyg
Sat May 06, 2017 8:35 pm
Forum: Python
Topic: pi3d - Sprites laying over textblock????
Replies: 6
Views: 325

Re: pi3d - Sprites laying over textblock????

Ash, I can't think of a specific limit for the number of TextBlocks you can add to one PointText object. In pi3d_demos.StringMulti.py there are 13 and it seems to work OK when I add several more. However when you create the PointText you have to specify the maximum number of ...
by AshPowers
Sat May 06, 2017 6:59 pm
Forum: Python
Topic: pi3d - Sprites laying over textblock????
Replies: 6
Views: 325

Re: pi3d - Sprites laying over textblock????

... feedback! Yes, I did get things sorted out with the bluetooth connection. Silly oversight on my part. However, I have come across something with pi3d again... Is there a limit to how many textblock items you can create? It seems that it will only allow 10. I've tried every way, and sideways, ...
by paddyg
Sat May 06, 2017 4:28 pm
Forum: Python
Topic: pi3d - Sprites laying over textblock????
Replies: 6
Views: 325

Re: pi3d - Sprites laying over textblock????

That dashboard looks amazing, it's really uplifting to see the stuff people do with the Raspberry Pi, especially if they've not been coding long (three weeks of python is very little to be fixing things like this). On your serial try catch question. You've probably sorted it out from douglas and dav...
by AshPowers
Sat May 06, 2017 12:43 pm
Forum: Python
Topic: pi3d - Sprites laying over textblock????
Replies: 6
Views: 325

Re: pi3d - Sprites laying over textblock????

Hi Paddy! I feel a bit starstruck! I've seen SO many of your posts since picking up this RPi3 three weeks ago and all of the searches I've done while picking up Python - immensly helpful!. :) I have been on this project some 200+ hours already in that time and over 300 lines of solid code in this au...
by paddyg
Sat May 06, 2017 12:42 pm
Forum: Python
Topic: pi3d font definitions killing background
Replies: 2
Views: 234

Re: pi3d font definitions killing background

64 seems to be the most capricious GPU setting as sometimes it works and sometimes it doesn't. Changing a host of things can stop rendering - there should be a logger message now (as of v2.19) I haven't had an issue with 128
by paddyg
Sat May 06, 2017 9:42 am
Forum: Python
Topic: pi3d - Sprites laying over textblock????
Replies: 6
Views: 325

Re: pi3d - Sprites laying over textblock????

@AshPowers, thanks for struggling on with various pi3d quirks; I will add them to the FAQ for the sake of others. The lack of GPU memory symptoms are so varied they're quite hard to figure out, especially if you're just getting to grips with a new ...
by AshPowers
Fri May 05, 2017 6:35 pm
Forum: Python
Topic: pi3d - Sprites laying over textblock????
Replies: 6
Views: 325

pi3d - Sprites laying over textblock????

pi3d.textblock is being "overdrawn" by pi3d.imagesprite text is actually on the screen, behind the "background" sprite that takes up the entire display area. Other sprites are showing up along with the background sprite. When ...
by AshPowers
Fri May 05, 2017 6:18 pm
Forum: Python
Topic: pi3d font definitions killing background
Replies: 2
Views: 234

Re: pi3d font definitions killing background

Problem was memory allocation. The default of 64MB for the GPU was not enough. I thought I had already bumped it up!

Menu-Rasbberry pi configuration - performance - GPU memory: set to 256
by AshPowers
Tue May 02, 2017 3:22 am
Forum: Python
Topic: pi3d font definitions killing background
Replies: 2
Views: 234

pi3d font definitions killing background

... need to be in white. There is a background image of a gauge cluster which has moving needles, digital values, etc. When I make a call to a second pi3d.Font definition for a white color text, the background image no longer appears. Program runs just fine, but all you see are a bunch of analog needles ...
by AshPowers
Mon May 01, 2017 9:50 pm
Forum: Python
Topic: pi3d string text color ??
Replies: 2
Views: 198

Re: pi3d string text color ??

Actually figured it out a few hours after posting.

You can change the text color of a string in the font definition.

Code: Select all

myfont = pi3d.Font('fonts/fontname.ttf', (x, x, x, a))
x,x,x = RGB and the a value is alpha.
by scotty101
Sun Apr 30, 2017 10:08 pm
Forum: Python
Topic: pi3d string text color ??
Replies: 2
Views: 198

Re: pi3d string text color ??

Looks like you can change colour with TextBlock

https://pi3d.github.io/html/pi3d.util.h ... .TextBlock

And you can change String colour by defining the colour of the font used

https://pi3d.github.io/html/pi3d.util.h ... .util.Font
by AshPowers
Sun Apr 30, 2017 7:55 pm
Forum: Python
Topic: pi3d string text color ??
Replies: 2
Views: 198

pi3d string text color ??

Hi,

Having issues with trying to change the color of the text put on the screen using pi3d.String.

Cannot seem to find any documentation on how to do this. It is limited to just white characters??

Thanks!
-Ash
by paddyg
Fri Apr 28, 2017 10:56 pm
Forum: Python
Topic: imports 2 to 3
Replies: 4
Views: 294

Re: imports 2 to 3

in pi3d we used the six module functions so the code gets converted 'on the fly' which means the same code runs with py2 or py3 (and pypy) However there is a small processing cost for doing this. You *could* patch the 'wrong' ...
by paddyg
Tue Apr 25, 2017 2:06 pm
Forum: Python
Topic: pypy with numpy
Replies: 0
Views: 135

pypy with numpy

I've just been checking out the progress of pypy (specifically whether or not pi3d will 'just' work with it now) On ubuntu it was surprisingly straightforward and worked very well, just four numpy functions missing (that had little impact). On the Raspberry Pi, ...
by Cigano1434
Mon Apr 24, 2017 6:48 pm
Forum: Python
Topic: Pi3D AssertionError on all demos
Replies: 18
Views: 637

Re: Pi3D AssertionError on all demos

Paddy, Thanks for the update and the fixes. I had noticed the console issue, but I was tackling one issue at a time. Thanks for the information on the Context. I will be using that from now on, even though I am only using the keyboard for debug purposes as this app will have no keyboard input. :) Ja...
by kusti8
Mon Apr 24, 2017 3:08 pm
Forum: General discussion
Topic: which 3d game engine??
Replies: 3
Views: 293

Re: which 3d game engine??

Pi3D should work since it uses OpenGLES. AFAIK it works pretty well for others.
by paddyg
Sat Apr 22, 2017 9:24 pm
Forum: Python
Topic: Pi3D AssertionError on all demos
Replies: 18
Views: 637

Re: Pi3D AssertionError on all demos

As a quick post script - I have added LOGGER.critical('Out of GPU memory') to Texture and altered pi3d.Log so that it uses the root logger (reverted as it did this already if no name argument given). Now if you create a pi3d.Log object before the Texture is created then ...
by paddyg
Sat Apr 22, 2017 11:34 am
Forum: Python
Topic: Pi3D AssertionError on all demos
Replies: 18
Views: 637

Re: Pi3D AssertionError on all demos

... the example program closes it leaves curses in an annoying state as there is no Keyboard.close() after the break. See here for suggestions. Also pi3d has a wrapper for the python logger so you can simply do LOGGER = pi3d.Log(level='INFO', file='test.log') LOGGER.info('display size: {} x {}'.format(display.width, ...
by Cigano1434
Sat Apr 22, 2017 1:36 am
Forum: Python
Topic: Pi3D AssertionError on all demos
Replies: 18
Views: 637

Re: Pi3D AssertionError on all demos

Paeryn, You are right. For some reason, the split memory had switched back to the default 64 MB. I'll have to look into why that is. I have switched it to 128, which is where I have had it for all my other testing. I switched it and it works fine. I didn't think to look there for two reasons: 1) I h...
by Paeryn
Sat Apr 22, 2017 1:25 am
Forum: Python
Topic: Pi3D AssertionError on all demos
Replies: 18
Views: 637

Re: Pi3D AssertionError on all demos

... you get a black screen, 3) When gpu_mem is set > 64 you get the image as expected. So it looks like you are hitting a memory limit somewhere and pi3d isn't reporting back an error in creating the texture. Possibly not a big enough contiguous block of memory to hold the texture so you end up with ...
by Cigano1434
Sat Apr 22, 2017 12:30 am
Forum: Python
Topic: Pi3D AssertionError on all demos
Replies: 18
Views: 637

Re: Pi3D AssertionError on all demos

I noticed that the larger 1920x1080 image was 96 dpi, so I converted it to 72 dpi (no change.) I've uploaded the three files I'm using for testing to the following links: 1920 x 1080 JPG (doesn't work) https://drive.google.com/open?id=0B20sGtQ0Ln1JVTdKYTFKakJnQU0 1920 x 1080 PNG (doesn't work) https...
by Cigano1434
Sat Apr 22, 2017 12:06 am
Forum: Python
Topic: Pi3D AssertionError on all demos
Replies: 18
Views: 637

Re: Pi3D AssertionError on all demos

Paddy, The screen resolution is 1920 x 1080 (the max for this TV I'm testing with). I added logging code as below: import pi3d import logging log = logging.getLogger('radar') log_handler = logging.FileHandler('test.log') log_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s ...
by paddyg
Fri Apr 21, 2017 9:59 pm
Forum: Python
Topic: Pi3D AssertionError on all demos
Replies: 18
Views: 637

Re: Pi3D AssertionError on all demos

Hmm, that seems odd. I've just run your code on a RPi3 with an image resized to 1920x1080 and it seems fine. There is a GPU limit of 2048x2048 which I have discussed here but that's well beyond this size. I think insufficient GPU memory allocation always causes an explicit error rather than a blank ...
by Cigano1434
Fri Apr 21, 2017 6:45 pm
Forum: Python
Topic: Pi3D AssertionError on all demos
Replies: 18
Views: 637

Re: Pi3D AssertionError on all demos

... all sorts of images into a slideshow, but as soon as the image is 1920x1080, it just shows a blank screen. Here is what I mean: My code: import pi3d display = pi3d.Display.create() camera = pi3d.Camera(is_3d=False) shader = pi3d.Shader('uv_flat') slide = pi3d.ImageSprite('/home/pi/radar/media3/bg1.jpg', ...
by Cigano1434
Thu Apr 20, 2017 11:03 pm
Forum: Python
Topic: Pi3D AssertionError on all demos
Replies: 18
Views: 637

Re: Pi3D AssertionError on all demos

Paddy,

That makes total sense. Thanks for the help and enlightenment. And thanks for a great library. You have already made my life a ton easier.

Jason

Go to advanced search