jrenner / gdx-proto

GDX Proto - a lightweight 3D engine built with libgdx
Apache License 2.0
161 stars 28 forks source link

Skybox Push #3

Closed Caresilabs closed 10 years ago

Caresilabs commented 10 years ago

Im pushing a commit that allows the use of skybox. At the moment only single textures like http://opengameart.org/sites/default/files/styles/medium/public/Medborgarplatsen.jpg or 6 textures (one for each side) which I also provided in the assets folder (they are a bit large at the moment so we might need to lower the resolution). Im also started to work on a Terrain class which will support heightmaps and standard meshes but its not included in this push.

Im really new to git so I probably did something wrong (my fault sorry) but I fixed errors by removing the texture-packer reference (otherwise you are unable to import the project without an error message )

Gdx-Proto looks really promising and can't wait until we get it as a library!

Cheers!

jrenner commented 10 years ago

This is awesome! Two small changes I'd like:

  1. can we remove the Terrain class until it has an implementation? no need for just a TODO I also have some code laying around for a 2d terrain heightmap that we could use
  2. I see why you removed the texturepacker part, but let's leave it in.

If you need some help with the git commands let me know.

Caresilabs commented 10 years ago

Thank you!

  1. Yes of course however im half done with the tetrain class but it was not intended to push all files.
  2. Yes it was not intended to push them, didn't quite figure out how to push or commit only certain files.

Thanks! Of course both terrain and skybox needs to tweak , hope I'll get some time now in the weekend!

Cheers!

Caresilabs commented 10 years ago

I have had problem with height map so code for that would be awesome. Mesh terrain is 70% done

jrenner commented 10 years ago

If you are using git from the command line, by typing git add core it would only included everything inside the core directory, and it would ignore the build.gradle in the main directory and other stuff.

alternative you can just git add . and then use git reset HEAD <file> to reset ones you don't want to add.

Caresilabs commented 10 years ago

@jrenner Thanks! I was using the Github app (shame on me) and it didnt allow me to commit and sync selected files. Isnt there a way to pull request just certain files?

Caresilabs commented 10 years ago

@jrenner Also wanted to say that I think frustrum culling would be good, a very easy way to do it:

protected boolean isVisible(final Camera cam, final GameObject instance) { instance.transform.getTranslation(position); position.add(instance.center); return cam.frustum.boundsInFrustum(position, instance.dimensions); }

taken from xoppa's tutorial :)

jrenner commented 10 years ago

I fixed up the PR manually so build.gradle still has the texture packer project

Caresilabs commented 10 years ago

Thanks! :)

Caresilabs commented 10 years ago

It looks like i forgot to use AssetsManager.load Skymodel with headlessModel. Is that necessary?

jrenner commented 10 years ago

It's not needed, since it has no physics object. Headless only cares about models for creating Bullet physics objects