[Dev Blog] Making Your Own Models with Qubicle Constructor


#1

http://stonehearth.net/2014/01/21/desktop-tuesday-making-your-own-models-with-qubicle-constructor/


#2

Love this Desktop Tuesday, I hope that people won’t be hating on the stonehearth version of qubicle not beeing capable of animating models.


#3

Somebody should write something that allows you to build stuff in Minecraft and then export it as qb. That’s a graphics program I could use, I suppose.


#4

Linking this game to Minecraft in as many ways as possible can only help! Someone do this now.


#5

I dont think that would work to well also if people need to animate theirs always blender


#6

Nice, so we will see the production-chain for the weaver in the game (based on the sheep). I think I am most curious how the updated API will work out… which should also come, even if it is not mentioned here, right? :wink:


#7

I would take the elusive ‘like’ as relative confirmation.


#8

If it doesn’t, we’ll just make our own. With gambling and attractive ladies.


#9

:point_left:

edit: hmm…

Wild-life: sheep, rabbits, and more


#10

As I don’t have most forms of internet monies, I would love if when Stonehearth has its own steam page, that qubicle is a DLC to purchase as the stonehearth form, so people who play stonehearth could more easily get it.


#11

@claymanr
Minddesk is trying to get qubicle on steam. [quote=“Ghost, post:2, topic:5047, full:true”]

Love this Desktop Tuesday, I hope that people won’t be hating on the stonehearth version of qubicle not beeing capable of animating models.
[/quote]

Technically you can animate models. Just not the ‘easy’ way (not that blender way is easy :smile:). You can change the numbers in the json files that contain the positions of model-parts at certain times.
For example I changed the rotating doors into sliding doors by changing just numbers.

"type": "animation",
"frames": [
		{
			"root": {
				"pos": [0,0,0],
				"rot": [1.0,0.0,0.0,0.0]
			},
			"frame": {
				"pos": [0,-5.5,0],
				"rot": [1.0,0.0,0.0,0.0]
			},
			"rightDoor": {
				"pos": [-16,0,10],
				"rot": [1.0,0.0,0.0,0.0]
			},
			"leftDoor": {
				"pos": [16,0,10],
				"rot": [1.0,0.0,0.0,0.0]
			}
		},
		{
			"root": {
				"pos": [0,0,0],
				"rot": [1.0,0.0,0.0,0.0]
			},
			"frame": {
				"pos": [0,-5.5,0],
				"rot": [1.0,0.0,0.0,0.0]
			},
			"rightDoor": {
				"pos": [-16,0,10],
				"rot": [0.999922,0.0,0.0,0.0124735]
			},
			"leftDoor": {
				"pos": [16,0,10],
				"rot": [0.999923,0.0,0.0,-0.0123897]

into:

{
	"type": "animation",
	"frames": [
			{
				"root": {
					"pos": [0,0,0],
					"rot": [1.0,0.0,0.0,0.0]
				},
				"frame": {
					"pos": [0,-5.5,0],
					"rot": [1.0,0.0,0.0,0.0]
				},
				"rightDoor": {
					"pos": [-16,0,10],
					"rot": [1.0,0.0,0.0,0.0]
				},
				"leftDoor": {
					"pos": [16,0,10],
					"rot": [1.0,0.0,0.0,0.0]
				}
			},
			{
				"root": {
					"pos": [0,0,0],
					"rot": [1.0,0.0,0.0,0.0]
				},
				"frame": {
					"pos": [0,-5.5,0],
					"rot": [1.0,0.0,0.0,0.0]
				},
				"rightDoor": {
					"pos": [-17,0,10],
					"rot": [1.0,0.0,0.0,0.0]
				},
				"leftDoor": {
					"pos": [17,0,10],
					"rot": [1.0,0.0,0.0,0.0]

With a lot more frames following :wink:
So rotation stays 1 and position changes from 16 all the way to 32 over the course of the frames.
You can do the same for a human for example. It is just a lot harder as you need some good visual imagination.


#12

sweet. And I hope that post-release radiant either gets a cheaper version of a good animating software to sell for stonehearth use, or make their own that only animates stonehearth qubicle models


#13

Would be a waste of time in my eyes as Blender is free, available and works perfectly fine with Stonehearth (if you use this Add-On):

@Miturion manually editing the animation files is quite hardcore :wink:. Try to do it next with an animation of the human model :stuck_out_tongue_closed_eyes:.


#14

Yes, it is pretty hardcore, but not that hard for simple animations.
Animating a human from scratch is ultra hardcore. :sweat_smile:
But changing them a bit is not that difficult. For example make their head bounce more or swing arms less. Or you can copy existing animation frames and copy them over.


#15

Hm… are you assuming or have you already tried it? Because from what I understand the rotation is stored as Quaternion, which is not that easy to “calculate”… at least for people like me :wink:.


#16

@Miturion Hahah well guess you can do everything with a “bit” of coding!

P.s. can’t wait for the update either! :smiley:


#17

I did not do rotations yet, only position. But yes it is not easy to calculate. But trial and error is possible. :smile:
oo with the help of this:
http://www.onlineconversion.com/quaternions.htm

a quaternion is a complex number with w as the real part and x, y, z as imaginary parts.

If a quaternion represents a rotation then w = cos(theta / 2), where theta is the rotation angle around the axis of the quaternion.

The axis v(v1, v2, v3) of a rotation is encoded in a quaternion: x = v1 * sin (theta / 2), y = v2 * sin (theta / 2), z = v3 * sin (theta / 2).

If w is 1 then the quaternion defines 0 rotation angle around an undefined axis v = (0,0,0).

If w is 0 the quaternion defines a half circle rotation since theta then could be +/- pi.

If w is -1 the quaternion defines +/-2pi rotation angle around an undefined axis v = (0,0,0).

A quater circle rotation around a single axis causes w to be +/- 0.5 and x/y/z to be +/- 0.5.

or Quaternions and spatial rotation - Wikipedia


#18

Congratulations. You successfully distracted me from what I was supposed to be doing by conning me into learning about quaternions. At least I’m pretty sure I get how they work now, I’m still unsure as to how they get a point of reference for the rotation around the axis but that’s it. Easier than it looked once I figured out what it was representing, then it was just fairly basic stuff for the basics. Haven’t looked much into manipulation though but eh.


#19

See, I am far to lazy to even try to understand them :stuck_out_tongue_closed_eyes:. The good thing is that tools like Blender do offer you a function to translate the rotation into Quaternions… so this or that way, no need to know the details for me.


#20

I quite like maths myself, the gifted thing probably helps. I can still get confused by advanced things though, like the quaternions. The cyclic non-commutative hyper dimensional imaginary multiplication threw me for a little bit, still don’t get the point of it though as I haven’t found where it’s applied. Probably in transforming them somewhere.

Isn’t jargon fun? You actually get to use a phrase like cyclic non-commutative hyper dimensional imaginary multiplication and not have it be completely meaningless, overly wordy and disheartening for sure but at least it’s still technically correct.