Game Development Community

My first model!

by Nathan Tran · in Artist Corner · 08/25/2004 (12:28 am) · 16 replies

Hi everyone,

I am a first time poster, long time follower of the GG forums. I have been hard at work learning how to model, UVW unwrap, and texturing as a preliminary step towards creating a game that I have in mind. It will be a multiplayer Harvestmoon (farming simulator) clone complete with a real-time economy. Any ways, here's a peak at my first model.

The model weighs in at 2600 Triangles. Showtool has it at 1100 polygons.

3dmax
nathantran.homeip.net/images/torque/model.jpg
In game ( Lightning pack demo )
nathantran.homeip.net/images/torque/Ingame.jpg
nathantran.homeip.net/images/torque/Ingameback.jpg
The model has no hair. I plan to attach the hair/headdress at a mount point on the head. Is this possible? Any comment is greatly appreciated.

Nathan.

#1
08/25/2004 (2:18 am)
I like it.. thats your first model? Great work.

His proportions look slightly strange, but it adds a certain look to him that you might have wanted.

Keep at it! wish I could model like that, all I can manage is an uber-low-poly tree :)
#2
08/25/2004 (10:51 am)
@ Phil,

I followed the video tutorials by Ben Mathis at www.poopinmymouth.com to make the above model. The slightly skewed proportions are indeed intentional. I am aiming for an anime look and feel to the game which is in tune with the original Harvestmoon game.

@ All

Could some one point me to a doc/tut on how to add mount points to the bone structure?

Thanks.
Nathan.
#3
08/25/2004 (1:57 pm)
I think add a Node named 'mountpoint' to the attachable hair piece, and then in script[I believe some amount of scripting will be needed to do this 'effect'], in the ::onAdd method, specifiy the shape's path, and a call for the function. I think it might be that simple...but my scripting skills are still shiny from the box...:). My big question with this type of approach is: the mountpoints seem Weapon oriented...hence weaponsSlot, but are they?? Are generic Items able to utilize this same mountpoint/mounting system??? Such as this example of hair, I have some of my own; for cigars/marshall-sherrif badges/etc, holstered sidearms....is all that is needed is to declare a global variable in the first few lines of the object script?? Oh, btw, I think your 'hair' piece will need to become an Item and not a static object, so it will probably need it's own script to itself...
#4
08/25/2004 (2:19 pm)
First off, weaponsSlot is a variable and not an actual mount name.

By default TGE handles 8 mount NODES numbered as so...

mount0
mount1
mount2
mount3
mount4
mount5
mount6
mount7


TGE is slightly fault tolerent in it's dealing with mounts so they dont have to be successive, meaning if you install

mount0
mount1
mount7

it will find all 3 because it doesn't stop counting when it fails to find mount2.


to mount an image to a mount node, the image must have a node called "mountPoint". It can only have ONE mountPoint. The result of mounting an image defaults to the image's mountPoint to attach to the specified node.

So if you were to put a node at the top of your models head called "mount7" and then build some hair with a node called "mountPoint" you would put them together with...

function player::onAdd(%this)
{
%this.mountImage(hair, 7);
}


You should consider spending the 100 bucks on the SDK. I'm by far the most newbie useless moddeler you'll ever meet here. Probably because I'm not a moddeler, I'm a scriptor. But I learned ALL of that from the engine itself and a great deal more from the additional documentation supplied with the engine. Tutorials online are good for making models, but almost all of them are useless to making them properly for TGE. TGE comes with a manual that will help you learn to blend those online tutorials seamlessly with TGE.
#5
08/25/2004 (3:59 pm)
Thanks, Gonzo, that filled in my blank spaces...:) I kinda knew what I wanted to do, but don't yet know to impliment them. For instance; I got my thrown projectile weapon to disappear after throwing the item[cause of my hacky way to get a 'thrown' projectile], but I can' get it to not reappear if ammo is 0...little juicy bits like that, I'm still in the dark about. If there is as you say, a good manual to help integrate the syntax and methods, I should hold a license, myself, outside our coder.

PS, btw-can I use any of the other Nodes, Lights specifically as a mountpoint? if I've included them with a player shape, bit off topic there, sorry...NICE first model!
#6
08/25/2004 (5:19 pm)
No. Mounts can only be used in the manner I have defined unless you want to start changing the engine. For instance, you could change TGE's default count to 10 instead of 8 and you could then include "mount8" and "mount9" on your model as well. That would be the most simple of changes of course. But anything you intend to mount TO another object must have one and only one "mountPoint" node. For instance, if your player model is going to be sitting in a plane flying or in a car driving then he would need a "mountPoint" node in the middle of his butt.

Now, as far as I know, you can mount lights to the models nodes. And you can mount multiple images to to the same node. Say you were making a midevil fantasy game you could mount a crossbow to mount0 and then using the offset settings you could mount say a "magic bracelet of power" to mount0 and then offset it back so that it appeared to be on the wrist instead of in the hand, and then since it's magic, you'll want to mount a light to mount0 offset to the same place as the braclet to cast that special blue magic glow.


function player::onAdd(%this)
{
    %this.mountImage(crossbow, 0);
    %this.mountImage(bracelet, 0);
    %this.mountImage(light, 0);
}
#7
08/25/2004 (5:22 pm)
Just out of curiosity, why would you "throw" a projectile?
#8
08/25/2004 (6:08 pm)
Good Info Gonzo... happens to be exactly what I'm working on. Nice Model Nathan!
#9
08/25/2004 (9:33 pm)
So basicly you are allowed only one mount point and you have to work around that one?

-Jase
#10
08/25/2004 (9:45 pm)
If you had an SDK license, adding in multiple mountpoints shouldn't present much of a problem. Although you should be able to mount a player or image any way you want from that one mountpoint.
#11
08/26/2004 (6:57 am)
It seems like some people don't understand exactly what you mean by one mountpoint. There are eight mount "nodes" called mount0, mount1, etc. There is one "mountPoint". These behave like an electrical plug and socket. The mountPoint is the plug, and the mount nodes are the sockets. Your vacuum cleaner only has one plug, but you can insert it into any electrical socket in your house. Likewise, a model only has one mountPoint (plug), but can also have up to 8 mount# nodes (sockets). If you want more than one "plug" you would have to add support for this in the engine code. Why would you want to do this? There are many reasons, but one that comes to mind is something like having a character hang from his hands on the bottom of a plane, and also having him sit in the cockpit. This could probably be handled in some creative way without engine changes, but the most straightforward way to think about it is to have two separate mountPoints.
#12
08/26/2004 (7:52 am)
I did my 'thrown' projectile to get an explodable weapons like dynamite sticks and molotov cocktails[one timed/one not;)]; by making the projectile and 'weapon' the same shape, and then doing a .unmount weaponslot during the ::onFire method, or something similar. It actually works pretty well, and I make the projectile ballistic and jizzle with the settings to get what I considered a realistic arcing 'throw' of the object with range, etc... But since the projectile/weapon are uniquely the same and it's ammo count would be zero after the throw, when I reselect the 'weapon' it mounts the image, even though the ammo is empty. Gameplay implimentation will probably control the ammo, sooo...probably a couple ways it could go. Thanks all.
#13
08/26/2004 (9:04 am)
@ John


Quote:There are many reasons, but one that comes to mind is something like having a character hang from his hands on the bottom of a plane, and also having him sit in the cockpit.


This is an area where animation meets offset. When you animate your model, you'll want to make a 'sitting' animation to make it look like he's sitting on a car seat or chair or whatever. With the mountPoint in the butt of the model, and a mountNode in the seat of the plane, they make a natural combonation. Now, if you wanted that same character to hang from a plane using the same mountpoint that's in his butt, you would make an animation 'hangFromPlane' and pose the character to your liking. Then with a mount node on the planes undercarraige you would mount the model to that node and then use the datablock value of "offset = " to adjust the characters actual position till it looks like his hands have grasped the plane in a fashion you are looking for. Even if you make multiple mountpoints available in the engine, you will still have to pose your model via animation and use the offset after mounting to tweak it.



@ Rex


Quote:I did my 'thrown' projectile to get an explodable weapons like dynamite sticks and molotov cocktails

This sounds like it would be better suited by an Item class. In a couple of projects I'm working on, I use "datablock ItemData(MyItem)" for things like grenades, mines, knives, etc... Items are easily tracked by inventory and can just as easily be a bomb, weapon, dumpster, nothing, or anything else you want them to be. And there is already code for throwing an item available in the demo I believe.
#14
08/27/2004 (6:06 am)
Ah, Thanks, Gonzo; I guess what you speak of is the ::onthrowItem method? That sounds like a better method than my hack; and I have an additional weapon in mind, similar to a mine, but in essence attaches itself to the player and draws health...it's one of our 'special' weapons on the Range...heheheh, bearTrap!. And with only mountPoints being accessable, I need to rethink Node locations or number...man, what a Thread jacking, sorry Nathan. I'd love to carry this on under MODs, Gonzo...thanks a bunch.
#15
08/27/2004 (10:13 am)
Quote:Oh, btw, I think your 'hair' piece will need to become an Item and not a static object, so it will probably need it's own script to itself...


Nope, what he needs is...

datablock ShapeBaseImageData(Hair)
{
        shapeFile = "~/data/shapes/player/hair.dts";
        offset = "0 0 0";
        mountPoint = 7;
};


We aren't exactly hijacking his thread. For one thing, his questions spawned most of this dialog, for another, it's bringing people back to the thread over and over to see his model (which was his intention) and also, he's gonna need to know all this info to get everything working right. That being said, it's time to correct some things I said because it would seem that GG has done some changing to the engine.....


Here's the new info....


ShapeBase objects(including players) can have 32 mount NODES built into the model. They are numbered....

mount0
mount1
mount2
.
.
.
mount30
mount31

Mount 31 is used for AI so leave that one alone untill you know exactly why you need it and what you need it for. Previously you could mount eight(8) images to a player class object, and now you can only mount four(4). I have no idea why GG did this, but they must have had some reason. Most likely because images CAN BE weapons and mounting 8 weapons or animated images on a player would be a heck of an engine load. However, it would appear that there is no limitation on mounting OBJECTS to a player (I'll check deeper into that later.) By making an object an item instead of an image, you do open up possibilities for combo mountings.


For example, if you mount the crossbow to the player, you cannot mount anything to the crossbow itself because for one it is an Image class and for another it has no mounting nodes. But lets say you had a shield you wanted to mount to your left arm. Making the shield an Item class object with a node called "mountPoint" would allow you to mount the shield to the desired node location on a player. However, unlike an Image, you can include mounting nodes on the shield just like you did for the player, and you would be able to attach images or items to the shield at those mount nodes. At least I'm pretty sure all that would work fine. I'll have to build a few special test objects in Max to see if it can be done absolutely for sure. My interpretations are coming directly from the code, so it's possible I may have overlooked something(very small chance). I just got lucky and caught the fact that the info I knew a month ago was rendered slightly inaccurate 12 days ago, lol.



Before anyone asks me what the differences in images and items are....



datablock ShapeBaseImageData(Hair)
{
        shapeFile = "~/data/shapes/player/hair.dts";
        offset = "0 0 0";
        mountPoint = 7;
};
  
  
  
datablock ItemData(Hair)
{
        shapeFile = "~/data/shapes/player/hair.dts";
        offset = "0 0 0";
        mountPoint = 7;
};
#16
08/27/2004 (1:52 pm)
Holy Mambo, 32!, Thanks GG....:), Thanks Gonzo! this is a great thread...so not a stand alone script, just the datablock for the item/object in question(hair, badge, smoke, etc...). The limitation of 4[assuming all at once] is not a big ordeal; that is a bit of kack to be adding outside the mesh's details alone. This is great!, so as an item, a damageable object could be held and broken while still mounted? That will pose some gameplay strategy options...:) As would our exploding health items and ammo pickups...:):), ported over from our original prototype.