STAIRS. DERIVATED PIECES

Important pieces for any construction are stairs.

Please download these files:

roundStairs12x7x6.ase - in the folder roundStairs12x7x6

stairs8x7x4.ase - in the folder stairs8x7x4

Pay attention! We don't have .JPG files here. What means this?

Each piece has some colors or images (the Base, by example, has an image). One or more of these images/colors can be "default textures". The "default texture" of the walls of previous lessons, by example, is only a color: green. We will see, at this lesson, how we can create new pieces "derivated" from a piece we have, with a different texture/color. But, before this, you need to do, for the new pieces, the "standard steps" for pieces that don't have "actions":

Like all is allways the same, you will find these "standard steps"

at this link.

Now, "how to create derivated pieces":

You ever download "standard pieces" from DMU (or, in the future, from some other sites, I hope) . This piece can have some .JPG files. By example, the piece Plate13x05x13 has the file: plate13x05x13.jpg. It defines the "default texture" of the piece, here only a gray color. Imagine that you would like to have a redPlate13x05x13 - red, of course. Step by step:

Now you have a new piece that you can use like all the others you have downloaded. But remember: before to use it inside Croquet, you need to do, for the new piece , the "standard steps" for pieces that don't have "actions":

Like all is allways the same, you will find these "standard steps"

at this link.

Remember that, creating the "initialize" method you will not have the same name for the folder and for the name of the .ASE file:

initialize

super initialize.
tframe := (TLoad3DSMax new initializeWithFileName: 
	   (FileDirectory pathFrom:
            {FileDirectory default pathName.  'Content'.  'redPlate13x05x13'. 'plate13x05x13.ase'}) 
	   scale: 0.1  shadeAngle: 90.1 textureMode: GLReplace) frame.
tframe collapse.
tframe boundsDepth: 3.
tframe initBounds.
self addChild: tframe.
tframe objectOwner: self.
inControl := false.

Why? Because:

VERY IMPORTANT: The "name of a piece" is the name of the folder, not the name of the file!

VERY IMPORTANT: The "name of a piece" is the name of the folder, not the name of the file!

VERY IMPORTANT: The "name of a piece" is the name of the folder, not the name of the file!

Sorry, but this is the most commom error everybody does.

WOW! You will have some work to create a new piece but it's easy, after to learn and to do this many times.

AND NOW! A challenge for you!

You have all the resources anf knowledgement for the creation of the space of the figures. GO! GO!:

And, if you like to have a bigger challenge: put a 3D Remote Portal over the squared floor. Mama mia!


PREVIOUS LESSON NEXT LESSON
T. CONTENTS HOMEPAGE

DISCLAIMER: This material can be translated for any language, and reproduced total or partially by anybody using any type of media. But, please, don't put your name like author. And let me know if it was useful (americo@dmu.com).The use of any code, 3D model or technique published is free and doesn't need to have any reference about this source.The author is not responsible for any damage that the material can cause to your professional or sexual life.