[OT] clever use of mask

Scott Rossi scott at tactilemedia.com
Thu Dec 31 05:26:01 EST 2015


Without the distortion that normally occurs with anything that wraps around
a sphere, getting things to look 3D is pretty ineffective.  Adding shading
around the edge of a circle somewhat simulates distortion, which is what
produces the (fake) 3D appearance.

You can sort of fake planet rotation in two axes by getting yourself a
projection map (as long as the map has striations or craters or some other
irregular texture that can show movement).  Using a map is the only way
you're going to pull off seamless rotation because (in theory) the map image
will be seamless and one side can wrap around to the other.

I put together a simple demo using a projection map of Jupiter, and a few
gradient graphics for shading.
go url "http://tactilemedia.com/download/planetary.livecode"

The rotating effect works better along the same axis as the striations
(horizontal) thanks to the edge shading.  Realistically, you would see the
striations distort more along the perpendicular (vertical) axis, and of
course that doesn't happen, which lessens the 3D effect.

To accomplish "any direction" motion using 2D images, you'd need something
along the lines of the early days of QuickTime VR (object model), where all
possible views of an object were captured in (essentially) a sprite file,
and the player would jump to the appropriate set of frames depending on the
view selected by the user.   You might be able find a series of 3D rendered
frames of each planet, or commission someone to produce captures of 3D
models.  But creating fly-bys of the planets using framed animation would be
a ton of work, and probably not worth the effort.

I would say in your simulation, having nice looking but non-rotating planets
might be a better option.  Someone else might have other thoughts or know
some useful resources.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design



On 12/30/15, 3:24 PM, "use-livecode on behalf of Geoff Canyon"
<use-livecode-bounces at lists.runrev.com on behalf of gcanyon at gmail.com>
wrote:

> On Wed, Dec 30, 2015 at 4:03 PM, Richmond <richmondmathewson at gmail.com>
> wrote:
> 
>>  I wonder why stuff like that is not more accessible?
>> 
> 
> ​Same here. I wish I had seen this back when I was fooling around with a 3D
> space simulation. I was having some trouble getting the general rendering
> correct, and despaired of being able to do anything reasonable in terms of
> rendering a globe, and abandoned it. I never thought simply scrolling a
> flat image horizontally within a circular mask would work so well.
> 
> Which leads to the next question of course: Scott -- any thoughts on ho​w
> to make this scroll in two dimensions? To present a simulation of a real
> globe I'd need to be able to scroll up and down, left and right,
> diagonally, etc.
> 
> I'm not being able to picture how that would work in my head -- maybe an
> image that contains the whole "surface" of the globe twice over? Then,
> setting the angle of the image and scrolling appropriately might work?
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list