Aller au contenu

Photo

Better god rays


  • Veuillez vous connecter pour répondre
37 réponses à ce sujet

#1
kamal_

kamal_
  • Members
  • 5 240 messages
Volumetric crepuscular rays to use instead of the two dimensional light rays of the stock game. Basically the same size as the stock, plus an XL ray. Same color as the stock light rays.

Rays are referred to as godrays in the stock toolset for their vfx, so these are named godrays.
 
Installation: place the folder in your campaign/module folder. Blueprints are included so they will show up in the toolset.

Download:
Vault 2.0
Nexus

Also visible in the first two screenshots is the tintable tile block. Tileset is RWS Citadel.

new rays in XL on left, stock L rays on right
250x150http://static-3.nexusmods.com/15/mods/181/images/875-1-1393116196.jpg[/img]

new rays at bottom, old rays at top. Screenshot from the top.
250x150http://static-3.nexusmods.com/15/mods/181/images/875-2-1393116197.jpg[/img]

new rays at back, old rays in front
250x150http://static-3.nexusmods.com/15/mods/181/images/875-3-1393116197.jpg[/img]

new rays at top, old rays below. Screenshot from the top.
250x150http://static-1.nexusmods.com/15/mods/181/images/875-4-1393116198.jpg[/img]

Modifié par kamal_, 23 février 2014 - 12:54 .

  • bealzebub aime ceci

#2
rjshae

rjshae
  • Members
  • 4 485 messages
Oooo...

#3
kamal_

kamal_
  • Members
  • 5 240 messages
The lack of "volume" of the stock rays has annoyed me for a long time.

These new rays are not overriding, they are new vfx. Instead of the 2D billboard fx used by the standard light rays, these use the 3D beam fx type which creates an X shape of two billboard graphics to produce a 3D shape . The texture is a stock asset blurry dot texture used in some other fx, so it's not included as it's built in.

The new rays have their amplitude property set to 0.1, which gives them a slight oscillation which I felt was good for implying passing clouds. This is a property of the .bfx file, so you can change this to zero if you want no amplitude variation, or increase for more amplitude variation. Finally the fx are set to a 45 degree angle instead of the 30 or so of stock.

#4
kamal_

kamal_
  • Members
  • 5 240 messages
I had the .bfx upside down (so it went from broad at the top to a point at the bottom). So I fixed that and updated the download just now. It didn't seem very noticeable in the toolset, but I noticed.

#5
Dann-J

Dann-J
  • Members
  • 3 161 messages
I only tried to use the 'god rays' for the first time recently, and deleted them soon after when I discovered how two-dimensional they were. Your timing is impeccable.

And speaking of enhanced OC content (which we weren't)...
http://www.nexusmods...inter2/mods/876 

I also spent a frustrating hour or so trying to make the blue dragon tail armour show up in-game (c_bluedragon_body_cl_extraA02). It was included with MotB but never implemented (and now I know why!).

Modifié par DannJ, 24 février 2014 - 02:06 .


#6
kamal_nwn

kamal_nwn
  • Members
  • 1 messages

I guess until I figure out how to get into my account on these new version forums, I'm kamal_nwn.



#7
kamal_

kamal_
  • Members
  • 5 240 messages

ok, figured out my account. no more kamal_nwn.



#8
rjshae

rjshae
  • Members
  • 4 485 messages

Would there be any benefit to having vertical versions of these to complement the two cave light placed effects? Or would that just be redundant?



#9
Dann-J

Dann-J
  • Members
  • 3 161 messages

A couple of the 'small' godray effects (like the -x version) aren't small at all.

 

I'm also having trouble making these effects work in the game. They look fine in the toolset, but in the mine area I'm trying to use them in they appear as low crosses on the floor. I'm trying to use them near an exit that heads upward, so I wonder if the ramp in the walkmesh is messing with them.

 

Either that, or my graphics card might be having trouble with the exact 45 degree angles. Perhaps angles greater or less than 45 might work better?



#10
kamal_

kamal_
  • Members
  • 5 240 messages

rjshae: it would be redundant as the cave ray is designed to rotate around the z axis to face the camera, making it look good from all directions. You can't do that with non vertically symetrical fx.

 

dannj: Yes, I found I am getting that x effect to. Very strange as it looked great in toolset and there are other effect using the beam fx. I will have to investigate but it will be this weekend at earliest.



#11
Dann-J

Dann-J
  • Members
  • 3 161 messages

Now that you've introduced me to this new VFX type, I'll no doubt be experimenting myself. :)



#12
Dann-J

Dann-J
  • Members
  • 3 161 messages

I've got the sunbeams to work, but not as placed effects. Beam FX need a source and a target. As a placed effect the beam was using the same location for both, resulting in a zero-length beam.

 

This means that you only really need separate SEFs for the different sizes. The direction, angle and length of the beams are determined by how far apart you set the source and target objects (usually ipoints). I created a quick HB script for the source ipoint, that applies EffectBeam() to a target ipoint for 6.1 seconds every round. And voila - crepuscular beams made to order!

 

I've already got a light beam system for interior cave entrances that spawns and deletes lights with different colours, ranges and intensities depending on what time of day it is, as well as spawning one of the cave beam effects during the day. However now I can create dynamic crepuscular beams that change length and angle depending on the time of day, by destroying the target ipoint and recreating it in a slightly different position. The HB script can also determine what times of day the beam appears at all, thus turning it off during the night.

 

Now I just have to come up with an algorithm that determines the position of the target ipoint based on the hour value. A semi-circle would be more accurate, but I suspect moving the target back and forth in a straight line would be just as effective (and much easier to script). If I really strive for detail, I can set variables on the source ipoints that tell you what side of a building they are on, so west-facing windows only spawn beams in the afternoon and east-facing windows only spawn them in the morning.

 

Assuming that most modules will be based in the northern hemisphere of Abeir-Toril, south-facing windows could have beams all day long, with the target ipoint moving west to east during the entire day.



#13
Tchos

Tchos
  • Members
  • 5 042 messages

This sounds worthy of a video!



#14
Dann-J

Dann-J
  • Members
  • 3 161 messages

I've already figured out the algothim during my lunch break here at work. Now I've got a page full of scrawled notes that I'm eager to implement once I get home.



#15
rjshae

rjshae
  • Members
  • 4 485 messages

That would be useful for sites you need to visit frequently and at different times of the day.



#16
kamal_

kamal_
  • Members
  • 5 240 messages

Yes, that would be an even better thing.



#17
Dann-J

Dann-J
  • Members
  • 3 161 messages

My algorithm works a treat. For those playing at home, in does the following:

 

  • Determines the difference between the Z height of the source ipoint and the floor (currently the floor is assumed to be at zero, but I'll eventually allow a local variable on the ipoint to override that where necessary)
  • Multiplies that height distance by two to determine the maximum range the beam will move to either side in the X axis (fRange)
  • Calculates the new location of the target ipoint once an hour using the X coordinate of the source ipoint, plus ( ( (0.17 x iHour ) -2 ) x fRange ) )

At 6am the beam stretches to the west in a long, shallow angle. At noon the beam is facing straight down. At 6pm the beam stretches to the east in a long, shallow angle. It then tracks between these extremes at other times. I switch the beams off between 6pm and 6am.

 

For beams coming through windows, I specify which wall direction it's located at via a local variable on the ipoint (W, E, S, or N). For east-facing windows, the beam only appears between 6am and 11am. For west-facing windows, the beam only appears between 1pm and 6pm. South-facing windows have the beam all day (6am to 6pm), with the Y coordinate of the target ipoint moved northwards by half the range value. North-facing windows (if you insisted on creating them) have the Y coordinate of the target moved southwards.

 

If no wall direction is specified, the script assumes it's a hole in the ceiling and doesn't offset in the Y axis.

 

Now it's just a matter of optimising the HB script of the source ipoint so it aborts when no changes are necessary, and only creates and removes new beam effects when a change is required (rather than spawning temporary beams every six seconds).



#18
kamal_

kamal_
  • Members
  • 5 240 messages

Very nice. You will need to attach a light to the vfx, which can be done. Not sure if you can change the light dynamically though.



#19
Dann-J

Dann-J
  • Members
  • 3 161 messages

I've adopted my former light-switching script to include these new dynamic light beams. It creates and destroys lights from blueprints depending on the time of day. So far I've only got four light blueprints (dawn, day, dusk, night), but you could potentially have as many intermediate light blueprints as you wanted. The ipoint searches for the nearest light object within a certain radius, so it doesn't matter if the light object's tag goes AWOL.

 

An alternative to actual light objects for interiors that aren't completely dark would be to spawn a second projected texture VFX onto the floor (much like the existing cave beam does). By ensuring that the texture isn't just projected onto the ground, any model (including players) entering the effect would appear to light up. The projected texture on the ground would also move to match the end of the lightbeam.



#20
Dann-J

Dann-J
  • Members
  • 3 161 messages

Here 'tis:

 

http://www.nexusmods...inter2/mods/881


  • Morbane aime ceci

#21
Morbane

Morbane
  • Members
  • 1 883 messages

Thanks Dann!



#22
rjshae

rjshae
  • Members
  • 4 485 messages

Now all we need are a series of identical window overlay placeables with different illumination textures for different times of the day... :)



#23
Tchos

Tchos
  • Members
  • 5 042 messages

That could be easily enough accomplished for a single window.  I could provide the texture variations if someone else handles the window model part of it.



#24
rjshae

rjshae
  • Members
  • 4 485 messages

The window models could just be extracted out of the tile set models. There's only a handful, I think; the interior, castle, and estate windows. Probably just needs a little fiddling with the outer sides of the frames so they can be placed right next to a wall. I should be able to create a set pretty quick, I think.


  • Morbane aime ceci

#25
Dann-J

Dann-J
  • Members
  • 3 161 messages

I created a fake window out of one of the paintings. Luckily I was able to find one with a 3D frame AND a boring picture on it, so I simply retextured the existing painting rather than cloning a new model. Unfortunately it doesn't support glow maps.