Go to advanced search

by paddyg
Mon Jul 16, 2018 3:50 pm
Forum: Python
Topic: Tkinter + socket programming
Replies: 9
Views: 305

Re: Tkinter + socket programming

@moryo, well done getting it working. As @hippy says you don't need to put the tk loop in its own thread. Also various other ideas that you can take on board or ignore: #!/usr/bin/env python3 # -*- coding: utf-8 -*- import socket import threading import time try: import Tkinter as tk except ImportEr...
by paddyg
Sun Jul 15, 2018 9:17 am
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

@ensan, can't you use qt5 which can be apt installed for raspbian stretch? In terms of wrappers, Tim (for his C++) and I (for my rust) experiments used sdl2 which, again, can be installed with apt (though Tim links his code to the compiled version, not sure why that's needed). sdl2 is used on most p...
by paddyg
Fri Jul 13, 2018 1:33 pm
Forum: Python
Topic: Tkinter + socket programming
Replies: 9
Views: 305

Re: Tkinter + socket programming

Yes, I meant to mention threads but forgot. The logical structure would be a thread to read from the socket with a loop while keep_running is True and the tk thread would only refresh the gui if the data had changed. The kill button would turn the keep_running flag off.
by paddyg
Fri Jul 13, 2018 8:38 am
Forum: Python
Topic: Tkinter + socket programming
Replies: 9
Views: 305

Re: Tkinter + socket programming

You code works ok for me (I comment out the socket stuff and put in data = bytes('4.12psa'.encode('utf-8')) ) maybe it's because socket.recv will be blocking by default so your loop will spend most of it's time there waiting for bytes to arrive and you will only be able to stop it while you are rece...
by paddyg
Tue Jul 10, 2018 2:27 pm
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

When you hit a collider the rotation rate should increase allowing you to turn one way or the other without twisting you head off. That's the idea anyway. The other 'feature' is that you can freeze the camera by shaking your head, then turn to face ahead and unfreeze by shaking again. Occasionally i...
by paddyg
Mon Jul 09, 2018 10:08 am
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

gavin, the RPi could well have a role in serving 3D model info to visitors' phones but it probably doesn't involve the graphics capabilities of the RPi. In terms of rendering even a fairly ancient smartphone will probably outstrip it. For further comparison I took Tim's model and loaded it into a un...
by paddyg
Sat Jul 07, 2018 11:48 am
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

Great, looking forward. The laptop speed increased dramatically when I installed the latest drivers, This is my son's old laptop but it has a GeForce GT 525M/PCIe/SSE2 card. Previously it always ran at 60fps but now it will run at almost any speed! With the demo I videod I had set the fps at somethi...
by paddyg
Sat Jul 07, 2018 9:43 am
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

Tim I can report that the updated version runs fine (and changing the options works as expected). As an experiment I tried loading your model into rust_pi3d to get a direct comparison. I just used the uv_flat shader as is which might be a little more complicated but not much. Although it runs OK it'...
by paddyg
Thu Jul 05, 2018 10:08 pm
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

Tim, it runs great . I get 45 to 50 fps on this 3+ but the CPU is only clocking 7 to 12%, On a 2B it's nearly as fast at 43 fps and occasionally gets up to 18% CPU. I had previously attempted to get SDL hardware accelerated following instructions based on choccyhobnob but specified 2.0.5 and then wh...
by paddyg
Wed Jul 04, 2018 10:46 pm
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

That's pretty good, doing the collision detection on the mesh. Tricky doing the horizontal component and coping with things like railings or tables. The shader is quite simple and will be fast but it gives a very good effect - it's a really sensible idea to use baked shadows. I found that, on the ra...
by paddyg
Wed Jul 04, 2018 9:52 pm
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

Tim, that's really great. Not sure it's relevant but it did occur to me that one could use the full float range to pack two UV texture coordinates into each value i.e. split into frac() and floor() in GLSL. We used that in pi3d to get x, y, z, size, rotation, r, g, b, a, u, v, into the 8 float value...
by paddyg
Tue Jul 03, 2018 10:50 pm
Forum: Python
Topic: Tkinter + socket programming
Replies: 9
Views: 305

Re: Tkinter + socket programming

Don't really know but there are a few things you could do to tidy your code. You don't need the extra layer of functions and you don't seem to use the global variables (unless there is more to it than I can see, or you intend to use the values elsewhere once it's working). I would have thought you c...
by paddyg
Tue Jul 03, 2018 1:35 pm
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

For better or for worse blender 2.8 requires minimum OpenGL 3.3 it won't run on my old thinkpad and I doubt it will work on RPi.
by paddyg
Tue Jul 03, 2018 10:51 am
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

@gavin, using blender on the RPi is as easy as 'sudo apt-get install blender' (v 2.78 so recent but not latest) and it has a very good ray tracing engine - cycles - 'built in'. However the number crunching requirement for ray tracing is beyond anything the RPi is capable of so a ten second render on...
by paddyg
Sat Jun 30, 2018 8:04 am
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

it is easier in Blender 2.79 than older verdon s. I even did some hacking on an addon https://m.youtube.com/watch?v=K1ThLRk1KZI
by paddyg
Fri Jun 29, 2018 7:10 pm
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

the best option is probably to have tiled textures with baked shadows then add phone style lighting with detailed normal map. However getting the fragment shader efficient, especially through the extra emulation layer, might take quite a bit of tweaking.
by paddyg
Thu Jun 28, 2018 12:47 pm
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

gavin, I suspect 3D modeling is always going to be either overwhelming or limited in some way. Are you wanting to do the actual modeling on the RPi? Have you tried sketchup? or Tinkercad which runs in browser and seems easy enough - but aimed at 3D printing so no uv mapping. Might be best to bite th...
by paddyg
Wed Jun 27, 2018 3:26 pm
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

@Gavinmc42 you have to factor in grudging Yorkshire understatement! I was dissuaded from even trying bforartists because of the lack of linux. And I've just about got the hang of some of blender so I need to keep using that so I don't forget it! ctrl-z is your friend (as in all sane applications) I ...
by paddyg
Wed Jun 27, 2018 11:02 am
Forum: Graphics programming
Topic: Vulkan, OpenGL or OpenGLES
Replies: 9
Views: 413

Re: Vulkan, OpenGL or OpenGLES

I do texture/uv mapping in blender then gimp. First unwrap the uv (smart unwrap is normally fine but might need some seams etc) then export it as an image. In gimp use the exported map as one layer and tweak your texture patches on other layers to match (the handle transform tool is good for this, c...
by paddyg
Wed Jun 27, 2018 10:28 am
Forum: OpenGLES
Topic: Star Citizen on the Raspberry Pi?!
Replies: 90
Views: 2926

Re: Star Citizen on the Raspberry Pi?!

Tim, this is looking really impressive and will be stunning with baked shadows. Are you searching all the triangles in the collision object for intersections or have you used some kind of indexing? In my rust version of pi3d experiment I started out iterating through the whole elevation map but, as ...
by paddyg
Sun Jun 24, 2018 5:25 pm
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 7938

Re: .NET Core - Raspbian or Win10IoT?

On "computers can't do..." listened to a nice monologue by Will Self while driving this morning https://www.bbc.co.uk/programmes/b0b6pjh5 Basically when we realize computers can do everything we can but better it will be a bit of a let down rather than an apocalypse. PS also I kind of expect program...
by paddyg
Sun Jun 24, 2018 4:24 pm
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 7938

Re: .NET Core - Raspbian or Win10IoT?

but there are symbolic math libraries that cope with this kind of (notational finesse) thing fine, but at cost of processing time. There will be one for javascript if you want to have a play but to see what they do try typing (1/3 + 1/3 + 1/3) == 1 or sqrt(2) * sqrt(2) into wolfram alpha PS I was ve...
by paddyg
Sat Jun 23, 2018 1:01 pm
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 7938

Re: .NET Core - Raspbian or Win10IoT?

@jahboater, yes, looking at the LLVM object code it has rather bizarrely converted one rotl() to rol but not the other! Comparing with the gcc version is a bit difficult but it does look to have possibly reduced the number of mov instructions, by doing things in a different order. In the tightest lo...
by paddyg
Fri Jun 22, 2018 9:25 pm
Forum: Graphics programming
Topic: 3d graphics libraries that run on the Pi 2 that aren't slow?
Replies: 23
Views: 808

Re: 3d graphics libraries that run on the Pi 2 that aren't slow?

Partly for my own entertainment/enlightenment I've been transcribing the pi3d python module to pi3d_rust for which I have used sdl2 with the raspbian experimental OpenGL driver. I've needed surprisingly few changes in the opengl and gles stuff. I still need to add comments to the code to point out w...
by paddyg
Fri Jun 22, 2018 3:00 pm
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 7938

Re: .NET Core - Raspbian or Win10IoT?

Yes, that fixes it: 36s with C v. 45s Rust. gcc v g++ doesn't make any difference. Rust does have a fn rotate_left() but it it's basically identical code and the compiler automatically seems to optimize so #[inline] on rotl() has no effect. Also rotate_left() takes u32 argument so my usize was wrong...

Go to advanced search