Graphic Development

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Phaeton
Miner
Miner
Posts: 27
Joined: Fri Mar 10, 2006 8:30 pm

How many rotations are there per 360 degrees? How many degrees per rotation?

If I were to model a ship in Blender, a Python script could easily be written to make the ship rotations, or, from a rather similar game, a ship rotater (completely 2d, zenith perspective) could be used.

Such rotators for the 2d/zenith perspective can be found here...
http://forums.minegoboom.com/viewtopic.php?t=3099

And the 3d roller/rotator I use for ships in the game I referenced earlier...
http://forums.minegoboom.com/viewtopic.php?t=4635
User avatar
Revolver
Commonwealth Pilot
Commonwealth Pilot
Posts: 64
Joined: Sun Mar 05, 2006 8:46 pm
Location: Edge of the world.
Contact:

I believe its 20 rotation angles at 18 degrees each.
User avatar
the_holy_thom
Commonwealth Pilot
Commonwealth Pilot
Posts: 81
Joined: Sun Mar 05, 2006 11:55 am
Location: England
Contact:

nice programs though - I might have to give it a try
Need a mod? Transcendence Mods
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Revolver is correct: 20 images, each at 18 degrees.

To position the camera and the lights, imagine that the object is at the origin:

The camera is 6 units away and 12 units above the object.

The light source is 3 units to the left (as seen from the camera), 5 units behind and 5 units above the object (Note: treat the light source as being at infinity).
Phaeton
Miner
Miner
Posts: 27
Joined: Fri Mar 10, 2006 8:30 pm

Alright - both of the programs I listed are at 9 degrees per rotation (I do believe, let me check later). The Java one is open source, so if I had an IDE it wouldn't be too hard to find out how to change the number of rotations and how many degrees per rotation.

Will Dev-Cpp work with Java apps?

Edit2: Define 'away' (the camera).
Phaeton
Miner
Miner
Posts: 27
Joined: Fri Mar 10, 2006 8:30 pm

Update! Woot!

Code: Select all

		int numImages = numRows * numCols;
		double degreesPerRotation = 360.0 / numImages;
That little snippet is from the source of the 2d/zenith rotator -

This means that the program will indeed work with Transcendence. Simply change the number of column/rows (the program will prompt you) to what is appropriate (of which I'm not sure, George knows, I'm sure), and huzzah! You have a new shipset.
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Phaeton wrote:Simply change the number of column/rows (the program will prompt you) to what is appropriate (of which I'm not sure, George knows, I'm sure), and huzzah! You have a new shipset.
Try 1 column and 20 rows.
Phaeton
Miner
Miner
Posts: 27
Joined: Fri Mar 10, 2006 8:30 pm

And the images themselves have to be oriented center and the background has to be a perfect square?
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Phaeton wrote:And the images themselves have to be oriented center and the background has to be a perfect square?
Yes. The ship's center of rotation has to be at the center of the square.
User avatar
PKodon
Militia Lieutenant
Militia Lieutenant
Posts: 127
Joined: Sat Apr 18, 2009 6:03 pm
Location: "Minocs. I've got a baaad feeling about this.... This is no cave!"

george moromisato wrote:Revolver is correct: 20 images, each at 18 degrees.

To position the camera and the lights, imagine that the object is at the origin:

The camera is 6 units away and 12 units above the object.

The light source is 3 units to the left (as seen from the camera), 5 units behind and 5 units above the object (Note: treat the light source as being at infinity).
I know everyone's pointed us to this page over and over again, however could you clarify something for us:

When you say "unit", what are you using as a "unit"? Is it the ship's diameter, radius, length?

I ask, as ships vary in size, and you've never really said what you use as your "unit" (at least not that I can find, and I've searched for a couple hours now).

Also, I not that this thread is older, and recommends 20 facings, but now most player ships are rendered with 40 facings (especially ships with images larger than 80 x 80) to make rotation smoother and aiming more precise.

An update to this thread (including links to various programs used, any scripts for doing the renderings and splicing the images together, etc.).

Also, George, I understand you used TrueSpace 3D to render the ships for Transcendence. We have information scattered about for rendering ships in Blender, Bryce 5.5, 3DS MAX (and GMAX), and possibly a few others, but I've never seen any info on how to use TrueSpace 3D. I'd like to see a tutorial on this similar to Digdug's tutorial.

PK
"Don't ask ..., I don't wanna know, and I don't wanna care!" - PK
Meet us on IRC --> Image
"... the hornet battlepod is the closest we have ingame to flying into battle in a wheelbarrow
with a bathtub nailed upside down to the top of it to provide armor."
- The Shrike
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

Place the camera and the light source first, the generic units are equivalent to the ambiguous units used in most modellers. Once that is set up you can make your ship so if fits snuggly within the frame of view of the camera. The size of the ship as an end product is a matter of setting the resolution of the rendered images, not how big the actual model is. Every ship, theoretically, could have the same size model.

Aeonic built a track for blender to easily do renderings. All you had to do was import your finshed ship model into the track and start the animation rendering and voila, all 40 facings. I'll try and find the link for that. (I believe it was for blender)
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

I import the ship model and resize it to around 1 unit, but I'm not sure if it's right thing to do.

I can obtain the same result by adjusting the FOV of the camera, but then I get distorted images, even if you are using a sunlight at infinite distance (parallel rays of the raytracer engine)

So, we know ho to set up the light, ship and camera, we need probably details on how to set-up the camera now :D
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

The second link in the OP is still good and leads to a python script for doing rotations in Blender (with video tutorial) and a Java spritesheet assembler.

Just checked the link's validity on Feb 09, 2010
User avatar
Psycholis
Militia Commander
Militia Commander
Posts: 298
Joined: Sun Mar 05, 2006 8:23 pm
Location: Missouri

woo, you guys got it easy. rotating for me is like making 40 different models and then screen capturing each one. :) i should invest in another usable 3d program at some point.
User avatar
PKodon
Militia Lieutenant
Militia Lieutenant
Posts: 127
Joined: Sat Apr 18, 2009 6:03 pm
Location: "Minocs. I've got a baaad feeling about this.... This is no cave!"

Psycholis,

And I thought I had it hard just retouching the ones others rendered and adding animated lights with the Gimp.

Blender is free, so are Bryce 5.5 and Truespace 7.6 (or whatever the latest version is). Your main investment will be learning how to use whichever one you pick.

PK
"Don't ask ..., I don't wanna know, and I don't wanna care!" - PK
Meet us on IRC --> Image
"... the hornet battlepod is the closest we have ingame to flying into battle in a wheelbarrow
with a bathtub nailed upside down to the top of it to provide armor."
- The Shrike
Post Reply