i hav a huge higtest bollock & another tiny lower !!!

i hav a huge higtest bollock & another tiny lower !!!

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
emmanuel
Posts: 952
Joined: 28 May 2005, 22:43

i hav a huge higtest bollock & another tiny lower !!!

Post by emmanuel »

i dont kow if this subject is related to help for me or developement error...:so i post two

look for the units in center far
some units have high(his foots are out !) and oversiz balls and another have normal sized but lowered (his top is out...)
Image

maybe these spherics are hit/selection location???
in first time i think his center is the ground plate but no
after i think to first part3d center but the huge size for one and the normal for other with footprint 0.1(not visible for the little unit!!!) say no again...
maybe the 3d parts max size ???
don t understant for this bollocks

anothers problem is the ground tracks are very slow to print (10 or 20seconds !)
another some units not crush trees and not found path (footprint3,3) with crushstrenght 100 or higter and others with a copy of .fbi file crush (???)
is crushing is in scripts files ?
User avatar
Aun
Posts: 788
Joined: 31 Aug 2005, 13:00

Post by Aun »

...



......



Wha?

Erm... Can anyone make sense of all this? And I thought this post was by a spammer considering the title...
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

Give the guy a break, it is not his intention to write uncomprehensive.
Pathfinder
Posts: 47
Joined: 26 Jun 2005, 05:02

Post by Pathfinder »

I beleive that the problem with the collision spheres is from the fact that it is a 3do model. (I remember hearing this somewhere, but Im not sure if it is correct.) You might want to try to get the models into .s30 format. The benefit is that you can create your own custom shaped collision spheres for each model without haveing the computer to calculate it for you.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Pathfinder wrote:I beleive that the problem with the collision spheres is from the fact that it is a 3do model. (I remember hearing this somewhere, but Im not sure if it is correct.) You might want to try to get the models into .s30 format. The benefit is that you can create your own custom shaped collision spheres for each model without haveing the computer to calculate it for you.
I have been around and around with this... ok it is this simple.. we have no cotroll over 3do hitspheres. S3o-ing a model requires knowledge of uvmapping and real texturing. not as easy for most people as one would think.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

It would be nice to know the details of how 3do spheres are generated. however.
User avatar
Felix the Cat
Posts: 2383
Joined: 15 Jun 2005, 17:30

Post by Felix the Cat »

FLOZi wrote:It would be nice to know the details of how 3do spheres are generated. however.
It would be nicer to be able to generate your own spheres for 3do, as in s3o.

(and before you say it breaks all prior mods, the 3do spheres would necessarily be in a separate, optional, file, ideally generated by upspring or whatever tool you're using)
User avatar
emmanuel
Posts: 952
Joined: 28 May 2005, 22:43

Post by emmanuel »

sure i have any interest to be uncomprenhensiv
how to spam my favorit work tools forum
for prob this look in mod forum i hav some work in a years long ago!
and i submit my problem in french forum firstly but not help to translating ...
: http://tas-frenchzone.forum2jeux.com/vi ... =4956#4956
(they hav not linking to your forum nor to downloading taspring71b1


so i can rework my units in 3do or build for upspring but i don t understand upspring and i prefere 3do for totalA compatibiliy...

instruct us about the way of taspring code is calculating the size and center of hit/select balls and i modeliz for it

maybe i look trought all mods release for test if ball are correct
but it s longtime for me :
sure anyone have all mods installed can report this by using "b" key and posting screenshoot for all buggy balls !
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

it calculates a center pos using all the vertices of the model, and then calculates a radius based on all the vertices... I'm not going to explain how this works, it is basically how anyone would calculate a center+radius.

Code: Select all


void C3DOParser::FindCenter(S3DO *object)
{
	std::vector<S3DO*>::iterator si;
	for(si=object->childs.begin();si!=object->childs.end();++si){
		FindCenter(*si);
	}

	float maxSize=0;
	float maxx=-1000,maxy=-1000,maxz=-1000;
	float minx=10000,miny=10000,minz=10000;

	std::vector<S3DOVertex>::iterator vi;
	for(vi=object->vertices.begin();vi!=object->vertices.end();++vi){
		maxx=max(maxx,vi->pos.x);
		maxy=max(maxy,vi->pos.y);
		maxz=max(maxz,vi->pos.z);

		minx=min(minx,vi->pos.x);
		miny=min(miny,vi->pos.y);
		minz=min(minz,vi->pos.z);
	}
	for(si=object->childs.begin();si!=object->childs.end();++si){
		maxx=max(maxx,(*si)->offset.x+(*si)->maxx);
		maxy=max(maxy,(*si)->offset.y+(*si)->maxy);
		maxz=max(maxz,(*si)->offset.z+(*si)->maxz);

		minx=min(minx,(*si)->offset.x+(*si)->minx);
		miny=min(miny,(*si)->offset.y+(*si)->miny);
		minz=min(minz,(*si)->offset.z+(*si)->minz);
	}

	object->maxx=maxx;
	object->maxy=maxy;
	object->maxz=maxz;
	object->minx=minx;
	object->miny=miny;
	object->minz=minz;

	object->relMidPos=float3((maxx+minx)*0.5,(maxy+miny)*0.5,(maxz+minz)*0.5);

	for(vi=object->vertices.begin();vi!=object->vertices.end();++vi){
		maxSize=max(maxSize,object->relMidPos.distance(vi->pos));
	}
	for(si=object->childs.begin();si!=object->childs.end();++si){
		maxSize=max(maxSize,object->relMidPos.distance((*si)->offset+(*si)->relMidPos)+(*si)->radius);
	}
	object->radius=maxSize;
}

float C3DOParser::FindRadius(S3DO *object,float3 offset)
{
	float maxSize=0;
	offset+=object->offset;

	std::vector<S3DO*>::iterator si;
	for(si=object->childs.begin();si!=object->childs.end();++si){
		float maxChild=FindRadius(*si,offset);
		if(maxChild>maxSize)
			maxSize=maxChild;
	}

	std::vector<S3DOVertex>::iterator vi;

	for(vi=object->vertices.begin();vi!=object->vertices.end();++vi){
		maxSize=max(maxSize,(vi->pos+offset).Length());
	}

	return maxSize*0.8;
}
User avatar
emmanuel
Posts: 952
Joined: 28 May 2005, 22:43

Post by emmanuel »

for a real object this named =center of gravity= :isn t?
but i don t understand how i must do for reduce this sphere when the model is little and sphere big>>>
Post Reply

Return to “Engine”