:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Thu Dec 13, 2018 5:07 am
All times are UTC + 0
 Forum index » Modding Central » Media Hut
Making SHPs with 3D
Moderators: Global Moderators, Media Hut Moderators, Red Alert 2 Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
meselfs
Grenadier


Joined: 12 Dec 2003
Location: Oregon, USA

PostPosted: Tue Feb 03, 2004 6:36 pm    Post subject:  Making SHPs with 3D Reply with quote

Before you read this tutorial, do the following:
Start>Programs>GMax>Uninstall. Follow the onscreen instructions.
If GMax is not installed, give yourself a pat on the back for keeping your computer virgin.

Making SHPs with 3D Apps
A tutorial by meselfs

Intrada

When I first played RA2, I immediately wondered how all those graphics were made. When I downloaded the XCC Mixer, I found myself taking long gazes into ra2.mix, looking at all those neat SHPs and wondering how they made them. Especially incredible were the infactry sequences, notably rocketeer. How did they make 900 frames of such quality and coherence?

In case you haven't figured it out, they were not drawn in 2D pixel by pixel. They were made with 3D.

What exactly is this? Think of taking a picture. Take a rock- it is a physical 3D object. Light bouces off the rock and enters the lens, its appearence depends on lighting, environment, and the rock's physical properties.

Making pictures in 3D on a computer is intended to be the same. You define a 3D object, and you use a process called rendering it to create a 2D image.

The analogy is perfect: the rock provides the information, the lense gathers it, the shutter processes it, the film stores it, and the photo displays it; your model provides the information, the renderer gathers it, the CPU processes it, your hard disk stores it, and your monitor displays it.

Becuase of all this, you can make top quality images of perfect coherence using 3D without the need for incredible artistic capability, and once you have all the 3D data ready you can render it (make the final image) from any camera angle, and also modify the 3D data with respect to time (animating).

3D isn't hard, don't get the idea that it is restricted to "professionals". The hard thing about 3D is getting your desired amount of detail in. For example, I can make a box, put a small box on it, and have a pipe sticking out of it, and call this arrangement Tank A. I can copy this and place it a distance away and call it Tank B. I can make Tank A approach Tank B, stop, and have a small cylinder fly out of Tank A's pipe, hit Tank B, and make Tank B disappear. This would take me 15 min or less.

I could instead make a nice environment, complete with desert, cactus, scorching sun, and maybe one or two small clouds. I could make the tanks as elegant as possible, with animated tracks and trackmarks. I could have Tank A slowly decelerate, point its turret at tank B, and have a small explosion appear at the business end of its barrel. I could have Tank B explode shattering debris all over a split second later. This setup would take several hours.

How is 3D data defined?

A rock is made up of atoms- a computer cannot hanlde information like that. It uses something called a mesh, which is an array of 3D triangles (sometimes quadrangles) that make up a surface. To this surface a material is added, which can have a great variety of properties, including color, transperency, luminence, bump, and many others.

Other 3D data include cameras, lights, and similar things.

Some quick terminology

Antialiasing Short AA, this is a very desireable smoothing effect. Because of the Way AA works (called oversampling), it will slow down rendering more than you think. AA MUST be left off for SHP making, the smoothing is accomplished an alternate way shown later.

Frame Still image produced by rendering, also this is usually the unit of time when animating.

Keyframe Used in animation, a key frames records (keys) an objects location at a certain time. Add another keyframe at another time to make dynamic motion. Almost anything can be keyed, everything from rotation to the color of a light.

Material A set of surface appearence properties (such as color, reflection, etc...) that can be applied to a mesh.

Mesh 3D data that defines a surface, composed of triangle and quadrangle faces.

Modeling This is the process of making your meshes.

Polygon Single face on a mesh, usually a triangle but sometimes a planar quadrilateral (quad).

Raytracing This is a special rendering process which utilizes a different way of rendering an image. Raytracing has many advantages over plain rendering, inlcuding better image quality, reflective surfaces, refraction, and many other goodies. A renderer that can raytrace is simply called a raytracer.

Renderer This is the software that renders your scene into a final image. It is a CPU intensive process and may take more time than you think. The renderer is often integrated into the software your using. Some programs, such as GMax, do not have any renderer.

Scene This is the entire 3D setup, including models, lights, animation, textures, etc...

Texture An image, usually used to define surface color. Also called a "skin". A texture can also be Procedural, which is mathematically generated.


The Software

Remember when I said that the camera analogoy was perfect? Well, it's not. A camera is easy to manufacture, and can give you an absolutely realistic image in moments (if it's Polaroid). Using computer machines to make such images, you'll need some well designed software and a good CPU to render your final image(s) in a reasonable span of time.

The software I will present here are all freeware. If you have something like 3DS or Maya, then nevermind...

...but remember, although freeware software generally require more work, they can easily be just as good or in some cases better than their you-must-pay-ware counterparts.

I will show you 3 pieces of software. There are many more. To download these while you read, see downloads at the bottom.

3D Canvas

This is the easiest software I'll show here. It is made by Amabilis. There are three versions of it, and only one is free (shareware). This free version lacks many goodies, such as boolean operations or a decent renderer, but it is perfectly suitable for SHP making. If you don't want to spend alot of time learning 3D, then this is what I recommend, but if you're a little more serious about this stuff you're better off with something else.

If you don't want to use this but never have done 3D, I recommend you spend a week or so using this just so you get accustomed with the concepts.

Blender 3D

This is easily one of the best freeware 3D programs ever made, some crazy people even prefer it over such software as 3DS. It is fairly abrubt to get used to, but once the incredibly efficient UI is mastered you will have no sweat.

Learning the UI is crucial. Spend as much time as you need and go through the tutorials, you won't regret it. It will probably take you 2 weeks to get accustomed to things.

Blender has a competition quality raytacer. Out of the programs listed here, only Blender is reasonably suited for character animation.

I recommend Blender if you're scared of POV (below).

POV-Ray

POV has a history of being what is probably the best of all freeware renderers. It's photorealism is comparable, if not in excess of, many you-must-pay-ware programs. Before you get excited, a warning: POV does not have a 3D GUI. Everything in your scene is defined by text, or to put it less kindly computer code. For example, have a look at this example POV code:


camera {
orthographic
location <1,1,1>*20
look_at <0,0,0>
}

light_source {<10,20,-5>
color White*.8
parallel
point_at <0,0,0>
}

box {<-5,-5,-5>,<5,5,5>
pigment {color rgb <0.5,2,4>}
finish {
reflection 0.1
}
translate <0,5,0>
}


When this code is rendered an image with a simple box is made.

Modeling cannot be done with POV. An external modeler, such as Anim8or, must be used alongside POV to produce meshes.

Since Anim8or and POV have no direct contact, you must export your scene as a 3DS file and use the 3DS2POV utility (see downloads) to get the data into POV text. Just to excite you, a combination of POV and Anim8or (the same Anim8or 3DS users mock at) has won big competitions.

There is also a modeler called Moray; this program is specifically designed for POV and directly commmunicates with it.

Although Moray has its own format, it writes a POV file into a subdir of its program location. Moray does have a 30 day trial, however it may or may not lock up after 30 days (I got the impression that it doesn't since most trial programs explicitly say the program locks up after expiry, Moray doesn't say that).

POV does not handle keyframe animation, animating with POV is complicated and requires alot of math. There is an include file for POV called clockmod which greatly simplifies animation, and even people with the math experience will find it to be quite a timesaver.

I've attached two POV files, one is a simple demo and the other is a template for SHP making.

I recommend POV only if you're feisty with math & code.

Making the SHP

So suppose you've chosen your 3D program, now what?
The part of modeling, texturing, animating, etc... is up to you, find tutorials on how to do that specific to your software.

But for SHP making there are conditions that need to be met. Specifically:

Camera The camera projection must be isometric. Many 3D programs already have an isometric camera projection, but if your's doesn'y then you can create your own: make a camera with parallel projection (AKA orthographic), and set the camera target (where the camera is looking at) to 0,0,0 and the camera location to 10,10,10 . Evenly scaling the numbers 10,10,10 will result in zooming, for example a location of 20,20,20 is the same camera zoomed out by a factor of 2.

Model Your model's topmost tip (at the base) must lie at 0,0,0 ; so that when you render it the model's base's topmost part will be at the exact center of the image. Refer to RA2 SHPs to see that graphically.

Lighting The light must be parallel, just like the camera. Think of it this way: a light bulb casts divergent rays of light, they diverge outward from the light. The sun, however, casts parallel rays, they all go the same direction (actually they don't, but since the sun is so big and we are so small it seems to be parallel). The shadow cast by the light must be set to hard. The color pure white. The location of the light is subject to your own experimentation, look closely at how Westwood did it, the SpySat has a nice, clearly visible shadow you may refer to.

The brightness of the light depends on the brightness of the environment. Environment (AKA ambient light) can be thought of as a global illumination. For example, where light isn't cast, something will be dead black, right? In practice that's not true, and ambient lighting will cause illumination in unlit areas. Just remember to use a good balance of ambient light and the parallel light is essential, I personally use a brightness of 80% for the parallel light and 25% for ambient (note that these do not add up to 100%, they don't need to).

Background Set a background color of pure blue (0,0,255).

Shadows To make shadows, first make a copy of your scene, rename this (nameofscene)_shadow or something like that. Now set ALL your materials to full luminescent blue (0,0,255), nothing else. Note that a luminescent surface does NOT cast light contrary to the name (unless indirect lighting is enabled, but nevermind that), instead what will happen is that all your modeling will be pure blue no matter what. Now disable ambient light and make a plane surface, a floor. Set the floor's color to 0,0,255 and set the brightness of that color to something insane, like 100000%. Now render. What will happen is that your models will cast a shadow onto the floor, but since they're blue you won't see any model, just a black shadow on a blue background.

The reason we set the floor color's brightness to such a high number is to guaruntee a pure blue color, but unlike the luminscent surface it will recieve a shadow.

AntiAliasing AKA AA, this is a smoothing effect done by your renderer. AA must be disabled for SHP making!!!

The thing is that the smoothing effect will cause a "bleeding" of colors to the background color, and when you convert your frames to SHP you will get an assortment of nasty colors on the edge. Color filters work poorly in fixing this.

Ofcourse, leaving AA off solves the edge problem but introduces a new one: your images will look crappy.

The solution lies in the way AA works: what AA basically does is it renders your model at an extra high resolution then resizes that on the spot. The result is a smooth image of desired resolution.
What you must do is leave AA off and render at a high res yourself; for most cases use 3 or 5 times the resolution (eg if you want a 100 by 100 SHP render at a resolution of either 300x300 or 500x500). For some cases you may want use 7 or 9 times the resolution (but 3 is almost always sufficient).

Now take this extra large render fresh images, load into BS SHP Builder, and resize to your desired size. Resizing will introduce the desired smoothness but BS SHP will not perform any blending with background colors. In effect you do the exact same thing as AA does, except that background color is not AAed.

This resize method is flawless. Do not even try enabling AA and color filtering.

Building the SHP

There are two programs you can really use, the XCC Mixer and BS SHP Builder.

The mixer works quicker than BS SHP and is good for fast conversion. However, it can only import PCX, and all the PCXs must have the exact same pallete.

BS SHP is considerably slower, but it will import BMPs.

A note on renderer quality

I may have used words like 'photorealism' here and there. A question: do we want this sorta stuff for SHP making? No.

The reason why you would want it is that if you were going to go through the trouble of learning 3D, you might as well have the capacity to make things other than SHPs.

The Downloads

3D Canvas:
http://www.amabilis.com/

Blender:
http://www.blender3d.org/

POV-Ray:
http://www.povray.org/

Moray:
http://www.stmuc.com/moray/medown.html

ClockMod:
http://www.geocities.com/SiliconValley/Lakes/1434/

3DS2POV:
http://www.globalserve.net/~sanger/

Anim8or:
http://www.anim8or.com

Wings 3D:
http://www.wings3d.com

XCC Mixer:
http://xccu.sf.net

BS SHP Builder:
http://ppm.cncguild.net




Concluding words

It takes time. Do not think you suck if all you can make is an egg after a week. I've been doing this stuff for almost a year yet I learn something new every day.
Note, however, that the 3D software I chose is considered fairly difficult to learn, also I do not spend as much time in front of computer machines as most people, so you'll probably learn in a shorter time then I.

Do not hesitate to ask me for help.

Happy trails Wink !
_________________
My 3D to SHP tutorial


Back to top
View user's profile Send private message Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
 Forum index » Modding Central » Media Hut
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.1197s ][ Queries: 11 (0.0051s) ][ Debug on ]