Huge planes appear when creating entities

Posted By: lemming

Huge planes appear when creating entities - 11/14/11 17:36

Hi everyone!

When I use ent_create for my models I get for some reason these huge planes. They are placed slightly over zero Z.

The level is not big (everything you see is just testing stuff) and I made a screenshot from outside, so you see the plane is really big.


I replaced every model (the player is made of multiple models) with guard.mdl and the plane disappeared. So it seems to be something with the model. But what? (I use Bone-Animation.)
They are (as well as the level) made in Blender and where exported and imported using FBX.

Thanks!
Posted By: painkiller

Re: Huge planes appear when creating entities - 11/14/11 19:30

I think you mean the shadow errors? Then that's caused by stencil shadows, you need to use a closed mesh model to get shadows working properly
Posted By: LewyT

Re: Huge planes appear when creating entities - 11/15/11 00:14

I don't really have an answer for you - just an observation:
that "plane" appears to have the same texture as the character's hair.
- only scaled up really big
Try creating everything but the hair or head model and see what happens.
Posted By: lemming

Re: Huge planes appear when creating entities - 11/15/11 16:12

I already did. when I disable the hair it takes whatever comes next. Chest, trousers, sword, boots... When only the body itself remains it has a similar effect, but much higher up und more like an even bigger cone.

edit:// @painkiller: no, I don't mean the shadows. But you're right, disabling them makes sense.
Posted By: EvilSOB

Re: Huge planes appear when creating entities - 11/15/11 19:04

Any chance of posting a link to the model itself? The actual one you are using.

It mau be something screwy in the mesh, or the skins.
Posted By: Pappenheimer

Re: Huge planes appear when creating entities - 11/15/11 19:39

Originally Posted By: lemming
...imported using FBX.

Do you mean 'imported in MED and then saved as an mdl file?
Did you test the animations in MED?
Posted By: lemming

Re: Huge planes appear when creating entities - 11/15/11 22:12

I actually did the whole animation in MED and just imported the mesh and skin. (But I want to do everything in Blender for the final models.)

But you can get the models.

edit:// I did the animation in MED, not WED. wink
Posted By: EvilSOB

Re: Huge planes appear when creating entities - 11/16/11 08:54

Ive looked at you models, and I suggest try it without the armor model running.

The other models look OK to my un-trained eye,
but the armor is still open-mesh and may be causing shadow-defects.
Posted By: lemming

Re: Huge planes appear when creating entities - 11/16/11 18:14

So I closed the mesh (hair was open, too) and it gave a nice solution to the shadows. Sadly the huge orange-yellow coloured plane is still there.

When I do it the spartan way and wear nothing but the sword:

So the planes always resemble a model (not the skin, as the sword has no skin). Why?!
Posted By: Rackscha

Re: Huge planes appear when creating entities - 11/17/11 20:32

Just a thought, but have you tried creating a defaultcube?
Just for testing. If this is messed up, something is really wrong.
Posted By: lemming

Re: Huge planes appear when creating entities - 11/17/11 21:59

CUBE_MDL also gives me a white plane. So seems like it's not the model. I'll try some more testing tomorrow.
Posted By: JibbSmart

Re: Huge planes appear when creating entities - 11/17/11 23:06

Can you show us some code? It looks like you're making a copy of the model and scaling it to near-zero in the z-axis and something huge in the other axes.
Posted By: lemming

Re: Huge planes appear when creating entities - 11/19/11 20:48

It happens as soon as I equip the character. Animation seems to be not the problem, as it also happens when commenting it out.

Here is the code:
Click to reveal..
Code:
void pl_EquipChar(ENTITY* chara)
{
	// if (equip-slot is used) : remove old entity and set new one
	// {
	//		if (skill-pointer to armor-entity is set) { remove the old armor entity }
	//		skill-pointer.slot = new entity
	//	}
	//	else : not used, so remove old entity
	// {
	//		if (skill-pointer to armor-entity is set) { remove the old armor entity }
	//	}
	
	if (chara.hair > 0)
	{
		if (chara.phair != NULL) { ptr_remove((ENTITY*)chara.phair); chara.phair = NULL; }
		chara.phair = ent_create(GEAR_HAIR[chara.hair], nullvector, pl_armor);
	}
	else
	{
		if (chara.phair != NULL) { ptr_remove((ENTITY*)chara.phair); chara.phair = NULL; }
	}
	
	if (chara.head > 0)
	{
		
	}
	
	if (chara.chest > 0)
	{
		if (chara.pchest != NULL) { ptr_remove((ENTITY*)chara.pchest); chara.pchest = NULL; }
		chara.pchest = ent_create(GEAR_CHEST[chara.chest], nullvector, pl_armor);
	}
	else
	{
		if (chara.pchest != NULL) { ptr_remove((ENTITY*)chara.pchest); chara.pchest = NULL; }
	}
	
	if (chara.legs > 0)
	{
		if (chara.plegs != NULL) { ptr_remove((ENTITY*)chara.plegs); chara.plegs = NULL; }
		chara.plegs = ent_create(GEAR_LEGS[chara.legs], nullvector, pl_armor);
	}
	else
	{
		if (chara.plegs != NULL) { ptr_remove((ENTITY*)chara.plegs); chara.plegs = NULL; }
	}
	
	if (chara.feet > 0)
	{
		if (chara.pfeet != NULL) { ptr_remove((ENTITY*)chara.pfeet); chara.pfeet = NULL; }
		chara.pfeet = ent_create(GEAR_FEET[chara.feet], nullvector, pl_armor);
	}
	else
	{
		if (chara.pfeet != NULL) { ptr_remove((ENTITY*)chara.pfeet); chara.pfeet = NULL; }
	}
	
	if (chara.shoulders > 0)
	{
		
	}
	
	if (chara.hands > 0)
	{
		
	}
	
	if (chara.cape > 0)
	{
		
	}
	
	if (chara.weaponhand > 0)
	{
		if (chara.pweaponhand != NULL) { ptr_remove((ENTITY*)chara.pweaponhand); chara.pweaponhand = NULL; }
		chara.pweaponhand = ent_create(GEAR_WEAPONHAND[chara.weaponhand], nullvector, pl_armor);
	}
	else
	{
		if (chara.pweaponhand != NULL) { ptr_remove((ENTITY*)chara.pweaponhand); chara.pweaponhand = NULL; }
	}
	
	if (chara.offhand > 0)
	{
		
	}
	
	if (chara.secweapon > 0)
	{
		
	}
	
	// Adapt Settings of transparency
	var i;
	for (i=70; i<=82; i++)
	{
		if ((ENTITY*)chara.skill[i] != NULL)
		{
			if is(chara, TRANSLUCENT)
			{
				set(((ENTITY*)chara.skill[i]), TRANSLUCENT);
			}
			else
			{
				reset(((ENTITY*)chara.skill[i]), TRANSLUCENT);
			}
			((ENTITY*)chara.skill[i]).alpha = chara.alpha;
			if is(chara, INVISIBLE)
			{
				set(((ENTITY*)chara.skill[i]), INVISIBLE);
			}
			else
			{
				reset(((ENTITY*)chara.skill[i]), INVISIBLE);
			}
		}
	}
}



Definitions:
Click to reveal..
Code:
// Aussehen
#define hair			skill21
#define head			skill22
#define chest			skill23
#define legs			skill24
#define feet			skill25
#define shoulders		skill26
#define hands			skill27
#define cape			skill28
#define weaponhand	skill29
#define offhand		skill30
#define secweapon		skill31
#define skinset		skill32
#define haircolour	skill33


// Zeiger
#define phair			skill71
#define phead			skill72
#define pchest			skill73
#define plegs			skill74
#define pfeet			skill75
#define pshoulders	skill76
#define phands			skill77
#define pcape			skill78
#define pweaponhand	skill79
#define poffhand		skill80
#define psecweapon	skill81


© 2024 lite-C Forums