News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Mapping

Reply
 
Thread Tools Display Modes
Old 2nd Jun 2008, 06:47 AM   #1
Mircea
Registered User
 
Mircea's Avatar
 
Join Date: Feb. 25th, 2008
Posts: 87
Sun as a corona

Testing random things around the map I'm currently working on, I managed to find a really beautiful effect I am really determined to add. Like in every outdoor map, I made a skybox and the substract my map is in a fake backdrop. In the skybox I can add the sun as a texture, but then I don't have the advantage of the sun covering things in my view any more and being so big like a real sun. I discovered that by making the sun a lightning corona, I can obtain a beautiful realistic sun effect. Attached a screenshot to display exactly how the sun covers some hills... a very beautiful view to be able to simulate.

However, I have a big problem with this; The only way I can do it is of course by adding the light with the corona somewhere in the corner of my map (not skybox as through skyboxes a light's corona doesn't render). When the player gets too close, it's easy to see when the image scrolls that the sun is just a fake light put somewhere in the nearby corner, and that ruins everything.

I thought about making the substract bigger while limiting access to the same area in then map, but ut2k4 has a problem in which geometry and everything else stops being rendered after a certain distance, hiding my light after 50000 meters / units or something like that. To test this just make a giant (but giant) cube in an empty map and substract it... what's too far from the camera displays cut away.

So what I need is an idea about how I could still have a sun made of a corona that covers what's around it like in the attached screenshot. The methods that would help me accomplish this are:

- A way to have the light itsself move together with each player's position in the rhythm of the skybox but without ever disappearing outside of my substract. This is probalby not possible unless you can map an item to the position of the camera in a way.

- A way for the corona to display like that through the skybox... most likely impossible.

- A way to fix the issue with not rendering anything after a certain distance in the 3D space (most preferred but I want it to be a map setting not UT one so it displays correctly for anyone I send it to).

- Alternatively to the above, a way for the light's corona to display over *everything* (outside of the substract from mid space and through this cut away distance too)

This is probably a difficult idea but I'd very much appreciate any way I can make it display in. It's a very nice effect and it's a shame for nothing to be doable for it when there are a bunch of ways. Don't forget however that the sun needs to stop displaying once the light (center of the corona) is covered by something else in the player's view (terrain, another mesh, anything), so the sun doesn't display through objects. So yeah, any idea is welcome.
Attached Thumbnails
Click image for larger version

Name:	SunCorona.PNG
Views:	25
Size:	565.6 KB
ID:	95715  

Last edited by Mircea; 2nd Jun 2008 at 07:19 AM.
Mircea is offline   Reply With Quote
Old 2nd Jun 2008, 07:52 AM   #2
Hourences
 
Hourences's Avatar
 
Join Date: Aug. 29th, 2000
Location: Belgium/Holland/Sweden
Posts: 5,050
Just like the fog volume problem, youre hitting the limits of the engine with this issue too. UE3 doesnt has these issues anymore. You cant fix this in UE2 without programming, and likely access to the source code, especially to fix things like the maximum draw distance, which is set at 65536 btw, the old UE1 limit.

You can make a regular sprite in the skybox, that is camera facing, but then it wont nicely clip over things like a corona does, so thats not the best solution.
__________________
Hourences is offline   Reply With Quote
Old 2nd Jun 2008, 09:34 AM   #3
Mircea
Registered User
 
Mircea's Avatar
 
Join Date: Feb. 25th, 2008
Posts: 87
Yeah I know the engine doesn't normally accept some things... I was just wondering about a way to improvise as it's really close to looking good. Thought maybe a setting for the light or something could bypass the draw distance or anything like that... I just need the corona itsself to display infinitely.

[EDIT] Another trick would be making a sprite or simple static mesh render through objects and do that through the skybox. And only disappear when an object covers its center spot. But I'm guessing that's probably hard too...

[EDIT 2] I did the above and it half-solved the problem. I put on a static mesh, went to the Display area and set DrawType to DT_Sprite then assigned the flare texture under the Texture section. It's now an always facing sprite that renders through the skybox too, but it doesn't cover objects behind it. If anyone knows any trick now to make it be always on top in my field of view unless its center is covered, it would be all I need. In an extreme case, I guess I can even modify the light's code / script to do this but only if nothing else is possible.

Last edited by Mircea; 2nd Jun 2008 at 10:35 AM.
Mircea is offline   Reply With Quote
Old 2nd Jun 2008, 01:06 PM   #4
xMurphyx
Registered User
 
xMurphyx's Avatar
 
Join Date: Jun. 2nd, 2008
Posts: 1,503
Just a wild idea:
Maybe you can create a weathereffect that spawns sprites that look like a corona and make it spawn them really far away from the player so that mountains and the like can get between it an the player.
It's not perfect. For example if you are looking over a huge open plane towards a mountain that is farther away than the spawning sprites it appears before it, which a real sun wouldn't of course, but it's better than nothing.
xMurphyx is offline   Reply With Quote
Old 2nd Jun 2008, 02:36 PM   #5
Mircea
Registered User
 
Mircea's Avatar
 
Join Date: Feb. 25th, 2008
Posts: 87
It wouldn't really work... mainly because I don't think that even weather effects which are spawned at a distance from the player would display through the BSP itsself. Also weather effects are many particles, and first of all weather particles hide like sprites behing stuff, not when the center is reached like a corona.
Mircea is offline   Reply With Quote
Old 7th Jun 2008, 10:50 AM   #6
Mircea
Registered User
 
Mircea's Avatar
 
Join Date: Feb. 25th, 2008
Posts: 87
Ok, I managed to fix this in the end. If anyone else is interested in making such a sun effect on their map, this is what I did; I basically used my first idea, putting the sun corona in the corner of my substract in which the map itsself lyes. However, the problem was that when getting to close it became visible the corona is just floating there above your head. To prevent this, I used the softflare texture from the epic-particles package, and set the corona size so that when you're close it covers the entire screen. Since the softflare texture is half-transparent and the center doesn't differ from the radius, when you're close you just see a brightness increase on your screen when the light is in your FOV but don't see where it's coming from. That fully fixed my issue and I managed to add the sun corona to my map
Mircea is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:04 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer