Go to advanced search

by paddyg
Sun Sep 09, 2012 8:35 pm
Forum: Python
Topic: Reading files into lists etc?
Replies: 6
Views: 1478

Re: Reading files into lists etc?

Well I would say YES, that python is a good way to go because it's quite a good way into 'proper' object based programming but is quite forgiving (aka slack) about defining things up front. It's super flexible for lists (like your several similar lines such as: .SN54120D .SN54120B...) trivial to ope...
by paddyg
Wed Aug 29, 2012 8:03 am
Forum: Python
Topic: Python version issues?
Replies: 3
Views: 1295

Re: Python version issues?

Just in case anyone new to python happens across this with a similar error: There is always one more parameter in the method definition and in the error message than you actually pass because of 'self'. i.e. class mqttClient(): __init__(self, x, y, z): self.x = x self.y = y etc def connect(self, a, ...
by paddyg
Sun Aug 26, 2012 10:20 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

Just installed and done a few models with blender 2.6. Quite a lot of differences! However it basically seems to do the same thing. I saved with the following setting: http://www.eldwick.org.uk/files/temp.jpg I did need to edit some of the image files' paths so they pointed to the right relative pla...
by paddyg
Sun Aug 26, 2012 6:57 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

@paddyg: If you start python with the ``-t`` option you get warnings when spaces and tabs are mixed. I might change the geany setup to that, though I don't really need warning as I know the code is packed full of it. Up to Tim to fix it really. Geany certainly doesn't warn about the mixture I just ...
by paddyg
Sun Aug 26, 2012 6:48 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

The blender version on this pc is 2.49, I will install the latest now so I can see what you're seeing. I think it should manage without UVs but it will need materials. So you should have two files an .obj and a .mtl the .obj should have a mtllib line, lots of v lines, lots of vt lines (but should co...
by paddyg
Sun Aug 26, 2012 6:24 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

@paddyg: Why is meaningful indentation an extremely bad and retrograde step? I suppose it's just that python implements the white spaces in a very slack way. i.e. the programmer has to have the self discipline to either stick to tab characters or an amount of spaces (in just the same way that progr...
by paddyg
Sun Aug 26, 2012 11:16 am
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

Interesting that I actually got somewhere understanding a bit of how the code works. ... My main problem is one monitor and not enough plug sockets... Otherwise I could run through things more often. Python is quite good for getting the hang of what's going on. (Despite the extremely bad, retrograd...
by paddyg
Sun Aug 26, 2012 11:05 am
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

Are there specific boxes to check/uncheck for the model export. The triceratops will load but ironically my model won't. It basically reports Loaderobj.py, line 302 Self.cGroup[g].normals[i*3*k] = c_float(normals[f['normals]'][v]-1][k]) IndexError: list index out of range JameR. YES. My fault for n...
by paddyg
Sat Aug 25, 2012 5:21 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

JamesR, just thought: are you definitely loading the model where you can see it? The same model saved (from blender) as egg seems to appear Xrotated 90degrees so it could be off the top or bottom.
by paddyg
Sat Aug 25, 2012 5:17 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

Although, presumably rereading your last post, the Loaderegg file has been adjusted accordingly. JamesR, sounds like you did something along the lines of what I did to get it working. Originally I had a copy of draw in loaderObj and called that from pi3d but it didn't like something. I kept finding...
by paddyg
Fri Aug 24, 2012 10:40 am
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

Sorry again for missing the changes to loaderEgg in my commit on the 20th (if anyone tried it out). I have made loaderEgg put data straight into ctype arrays as per loaderObj but it doesn't seem to speed it up at al!

JamesR, did the loaderObj work in the end?
by paddyg
Thu Aug 23, 2012 11:09 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

Is it too obvious to have replaced the filename in the sample loader file for the .egg file for the .obj file. that's all I did in the end. Though it was after various permutations altering things so I might have made it work on my set up and not remembered to post every last scrap of what I did, I...
by paddyg
Thu Aug 23, 2012 10:36 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

That sounds brilliant. Where do you adapt the code from or is it just pure unadulterated programming knowledge? Possibly bits missing elsewhere (see your next post!). I had been struck by how much nearer the structure of obj was to the arrays I used to get the egl data so I searched on google and f...
by paddyg
Thu Aug 23, 2012 8:01 am
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

Just updated my branch at github https://github.com/paddywwoof/pi3d with a version of the loader for obj files which is quite a bit faster than the egg file loader (partly because I put the numbers directly into ctype arrays rather than into python arrays then convert them, I will make the same impr...
by paddyg
Mon Aug 20, 2012 11:02 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

over the next few days I will try and get some more 'manual' for the loadModel() stuff on my github (in the wiki on github/paddywwoof/pi3d) not added anything to the manual but there are some updates on the code (my branch. Tim will have to decide what to incorporate). Basically it's stuff to make ...
by paddyg
Sat Aug 18, 2012 2:13 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

... animation [feature of egg files] but I think it will be a nightmare in python (on the pi) actually I did install cython on the pi a while ago and compiled one of the functions in the loadModel() and it did improve speed quite a bit (30%) So once the code's stopped evolving it might be worth mak...
by paddyg
Sat Aug 18, 2012 2:06 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

I've not read through the comments here recently. Sorry for the general lack of information about what does and doesn't work, over the next few days I will try and get some more 'manual' for the loadModel() stuff on my github (in the wiki on github/paddywwoof/pi3d) I might have another look at the a...
by paddyg
Wed Jul 04, 2012 9:49 am
Forum: Other projects
Topic: first design for an hdmi to lvds adapter
Replies: 78
Views: 79775

Re: first design for an hdmi to lvds adapter

This looks like it will do the job. Anyone tried it?
http://www.ebay.com/itm/5451-Audio-LCD- ... 3f18a924df
by paddyg
Fri Jun 29, 2012 11:37 am
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

paddyg wrote:I tried but failed to get material properties
also didn't get much joy from the camera class. Not really sure how to use it but I imagined the scene would change as the camera moved or turned as if viewed from the camera.
by paddyg
Thu Jun 28, 2012 9:30 pm
Forum: Other projects
Topic: first design for an hdmi to lvds adapter
Replies: 78
Views: 79775

Re: first design for an hdmi to lvds adapter

Any progress on this? On the mouser site they price 100unit quantities at
£2.92 for SN75LVDS83BDGGR
£4.89 for TFP401APZP (Texas design for adapter:http://www.ti.com/lit/an/slla325/slla325.pdf)
pcb and assembly is cheap in China as we know.
by paddyg
Thu Jun 28, 2012 6:38 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

Tim, looks good. Here are some pics of the latest iteration of loadModel. Here's a link to the files (large because of the 128 water pictures, sorry!) below pics is a copy of the readme in case you're interested but can't be bothered to load all the pics. http://www.eldwick.org.uk/files/rasp1.jpg ht...
by paddyg
Mon Jun 25, 2012 6:29 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

The way to make it all load fast seems to be to take out the python wrapper eglchars() completely. I haven't tested this exhaustively but it seems to work on a couple of things I've just tried so it should form the basis of 'a better method'. I use the ctypes.c_char_p() so only have to send a pointe...
by paddyg
Mon Jun 25, 2012 5:11 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

paddyg wrote:.tostring("raw",RGBs)
actually it's the eglchars() method that takes all the time. I tried saving the images as 'raw' strings but it seemed to take the same time and this is why.
by paddyg
Sun Jun 24, 2012 9:57 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

Not really sure how else to do it but most of the time seems to be taken with

Code: Select all

.tostring("raw",RGBs)
by paddyg
Thu Jun 21, 2012 3:15 pm
Forum: Python
Topic: Pi3D
Replies: 244
Views: 45421

Re: Pi3D

I will upload the latest version here) http://www.eldwick.org.uk/files/evenmoreloadmodel.zip has the latest version (again incremental to Tim's stuff and previous zips of mine, see above) I have added a light (tried a camera but couldn't get it to do anything) which goes on and off each time you pr...

Go to advanced search