-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grass texture for ForestWalk #7
Comments
Sorry Paddy - grass textures now added to textures on master. -----Original Message----- Tim, ForestWalk is now asking for a grass image file. This might be due to my lack of understanding of how to keep versions in synch but I can't see it in your repo either Reply to this email directly or view it on GitHub: No virus found in this message. |
Hi Paddy, I've come to realise that working with OpenGL ES 2.0 (not 1.0 that were currently using) is a lot harder to implement and quite different from what we're doing right now. Have you done anything with ES 2.0? I can't even get a 3D shader plane working in ES 2.0 as the moment!! Tim -----Original Message----- Tim, ForestWalk is now asking for a grass image file. This might be due to my lack of understanding of how to keep versions in synch but I can't see it in your repo either Reply to this email directly or view it on GitHub: No virus found in this message. |
Tim No the only opengles of any kind I have done is with pi3d, basically looking things up when I want to do something! Presumably you've looked through this http://benosteen.wordpress.com/2012/04/27/using-opengl-es-2-0-on-the-raspberry-pi-without-x-windows/ Are you wanting it to do things with the shader class you added to pi3d? It would be nice to get some bump mapping functionality though it might slow the whole thing down for game playing. Is there anything I can look into that would help. No point duplicating stuff you're doing. I can see that making a createPlane object multiple-tileable is a bit messy at this stage so maybe we should stick to other tileable objects (egg files work ok as well as the environment map) It might be better to create a new class createTiledPlane(createPlane) at some stage in the future. I have tweaked the mouse steering in ForestWalk2.py so there is an additional component from the mouse position relative to the average position so it continues to turn when the mouse is at the screen edges. The fog makes scenery much more realistic. Will push is to my repository at some stage. uploading some footage to youtube: |
Wow - love the spooky maze game! ... there's a missile helper in Pi3D which you could use for blasting stuff - but no collision detection as yet (although bounding box/sphere collisions are a good start) As for shader stuff, I've talked to Peter who said he's making an OpenGL ES 2.0 cube demo with shaders - I've spent all afternoon trying to get something 3D with the shaders and failed miserably. Apparently, you've got to manage a lot more but it's worth it in the end. I don't think there will be much slowdown with shader effects - so I'll try and convert Pi3D over once Peter has sent some code (by the weekend hopefully) I must admit I downloaded the benosteen stuff some time ago but never tried the triangle stuff - may be he's got shaders working in 3D?? I'll take a look. I've finally got my RPi hooked up to the internet - I've just wired the house to reach it! Now I can push/pull the Git more reliably. Tim. -----Original Message----- Tim No the only opengles of any kind I have done is with pi3d, basically looking things up when I want to do something! Presumably you've looked through this http://benosteen.wordpress.com/2012/04/27/using-opengl-es-2-0-on-the-raspberry-pi-without-x-windows/ Are you wanting it to do things with the shader class you added to pi3d? It would be nice to get some bump mapping functionality though it might slow the whole thing down for game playing. Is there anything I can look into that would help. No point duplicating stuff you're doing. I can see that making a createPlane object multiple-tileable is a bit messy at this stage so maybe we should stick to other tileable objects (egg files work ok as well as the environment map) It might be better to create a new class createTiledPlane(createPlane) at some stage in the future. I have tweaked the mouse steering in ForestWalk2.py so there is an additional component from the mouse position relative to the average position so it continues to turn when the mouse is at the screen edges. The fog makes scenery much more realistic. Will push is to my repository at some stage. uploading some footage to youtube: Reply to this email directly or view it on GitHub: No virus found in this message. |
Tim |
Hi Paddy. I downloaded the amazing.py demo and it was a lot of fun trying to race to I did come across one or two probs ... I think all the water textures pushed I loved your fog effect and used it in my latest demo RobotWalkabout which Tim -----Original Message----- Tim Reply to this email directly or view it on GitHub: No virus found in this message. |
Tim I realised that I had patched a couple of lines in pi3d to make the tiling work, which I have just also committed. Basically python has to be tricked into not converting to integer by putting a float into the right hand side!! I haven't run into any problems where I had to reset the pi and I haven't changed any memory settings from the default (is there a command I can run to find out what it's set to?) Maybe it's a byproduct of the pi3d change above, though I can't see why. Certainly worth finding the cause. I did try animating the water using an egg model but got horrible flicker. It also flickered when I tried to use one createPlane drawn in several places (when more than 10 or so). The createMergeShape is just brilliant! Did you see the non-functioning effect I mentioned which happens for the first second or two of the water mergeShape's life? (You have to put it above floor level to see it) Paddy Did you cheat to get to the end of the maze? I've only managed to get there once (after ages) and then got stuck in a hole! I then added a jump facility using the space bar (only 50 allowed). You can use the jump to get onto the top of the plateau, Very atmospheric. |
Tim Also I see that you have kept LoadModel.py 'pure'. I think you are right to do this (but I've taken the cloning and reparenting out as they're all on top of each other so not visible!) but I will make a LoadModel2.py to demonstrate these features of loadModel as well as the non-matrix method of moving things by simply changing their x,y,z etc. (I still hold that this is more intuitive and understandable for people who don't want to get bogged down in the details of the opengl c functions!) (had another go at the maze with the map in the corner of the screen and still failed!!!) |
Hi Paddy, Sorry if I've mixed things up a bit - I couldn't get it to work for one reason or another so I'll have another go. Great News! Peter sent me a 3D cone shaded object which opens the door for shader models! I'll start producing a Pi3D based on shaders and pass you a similar interface so you can modify your loaderEgg code later on. His code is found at www.github.com/peterderivaz/pyopengles All the best - Tim. -----Original Message----- Tim Also I see that you have kept LoadModel.py 'pure'. I think you are right to do this (but I've taken the cloning and reparenting out as they're all on top of each other so not visible!) but I will make a LoadModel2.py to demonstrate these features of loadModel as well as the non-matrix method of moving things by simply changing their x,y,z etc. (I still hold that this is more intuitive and understandable for people who don't want to get bogged down in the details of the opengl c functions!) (had another go at the maze with the map in the corner of the screen and still failed!!!) Reply to this email directly or view it on GitHub: No virus found in this message. |
Tim I'm not too sure of the pros and cons of shader models as opposed to models used in pi3d so far but there are a couple of shader applications that I think would be useful: 1, Something that could give a texture to near surfaces that would attenuate with distance - bump map like. 2. Something that would make a model become more transparent with distance - clip plane but without a hard edge. Also things that could give a reflection effect metallic look etc would be handy. Happy to look into an aspect of this if it would help, but will probably wait for you to publish something. PS I tried running some of the example scripts directly rather than from a terminal window and found that the 3d ones left the pi in an unusable state when they exited. i.e. I had to pull the plug and reboot. The 2d ones seemed to be ok. Not sure why. Did you overcome the issues with amazing.py etc? |
Hi Paddy - do you mean you ran compiled scripts that made it hang? I must admit I've only ever run them from the terminal window. As for shaders, I've managed to get the shapes working although it's going to take some work replacing all the Pi3D functions - good thing it hasn’t got too huge. However, all the matrix stuff will need to be handwritten although Peter has really covered a lot of it already in his cone example. I'll try to get Pi3D(2) operating in the same way as v1. All the models are VBO's so each vertex describes [x,y,z,nx,yx,nz,tx,ty] for position, normal and texcoords. Again, Peter has put some really neat routines to contruct VBO's including automatic normal generation. I'm just getting a texture and light shader working and then were in business! Tim -----Original Message----- Tim I'm not too sure of the pros and cons of shader models as opposed to models used in pi3d so far but there are a couple of shader applications that I think would be useful: 1, Something that could give a texture to near surfaces that would attenuate with distance - bump map like. 2. Something that would make a model become more transparent with distance - clip plane but without a hard edge. Also things that could give a reflection effect metallic look etc would be handy. Happy to look into an aspect of this if it would help, but will probably wait for you to publish something. PS I tried running some of the example scripts directly rather than from a terminal window and found that the 3d ones left the pi in an unusable state when they exited. i.e. I had to pull the plug and reboot. The 2d ones seemed to be ok. Not sure why. Did you overcome the issues with amazing.py etc? Reply to this email directly or view it on GitHub: No virus found in this message. |
Tim, Straight after logging in just typed 'python ForestWalk.py' etc. Each example loaded significantly faster (and might even have run smoother) but when I quitted I couldn't get back to the linux prompt (must have tried every combination of shift, control, alt and key plus words like quit, exit...) However Clouds3d.py stopped fine. I have a feeling that something like this has always been an issue but, like you, I have got into the habit of running everything in a terminal window. I suspect the terminal window hangs after running a 3d py but I just shut the window! Will the shader version run faster or is it just a better (more flexible) way of doing it? So long as the class and method names and arguments are the same the conversion can happen behind the scenes without upsetting the apple cart. (Probably even more justification for keeping all (or as much as possible) of the matrix stuff 'hidden' inside the library so users just move things and cameras around. I think this would be a nicer way to do the camera/avatar i.e. have a class to contain rot, tilt etc and have a move method to hide the matrix bits) I have thought a bit about how to make the loadModel more integrated with the other shapes and to be able to use the merge techniques but I don't think it's compatible with having multiple sub-objects each with a different texture. |
I believe the issue with the command prompt has to do with reading |
... I must admit I've been very lazy in not clearing up the textures afterwards - I should be deleting them all before exit else they stay there in the GPU. Perhaps terminal clears this up whereas python by itself wont?? I'll fix this soon. I've got some nice per-pixel shaded, texture rendering working although I've still got one or two problems with matrices. Tim -----Original Message----- Tim, Straight after logging in just typed 'python ForestWalk.py' etc. Each example loaded significantly faster (and might even have run smoother) but when I quitted I couldn't get back to the linux prompt (must have tried every combination of shift, control, alt and key plus words like quit, exit...) However Clouds3d.py stopped fine. I have a feeling that something like this has always been an issue but, like you, I have got into the habit of running everything in a terminal window. I suspect the terminal window hangs after running a 3d py but I just shut the window! Will the shader version run faster or is it just a better (more flexible) way of doing it? So long as the class and method names and arguments are the same the conversion can happen behind the scenes without upsetting the apple cart. (Probably even more justification for keeping all (or as much as possible) of the matrix stuff 'hidden' inside the library so users just move things and cameras around. I think this would be a nicer way to do the camera/avatar i.e. have a class to contain rot, tilt etc and have a move method to hide the matrix bits) I have thought a bit about how to make the loadModel more integrated with the other shapes and to be able to use the merge techniques but I don't think it's compatible with having multiple sub-objects each with a different texture. Reply to this email directly or view it on GitHub: No virus found in this message. |
Pabloav ... you could be right - but something is need for reading the keys! I'll take a look. -----Original Message----- I believe the issue with the command prompt has to do with reading keys. I believe there's a line in many of the demos "display.getKeys()". If you comment it out it doesn't mess up the terminal. Reply to this email directly or view it on GitHub: No virus found in this message. |
Yes. not completely clear as some have the getKeys stuff but still exit cleanly so it could well have something to do with textures: |
I believe we can close this...? |
Tim, ForestWalk is now asking for a grass image file. This might be due to my lack of understanding of how to keep versions in synch but I can't see it in your repo either
The text was updated successfully, but these errors were encountered: