PLUGIN: Character3D v0.93 (08 May 2006)

Started by Besh, Sat 05/11/2005 18:13:10

Previous topic - Next topic

Dennis Ploeger

Hi!

Support for Blender would be great! I can model with blender a lot better than with the other two tools. Fact is, I've already got a model in Blender, which I'd like to include. ;-)

As Blender has a lot of export-options, the other possibility would be to implement another file format, that can be exported from Blender. I haven't found an exporter to milkshape for Blender, but tried to do an export/import thing over various formats, but all have failed.

Kind regards,
Dennis
deep

Besh

I've started to write the code for importing Blender and Anim8ot models, but actually I'm very very very busy with my thesis work! Moreover I'm working on my first game.
I don't know when the Blender/anim8ot support will be ready, but don't worry surely will be readyÃ,  ;D
"Spread our codes to the stars,
You can rescue us all"
- Muse

Ali

I'm glad to hear you're working on Blender/Anim8or support, I don't mind waiting. Since your previous post asked for any requests for the plugin I thought I'd mention a smallish-one. While it's currently possible to set the camera's tilt on the Z axis, would it be possible to set its roll on the Z axis (or whatever axis is depth)?

Good luck with your thesis!

td

Character 3D look great, but i have a problem with Walk speed. SetCharacterSpeed function is dosn't work. If i diminish "SetGameSpeed" or change "AnimationSpeed" parameter, character will move interrupt. How should i slow down walking speed???

Besh

#44
The SetCharacterSpeed function is an AGS function, the C3D plugin read the character position, speed, ecc. from the AGS system.
In the AGS manual there's a note:

NOTE: This function CANNOT be called while the character is moving, so you must stop him first.

I think you don't diminish "SetGameSpeed" or change "AnimationSpeed" parameter since they aren't relate to the character speed.

Feel free to ask meÃ, again if you still have other questions.
"Spread our codes to the stars,
You can rescue us all"
- Muse

Dreadus

I ket "parse error at const" every time i try to save a game with this plugin... did i miss something?

monkey0506

Try using AGS 2.71 or higher, as noted by the first post which states "Requires AGS v2.71".

Dreadus

this seems to have worked. Might i ask, has anyone tried animations of ~20frames in ms3d format? it seemed to crash mine.

Besh

#48
I tried animation up to 75 frames and everything is OK!!!
Are you sure that in the ms3d file there're enough frames???
"Spread our codes to the stars,
You can rescue us all"
- Muse

Dreadus

#49
I have been playing around with this for a couple of days now and i really love it, the celshading is really fun to mess with. Some things i wanna ask though...
1.Add a ScaleMoveSpeed property to 3d characters :)
2.I think it'd be really cool if you made it so when a character turns to change direction or face something, it makes a smooth turn, even if there are still only 8 directions.

RowdyAdventurer

can this plugin support quake files eventually?

Mozesh

Milkshape allows you to import quake 2 and 3 models. (md2 and md3 files) And this plugin can use milkshape files (ms3d) So yes, you can use quake 2 and 3 model types. Not too sure about quake 1 files though.

RowdyAdventurer

I dont like the way it converts and saves them though

Besh

Quote from: RowdyAdventurer on Thu 16/11/2006 17:32:18
can this plugin support quake files eventually?

Yes ... I think.
Actually I'm very busy with my thesis, as soon as I can (probably next Jan or Feb) I'll restart again to work on the Character3D project. I have some cool ideas.
"Spread our codes to the stars,
You can rescue us all"
- Muse

Ali

#54
You're clearly very busy Besh, but I thought I'd make another request all the same...

The 3D characters don't turn before walking, or turn before facing a location. A simple solution I found was to have the character face an invisible object in repeatedly_execute, and to reposition the object to the mouse's position on a click.

EDIT: I was wrong, the character does turn before walking! What I say next is still relevant though...

What still looks a little odd is the way the 3D characters have only 8 directions. I guess that this is a consequence of there being 8 directional views in AGS, however it makes turning look distinctly jerky in comparison with other animations. One person had asked if the number of directions could be increased to 16 (before your plugin existed) but no-one thought it would be much use:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22322.0

I'm wondering if there could be a solution that didn't need more directions in AGS. Might it be possible to smoothly rotate the 3D characters on their Y(/Z/up) axis using a separate function? Then we could make the AGS character face east, and smoothly rotate the character3D character until he faced east too.

Rui 'Trovatore' Pires

Right-o, and the turning speed's reference would be the character's animation speed.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Mozesh

I didn't have problems with turning to face directions or turning before walking, at least I think I didn't. I vaguely remember some problems with it but I figured something out. But I can't remember, so sorry 'bout that :-\

Ali

Quote from: Mozesh on Sun 17/12/2006 21:17:43
I didn't have problems with turning to face directions or turning before walking, at least I think I didn't. I vaguely remember some problems with it but I figured something out. But I can't remember, so sorry 'bout that :-\

I beg your pardon, the character does turn before walking, but not smoothly. I'll modify my earlier post.

Actually, a bit of experimentation has sort of got me round this problem. I can make the character rotate smoothly to face any location I choose, but my grasp of trigonometery and floating point mathematics is far too weak to make the tentacle turn in the most economical direction (so he often turns 200 degrees rather than 160).

I do think it would be handy if this feature was built-in to the plugin. Of course, that's at the discretion of Mr Besh!


Besh

OK! This is a good suggestion. I'll try to implement it in the next version.
If Mr Ali wants, he can send me the codeÃ,  he wrote to show me his idea.
"Spread our codes to the stars,
You can rescue us all"
- Muse

Ali

#59
Since my last post, I think I've worked out how to make the character rotate in the quickest direction. Once I've scripted it I'll post the code at the first opportunity I get.

Good day to you, sir!

EDIT:

This is what I have. It's nothing special and it's probably not very efficient. All it does is make the tentacle rotate smoothly towards the mouse when I right-click:

Code: ags

//In repeatedly_execute_always:

		if (cTentacle3D.OrientationY>360.0) cTentacle3D.OrientationY=0.0;// Limit the character's orientation to above 0 degrees.
		if (cTentacle3D.OrientationY<0.0) cTentacle3D.OrientationY=360.0;// Limit the character's orientation to below 360 degrees.

// in on_mouse_click, after the left-click part.

Ã,  else {// right-click, so cycle cursor
		
		SideX=IntToFloat(mouse.x-cTentacle.x);// make a right angled triangle between the mouse and the character
			
		SideY=IntToFloat(mouse.y-cTentacle.y);

		SideY=SideY*1.7; // Stretch the triange to account for the angle of the camera (Not sure about this, but it seems to look right)
		
		RotAngle= Maths.ArcTan2 (SideX, SideY);// find out the goal angle of the triangle
		
		goalAngle = Maths.RadiansToDegrees(RotAngle)+360.0; // Make sure the goal angle isn't below 0

		if (goalAngle>360.0)goalAngle=goalAngle-360.0; // Make sure the goal angle isn't above 360 
		
		startAngle=cTentacle3D.OrientationY; 
		
			if (startAngle<goalAngle){ //find out which is the quickest way to rotate
			
			AngleA = goalAngle-startAngle;
			AngleB = (360.0 + startAngle) - goalAngle;
			
			if (AngleA>AngleB) {//Rotate Clockwise
				while (!(cTentacle3D.OrientationY>goalAngle-1.0 && cTentacle3D.OrientationY<goalAngle+1.0)){
					cTentacle3D.OrientationY=cTentacle3D.OrientationY-2.0;
					Wait(1);
				}
			}
			
			else {//Rotate Anti Clockwise
				while (!(cTentacle3D.OrientationY>goalAngle-1.0 && cTentacle3D.OrientationY<goalAngle+1.0)){
					cTentacle3D.OrientationY=cTentacle3D.OrientationY+2.0;
					Wait(1);
				}
			}
			
		}
		
			else{
				
			AngleA = startAngle-goalAngle;
			
			AngleB = (360.0 + goalAngle) - startAngle;
			
			if (AngleA>AngleB) {//Rotate Clockwise
				while (!(cTentacle3D.OrientationY>goalAngle-1.0 && cTentacle3D.OrientationY<goalAngle+1.0)){
					cTentacle3D.OrientationY=cTentacle3D.OrientationY+2.0;
					Wait(1);
				}
			}
			
			else {//Rotate Anti Clockwise
				while (!(cTentacle3D.OrientationY>goalAngle-1.0 && cTentacle3D.OrientationY<goalAngle+1.0)){
					cTentacle3D.OrientationY=cTentacle3D.OrientationY-2.0;
					Wait(1);
				}
			}
				
				
		}
		
		ProcessClick(mouse.x, mouse.y, eModeLookat);
				
	}


I hope that's at least a little bit useful. I'm just irritated that my maths teacher was right, I did use trigonometry after leaving school.

SMF spam blocked by CleanTalk