As I said yesterday, DAZ 3D Studio has truckload of nice posable 3D objects, so many you could probably get ruined trying to collect them all. Playing with 3D is like a collecting card game, you never have enough bits and pieces.

To show you what I mean, here is a picture made with DAZ 3D Studio. This is the Model Michael 4, with the clothes props Mafioso and Hats. Edited using OmniGraffle to add the blood and the bullet hole. If I wanted I could probably find both bullet holes and blood to DAZ 3D Studio, but I like to do things the quick and fast way, using the tools I know, and save time and money on the way.

OK, now back to my crates. This is the file Null.cr2, but I will only show the parts that are of interest.

In the beginning of the file you find this:

figureResFile :Runtime:Geometries:filepath

actor BODY

{

}

actor bodypart

{

storageOffset 0 0 0

geomHandlerGeom 13 bodypart

}

And at the end of the file you find this:

material Preview

{

KdColor 0.767388 0.414228 0.633106 1

KaColor 0 0 0 1

KsColor 0.039729 0.0466933 0.0481765 1

TextureColor 1 1 1 1

NsExponent 50

tMin 0

tMax 0

tExpo 0.6

bumpStrength 1

ksIgnoreTexture 0

reflectThruLights 1

reflectThruKd 0

textureMap NO_MAP

bumpMap NO_MAP

reflectionMap NO_MAP

transparencyMap NO_MAP

ReflectionColor 1 1 1 1

reflectionStrength 1

}

}

Now we shall make some changes to our copy of the file, not to the original file.

First, you will see the word bodypart, which we will change to the name of our object in the .obj-file, CrateOne, we do a replace all using our favorite text editor, I’m currently using TextWrangler.

Then we see the string :Runtime:Geometries:filepath, which we should change to the relative path within the DAZ 3D Studio path structure where we will have our model, which in this case is :Runtime:Geometries:4EYes-crates:4E-crate-base.obj. As you can see, I’ve changed the name of the .obj file to 4E-crate-base.obj, as I will use the same geometry for all the crates I will make (all five of them), and to save disk space and memory, they can all point at the same geometry file.

Now, in the last part, there are several different things to pick from the .mtl file, material, KdColor, KsColor, KaColor & NSExponent first.

These are picked from their equivalents in the .mtl file, but they have different names.

material is set to the newmtl property, in this case WoodenCrate. KdColorKsColor KaColor to the Kd, Ks & Ka values, and last NSExponent to the Ns value.

	material WoodenCrate
		{
		KdColor 1.000000 1.000000 1.000000 1
		KaColor 0.1 0.1 0.1 1
		KsColor 1.000000 1.000000 1.000000 1
		TextureColor 1 1 1 1
		NsExponent 80

Now, we nee do define the texture to use, and that is set to the texturemap.

textureMap ":Runtime:textures:4EYes-crates:4E-crate-5-texture.jpg"

We are ready to save our own cr2-file, and we call it WoodCrateOne.cr2 and save it in the Runtime:libraries:Props directory where we first create a 4EYes-crates directory. We also put the texturemap in Runtime:textures:4EYes-crates.

OK, ready to test this? Come back tomorrow for some more 3D fun.

Comments

Leave a Reply