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.

ForumsJedi Knight and Mysteries of the Sith Editing Forum → Sun Flare Effect
Sun Flare Effect
2006-05-27, 7:10 PM #1
I discovered a way to create a good skydome texture
with photoshop. Here is my result.

[http://i6.photobucket.com/albums/y215/millerpj/himalayascapesDome.jpg]
Texture

[http://i6.photobucket.com/albums/y215/millerpj/hscscreenie.jpg]
Screen shot with texture implemented

I have two questions:

1- Why is there a limit to 256x256 sized textures
(this texture would look a lot better if it were
higher resolution)? Is it possible we could come up
with a patch to counter this limit?

2- I want to make a sun flare effect (when you look
at the sun the screen will brightened and you'll be blinded
temporarilly). Does anyone know of a cog that can
accomplish this that is already written. I think I saw
something about this a while back but I could just be
imagining things.

If there isn't an existing cog for this I'll see if someone
in the cog forum can whip something up and then we
could post it on the hub in the resources.
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-05-27, 10:53 PM #2
Check with SM Sith Lord on the Sun flare effect. I've seen it done via cog before, so I know it's possible. If it wasn't SM Sith Lord, then it was who ever was working on the Attack on Theed level(s)/mod.
"The solution is simple."
2006-05-28, 1:34 AM #3
Sun flares are silly. Why would all avatars in games wear glasses?

Your skydome looks nice. You should make it 512x512, then slice it in four parts before applying to the dome.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2006-05-28, 10:21 AM #4
I already made the texture 512x512.
Why are sun flares silly? I thought it
would be a nice effect. I've never
seen it done in though so who knows.

Someone told me that making a
skydome texture with a horizon was
only practical using terragen. I
maybe wanted to make a turorial
about how to make a skydome since
I think it can add a lot to a level and
it is a relatively new thing for JK
editing. I think some of our noobs
could use a tutorial on it. I had a
hard time figuring out how to do it
and devoloped a few good
techniques. Is it worth making a
tutorial for it?
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-05-28, 10:32 AM #5
Yeah, I think such a tutorial would be great. Basic JK skydomes. Sounds good.

I think you meant lens flares when talking about sun flares, right? They are actually an unwanted result of the camera lenses used in film business. I don't see why anyone should imitate unwanted by-porducts. Look at the sun. Do you see any lens flares? If yes, take your glasses off. Now? If you still see them, leave the building/transport vehicle and make sure there is no glass between you and the sky. See any lens flares now?
Computer games should imitate reality (if at all), not movies. Lens flares create the illusion of a glass between the player and the rendered scene. This pulls the player out of the virtual reality a bit, detaching him from the events happening behind the screen.

I hate lens flares.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2006-05-28, 2:54 PM #6
I think he was actually referring to the effect of everything being washed out by the light of the sun as you look more directly too it. It's more equivilant to what current graphics engines call the "bloom" effect except that, since the sun is a light source and not a reflective surface, the effect is more exagerated then a "bloom" effect.

In JK terms, you'd have a cog that controled the brightness of the screen such that the screen got brighter the more directly you looked at the sun. I know that such a cog does exist, I just can't remember who came up with it. The only thing I'm not sure of is whether or not it checks for "line-of-sight" to make sure something it's blocking out the sun (such as a tarp or other architectual type ceiling such as in a hanger bay).

For a while, in SWG, they didn't check for LOS so the screen would get brighter if you looked toward were the sun would be if it weren't for the fact that you were inside.
"The solution is simple."
2006-05-28, 2:57 PM #7
I just meant I wanted the sun to do
an effect like force blinding when you
look at it. I didn't mean lens flares.
I just added a sun to my texture with
the lens flare filter on photoshop but
It just looks like the sun the way I did
it, no extra reflection dots. If someone
doesn't have a cog that does this then
I was thinking of using part of the code
in the force blinding cog to make it.

[http://i6.photobucket.com/albums/y215/millerpj/6022442f.jpg]
texture with implemented sun

You are right about lens flares being
dumb. I don't think you would want
to add them in something intentionally
unless it was some impressionistic
work of art. It can add to some things
but over all I think you're right and lens
flares shouldn't be regularly imitated.

Funny you say "look at the sun" I
know it isn't the smartest thing to do
but I took a good look at the sun to
help me decide how to do this project.
I didn't even have glasses on :).
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-05-28, 3:36 PM #8
Be very careful about looking at the sun. I knew to guys in college that thought it'd be "cool" to stare at the sun one morning after a party. Their retanans were literral burned to a crisp (imagine what an overloaded copper wire would look like). They'll be blind for the rest of their lives (unless eye implent technology allows them to see again some time in the future).

Just a word of warning. :)
"The solution is simple."
2006-05-28, 4:21 PM #9
I'm not that dumb. I just wanted to look
at it for a second just to kinda see what
it looked like. I already have terrible
eyes and I really shouldn't abuse them.
My bad. Probably won't do that ever
again. Stupid to ruin your eyes when
you aren't even a third done with your
life.
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-05-28, 5:10 PM #10
We need tutorials on this kind of stuff. I'm sure a lot of people would be interested in knowing how you did this. I've always felt that sky domes were superior to sky boxes.

As for your level, I think if you just mapped a photorealistic texture over your terrain that blended in with your skydome texture, it'd look fine.
"The solution is simple."
2006-05-28, 5:55 PM #11
On the terrain, I was going to do an
experiment with LODs. I want to
make 2 base textures for it with two
textures in between that just work
as a transition. One will be a detailed
close up texture and the other will be
a terrain texture that matches my
skydome. I will scale them apropriatly
and put the 4 textures on 4 seprate
but architecturally identical 3do's.
This way it will work just like mip maps
except I will be able to scale the textures
in between.

I'm sure all that seems confusing. The
reason I would go to all that trouble is
because this will enable me to counter
the texture size limit and place a
texture that will be very high quality at
any distance.

I really want to know what causes the
texture size limit. That's one of the
biggest limits we have in jk editing.
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-05-28, 9:24 PM #12
It's hard coded. You can have larger textures, but it will just tile the first 256x256 pixils.
"The solution is simple."
2006-05-28, 11:27 PM #13
Ah, such sun flares as you detailed would be great indeed. You might have to insert a ghost thing at the average position of the sun to check for LOS.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2006-05-30, 8:32 AM #14
That's about what I'm looking for.
I really have very little understanding
of cog though. I'll maybe look into it
but something like this is most likely
to be way over my head. I did manage
to write a cog that kills you if you fall
off the wall but it was like three lines
long. I'll try and put something together
and then post it on the cog forum. It
might take me a while though. School's
out on friday and then I'll have time to
waste on this type of thing.
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-05-30, 8:54 AM #15
Look at the various fog cogs for the color effects. And you might need a pulse, so learning about it (using datamaster, e.g.) shouldn't hurt.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2006-05-30, 11:48 AM #16
I am almost positive such a cog (sun flares as you call them) already exists in the Massassi COG library.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2006-05-30, 3:28 PM #17
I found the cog and it worked
pretty much the way I wanted
except it still blinds you even
if 3do's block your view of the
sun ghost. I'll post in the cog
forum to see if this can be fixed.
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-05-31, 12:08 AM #18
I had an idea ages ago for a sun flare

Have a cog run a pulse

Using verbs i cannot fathom, you determine whether the player is looking in the direction of where the sun is in the skybox.

And then you fire something from the player to the sun, and if its clear, add tint to the screen, so you're semi blind.

If the projectile hits something, then it means a tree (for example) is block the sun...
bla bla bla


bla bla bla

I dont know what i'm talking about.


Btw, why am I banned from jkhub? i know Zeq dislikes me, but this is a tad harsh

:( /emo
Code:
if(getThingFlags(source) & 0x8){
  do her}
elseif(getThingFlags(source) & 0x4){
  do other babe}
else{
  do a dude}
2006-05-31, 3:44 PM #19
you're banned from the hub? :confused:

What about Stargate? We'll
see if we can get this to work
but I don't know if it will. It
shouldn't really be too
complicated since that's the
general idea used in the
existing cog I found. It just
doesn't have the part about
hitting objects implemented.
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-06-03, 10:49 PM #20
I'm still working on this sky.
Since I made the texture
512x512 split into 4 peices
My textures have been off
on the skydome. I was
wondering if this is a common
problem. I don't have any
clue why they wouldn't show
up correctly in game but they
don't.

Textures Aligned perfectly in Jed
[http://i6.photobucket.com/albums/y215/millerpj/jedsky.jpg]

Textures have a big gap in JK
[http://i6.photobucket.com/albums/y215/millerpj/JKsky.jpg]
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-06-04, 10:13 AM #21
Yep, common problem.

Read how to solve the problem.

:)
2006-06-04, 10:46 AM #22
Originally posted by ZeqMacaw:
Yep, common problem.

Read how to solve the problem.

:)


Ouch. That's terribly annoying. I guess I
can't complain though since this ought to
solve my problem. I'll give it a shot. I
don't like the 16 texture thing though. I
might give it a shot at nine textures or
just stay with 4. Why can't we get a
patch for the texture limit. What purpose
would limiting texture size even serve?
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-06-04, 11:19 AM #23
We don't have a patch for the texture limit because no one has taken the time to figure out why JK has the limit and how to correct it. Mucking around in assembly is no easy task. Even if someone figured out why JK has the limit (I suspect it is due to JK's use of DirectDraw/3D or memory allocation), there might not be an easy way to patch JK to increase the limit.

:)
2006-06-04, 3:25 PM #24
[QUOTE=jedi I]What purpose
would limiting texture size even serve?[/QUOTE]

Video cards can get pretty touchy about texture sizes. At the time JK was made, there probably wasn't a card on the market that could handle anything above 256 x 256.
2006-06-04, 4:24 PM #25
I got it to work. Thanks for the tip
Zeq! It looks good now. I just
need to get this sun flare cog to
work correctly and it will be great.

I guess game developers aren't
looking out for editors like us
when they create game engines.
Oh well maybe some day sige will
crack this one too but untill then
we just have to use little hacks
like this. At least it works now.
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-06-04, 7:13 PM #26
I am working on this cog but it
is impossible to test it because
my things keep moving around.
I have my skydome positioned
perfectly in zed but then it
shows up in a different positon
in game. Does anyone know
what causes this problem? I'm
using 3do's for everything
except for the floor.
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
2006-06-07, 7:40 PM #27
just out of curiosity, why are you so
fond of the enter key? Do all your
lines have to end so abruptly?
If you choose not to decide, you still have made a choice.

Lassev: I guess there was something captivating in savagery, because I liked it.
2006-06-08, 12:02 AM #28
Read his signature, dude.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)

↑ Up to the top!