Share My Creation Sphericus - with camera control

Hi all,

EDIT (2014/05/05)--Added camera control (elevation and horizontal rotational speed), by means of sliders. Nice results . Will publish following evolutions, if any, in "Test my app" until it becomes something "playable"


I have just published a demo animation which intends to be an unreal planet with four orbiting moons in space. There is no user interaction. It is made with a work-in-progress library that I am writing for pseudo-3D graphics rendering. I say "pseudo" because it will be limited to some basic convex objects..

Find it here: https://play.google.com/store/apps/details?id=com.twouchapps.sphere


The main goal with doing this is learning, and see where can I arrive. It is based on some work that I had done for a previous app and modified it for this purpose.

Limitations: At this moment, it will only work with ARM devices which have a NEON coprocessor. Many phones have it, but I can't find statistics of the actual percentage. In tablets, it seems to be that this percentage is lower, so I have not published the apk for tablets.

The structure of this animation has two parts:
  • On one side, each planet is "composed" with a rotating texture, static lighting effects, color and local transparency modifiers. Also, there is a set of coordinates which change according to an orbit equation and a rotating camera (still very primitive) pointing at the center of the planet at a constant distance.
  • On the other side I compose the scene drawing each of the individual objects and the background onto an AcceleratedSurface, which boosts the speed of the canvas drawing part.

It works quite well, but in my device, from time to time it seems to "stop" and make small jumps. Please test it, and if your device supports it, I would be pleased to know phone model, how smooth it is, and any other things you might consider.


sph.jpg
 
Last edited:

JordiCP

Expert
Licensed User
Longtime User
The equations say that they should be the same, but also observe this effect. I think it can be due to two things:
- as for z-depth i only decrease dimensions but not paths, a small ball always seems faster than a bigger one moving between two points
- the camera also rotates around the planet. So when one of the moons' motion x-component is in phase with the camera it seems slower (the effect is most visible with the horizontal orbit moon).

Anyway, I will revise this.

What would be the best option for the background?
 

JoanRPM

Active Member
Licensed User
Longtime User
It looks ok on my Galaxy SII.
The planet and the moons have in the top-left side a continuous pixel.
The animation seems good.

Regards.
 

Beja

Expert
Licensed User
Longtime User
Looks great and smooth motion. so far I watched the youtube video.
My two cents:
1- Planet size is too big with relation to the sun.
2-All 4 planets are orbiting in the same orbit. it can be more realistic if each one has it's own orbit (4 distances from sun)
3- (Apparent) planet size behind the sun is very large.. in fact, if you take the distance between it and the sun then they should be the same size.
so it will be more realistic if the planet becomes so tiny or even invisible while moving away in the other side of the sun.
 

JordiCP

Expert
Licensed User
Longtime User
Thank you all for the replies!

Will keep on working on these and other points

@JoanRPM: You are right, I used some bitmap pixels as a transport for debug information (dirty trick), but incredible how you could perceive that! o_O
 

JordiCP

Expert
Licensed User
Longtime User
Improved equations and added binary orbits. More spectacular (I think)

Next version will be a playable where the user will be able personalize the planetary system
 

JordiCP

Expert
Licensed User
Longtime User
User can now control camera elevation and rotation (horizontal, at a fixed distance from the planet center) angular speed .

I think it adds some possibilities in order to make a "space trip".
 

freedom2000

Well-Known Member
Licensed User
Longtime User
User can now control camera elevation and rotation (horizontal, at a fixed distance from the planet center) angular speed .

I think it adds some possibilities in order to make a "space trip".

Very smooth on my Nexus 5

However it is a little difficult to catch the handles with the left thumb...
 

JordiCP

Expert
Licensed User
Longtime User
I am again on this project! it was forgotten in a folder one year and a half ago. Now I don't have much time but want to focus on it in my free hours

The main improvements are:
  • Finished my camera class and made a simple control to navigate and rotate.
  • The far stars aren't anymore a bitmap, but a lot of real random points with different intensities and coordinates
  • Also, played with alternative mappings for the spheres to draw the Earth (or something similar;)). Still a lot to improve


In some days I plan to release a second demo (the apk in Google Play is still the original one) already with sound and some effects

Hope you enjoy the video of the current tests.

Any suggestion will be welcome!

 
Last edited:
Top