This page exists within the Old ArtZone Wiki section of this site. Read the information presented on the linked page to better understand the significance of this fact.
* DAZ Studio
* A text editor (not MS notepad!)
* File Null.CR2
DAZ Studio is not intended to be a content creation program but many people would like the opportunity to try their hand at making 3D models and using them without first having to invest in an expensive modeling application. With a little patient file tweaking using only a text editor, it is possible to make models and assign them to a CR2 file which will mean that they can easily be included in a scene without using import! In just a short time a dumbbell for your strongpersons to show off with, just the first of a variety of props you can build, will be yours.
Open a new scene in DAZ Studio and select the New Primitive tool.
Create two spheres of 50cm diameter and a cylinder of 5cm diameter and 90cm long.
Move the two spheres to an equal distance either side of the origin (xTrans)
zRotate 90 the cylinder, xTrans to position it between the spheres, and yTrans to position it level with the centers of the spheres. Adjust as necessary to ensure that the ends of the cylinder are contained within the spheres and do not protrude.
Once everything is in position go to the Scene tab and parent the two spheres to the cylinder by clicking on their icons and dragging to release them on the cylinder icon. If you want to rename any of the parts at this stage (Cylinder to Bar, for example) then go ahead.
Add a little color and shine to the completed object by going to the Surfaces tab. These are the settings I chose. Feel free to use your own but restrict yourself to Diffuse, Specular and Ambient color changes only. Don't add texture images of any kind at this stage.
Now export the new prop to \content\Runtime\Geometries\dumbbell\ (File menu > Export) as dumbbell.obj using these settings.
This will now be the geometry file which DAZ Studio will read every time the dumbbell is loaded so, if all is well, the DAZ Studio scene can now be discarded.
First catch your text editor! Unfortunately Windows Notepad does not always format Poser/DAZ files correctly and is therefore not an advisable choice. There are many freeware plain text editors available however so go download one if you haven't already.
As with any sensitive data files make sure you have back-up copies available of all that will now be opened. The edits are fairly straightforward but better safe than sorry!
In the text editor, first open the dumbbell.obj file, and be amazed that it contains perfectly readable text looking just like this …
Search the file for the letter g as a whole word.
This should turn up three entries which read something like “g Sphere”, “g Bar” etc. depending on what you named the three parts of the model. These correspond to the three groups in which the geometry data is stored. As the dumbbell will be a single prop with no moving parts we only really need the one group so carefully replace each “g xxxx” with “g Bell”. This file is case sensitive so check that it is exactly as indicated. Save the file and close it.
Now open null.CR2, the file supplied in Null.zip above, and immediately Save As dumbbell.CR2 in \content\Runtime\libraries\dumbbell\. Null.CR2 is a specially prepared empty CR2 file which forms the template for any single part object to be made into a native DAZ Studio figure so carefully avoid editing it directly!
You should now be seeing this …
There are just two simple task to be completed. Firstly, finish off the line that begins figureResFile so that it reads ..
Then replace every instance of “bodypart” with “Bell” the name given to the single group remaining in the OBJ file.
When loaded, the CR2 will now link to the geometry file and identify the Bell group as the 'Actor' which can be manipulated. Save dumbbell.CR2 then go back to DAZ Studio. Find the dumbbell folder in the Content tab and there is an icon for dumbbell just waiting to be double clicked and loaded into the scene for you to admire.
Don't Panic! You didn't make a mistake. It really is all white at this stage but you didn't waste all that work giving it that nice colored finish in the original modeling.
In exporting the original model the Write Surfaces (Write Material Library) option was selected so the necessary information is out there. It just needs to be transferred to the CR2 file.
Return to dumbbell.CR2 in the text editor and search for “material Preview”. This section of the file is a template for storing texture information for a single 'material'. Fortunately the values don't need to be culled from memory. Alongside dumbbell.obj in the Geometries\dumbbell folder find dumbbell.mtl and open it in the text editor.
Note that a material has been created for each of the three parts of the original model. At present, there is just a single material entry in the CR2 file so select, copy, and paste twice immediately below the original to make a total of three.
Be careful to get the exact selection shown and not to displace any of the existing brackets in pasting. Now transfer the necessary values for each material from the .mtl file to the .CR2 file as in this example:
newmtl Default_Sphere_2 > material Default_Sphere_2
Kd 0 0 0 > KdColor 0 0 0 1
Ka 0 0 0 > KaColor 0 0 0 1
Ks 0.6 0.6 0.6 > KsColor 0.6 0.6 0.6 1
Ns 1 > NsExponent 100
Note that Ns is recorded on a scale of 0 to 1 in the .mtl file corresponding to a scale of 0 to 100 for NsExponent (eg. Ns 0.6 = NsExponent 60).
Save dumbbell.CR2, return to DAZ Studio and load a new dumbbell to see it in all its hues.
If all has gone to plan, why not make the dumbbell 'officially' part of your content by replacing the generic DAZ icon with a thumbnail image using the very handy but entirely free Render Thumbnail script?
Simply set up the scene in DAZ Studio with a square format and use the script to save dumbbell.PNG to the \libraries\dumbbell\ folder.
You now have all the tools and skills necessary to model with primitives and produce DAZ format props without ever needing a 3D modeling program. But the fun doesn't stop there. Using exactly the same techniques a prop can be made out of an exported body part from any one of the figures you use every day in DAZ Studio. And why would you want to do that? Well that's a whole new tutorial!