Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsShowcase → A Funny Thing Happened on the Way to the Forum
12345
A Funny Thing Happened on the Way to the Forum
2005-06-20, 12:34 AM #161
I guess it's a flat 3do.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2005-06-20, 11:24 AM #162
Quote:
Originally posted by zagibu
I guess it's a flat 3do.

Correct.

That cog would be great as well, btw, Zagibu - please give it a shot when you have time! :)
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2005-06-20, 11:32 AM #163
What made you want to put the lion heads in as 3dos.
Instead you could just copy the current wall texture, rename
it and put the lion head texture onto it. Then you could
cleave your walls wherever you want the lion head and
change it to the texture you just made. Just a suggestion.
I figure you probably have a good reason for wanting the
3do anyway.
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2005-06-20, 11:39 AM #164
Quote:
Originally posted by jedi I
What made you want to put the lion heads in as 3dos.
Instead you could just copy the current wall texture, rename
it and put the lion head texture onto it. Then you could
cleave your walls wherever you want the lion head and
change it to the texture you just made. Just a suggestion.
I figure you probably have a good reason for wanting the
3do anyway.

I tried that first, but was a real pain because the current texture I'm using isn't stitched onto that wall in a perfect 256x256 manner, so the proportions were a real pain to get right when adding the lion head on there. It also led to a lot of photo editing and messy cleaving, and meh, it wasn't worth the time. :/

Hopefully the 3DO idea will work out.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2005-06-20, 12:27 PM #165
The 3do method makes it 1000% easier for him to position the heads on the walls.

2005-06-21, 6:33 AM #166
Here's a quick cog I wrote. Haven't got any tools around to check it, will do when I'm back home.

Code:
# Jedi Knight cog script to counter the ugly z-fighting for things close to walls
# Created by zagibu@gmx.ch

flags=0x240

symbols

thing		player			local
thing		decor0=-1
thing		decor1=-1
thing		decor2=-1
thing		decor3=-1
thing		decor4=-1
thing		decor5=-1
thing		decor6=-1
thing		decor7=-1
thing		decor8=-1
thing		decor9=-1

vector		player_relative		local

float		min_angle=0.1		desc=Minimum dot product result between player and object that triggers offset of object
float		distance=0.05		desc=Offset from wall (in JKU's) that prevents Z-fighting
float		cur_dist0=0		local
float		cur_dist1=0		local
float		cur_dist2=0		local
float		cur_dist3=0		local
float		cur_dist4=0		local
float		cur_dist5=0		local
float		cur_dist6=0		local
float		cur_dist7=0		local
float		cur_dist8=0		local
float		cur_dist9=0		local
float		curr_angle		local

int		i			local

message		startup
message		pulse

end

code

startup:
	Sleep(1);
	player = GetLocalPlayerThing();
	SetPulse(0.5);
	Return;

pulse:
	// Check all decor objects
	for(i = 0; i < 10; i = i + 1)
	{
		object = decor0;
		// Handle only valid objects
		if(object != -1)
		{
			object_pos = GetThingPos(object);
			object_look = GetThingLVec(object);
			player_relative = VectorNorm(VectorSub(GetThingPos(player), object_pos));
			curr_angle = VectorDot(object_look, player_relative);
			// Check player's angle to current object (dot product)
			if(curr_angle > min_angle * 2)
			{
				// Player is in front of object
				if(cur_dist0 == 0)
				{
					SetThingPos(object, VectorAdd(object_pos, VectorScale(object_look, distance)));
					cur_dist0 = 1;
				}
			}
			else if(curr_angle < min_angle)
			{
				// Player is at side of object
				if(cur_dist0 == 1)
				{
					SetThingPos(object, VectorSub(object_pos, VectorScale(object_look, distance)));
					cur_dist0 = 0;
				}
			}
		}
	}
	Return;

end

No idea about the default values. Needs experimenting.

[edit]
Updated the script with a working version.
[/edit]
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2005-06-21, 9:47 PM #167
Are you using vertice lighting or dynamic lights to light this level?
BSR
2005-06-22, 10:40 AM #168
Quote:
Originally posted by BSR
Are you using vertice lighting or dynamic lights to light this level?

Dynamic.

Thanks for the script Zagibu, I'll try it out soon.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2005-06-26, 2:20 PM #169
Sorry for the late response again, been busy with life and all.

Anyway, I tried out the cog on my lion 3DO and tweaked the values a bit several times, but always had the same result. My lion still flickered by the time I got to the other side of the level, only this time it would either disappear close up or (at lower values) jump back and forth between two positions.

I thought the problem was because my lion 3do wasn't completely flat, so I made it a 4 surface 3do (2 surfaces on the front and 2 on back). However, now the 3do seems to have worse z-fighting and is no longer affected by lighting in-game.

How do I solve these two problems?
Attachment: 5659/zlion.jpg (43,145 bytes)
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2005-06-26, 2:58 PM #170
You know better, but is the model flagged as blocks light?
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2005-06-26, 3:12 PM #171
Quote:
Originally posted by jEDIkIRBY
You know better, but is the model flagged as blocks light?

I set all surfaces to that before exporting it, but I've heard that it resets itself. Could that be the problem?
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
12345

↑ Up to the top!