Aller au contenu

Photo

Flickering Moonrays to Sunrays - Solved!


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

#1
Fester Pot

Fester Pot
  • Members
  • 1 395 messages
I'm trying to get the following replacement .mdl file - this works - to another colour, particularly one of yellow or orange.

Being at the very bottom of the ladder when it comes to creating custom content, I'm having difficulty getting the light shaft to be a different colour.

This is the .mdl in question [ tnp_gsol1c.mdl ]

# Exported from NWmax 0.8 b47 at 03/02/2006 3:23:35 PM
# mdl file
#
#NWmax MODEL ASCII
# model: tnp_gsol1c
filedependancy Unknown
newmodel tnp_gsol1c
setsupermodel tnp_gsol1c NULL
classification Character
setanimationscale 1
#NWmax GEOM  ASCII
beginmodelgeom tnp_gsol1c
node dummy tnp_gsol1c
  parent NULL
endnode
node emitter AuroraEmitter00
  parent tnp_gsol1c
  position 0 5 13
  orientation 0 0 0 -90
  update_sel 2
  update Fountain
  render_sel 3
  render Billboard_to_Local_Z
  blend_sel 3
  Blend Lighten
  spawnType 0
  xSize 200
  ySize 200
  opacity 0.9
  colorStart 0.7 0.8 1
  alphaEnd 0.9
  sizeStart 1.0
  sizeEnd 1.0
  sizeStart_y 30.0
  sizeEnd_y 30.0
  birthrate 1
  lifeExp 5
  particleRot 0.005
  blurlength 10
  affectedByWind false
  texture plc_lightshaft3
  twosidedtex 1
  xgrid 1
  ygrid 1
  fps 0
  frameStart 10.0
  frameEnd 10.0
  random 0
  lightningDelay 0
  lightningRadius 0
  lightningSubDiv 0
  lightningScale 0
  blastRadius 0
  blastLength 0
endnode
node emitter AuroraEmitter01
  parent tnp_gsol1c
  position 0.5 4 13
  orientation 0 0 0 -90
  update_sel 2
  update Fountain
  render_sel 3
  render Billboard_to_Local_Z
  blend_sel 3
  Blend Lighten
  spawnType 0
  xSize 150
  ySize 150
  opacity 0.9
  colorStart 0.7 0.8 1
  alphaEnd 0.9
  sizeStart 1.0
  sizeEnd 1.0
  sizeStart_y 30.0
  sizeEnd_y 30.0
  birthrate 1
  lifeExp 5
  particleRot 0.005
  blurlength 10
  affectedByWind false
  texture plc_lightshaft3
  twosidedtex 1
  xgrid 1
  ygrid 1
  fps 0
  frameStart 10.0
  frameEnd 10.0
  random 0
  lightningDelay 0
  lightningRadius 0
  lightningSubDiv 0
  lightningScale 0
  blastRadius 0
  blastLength 0
endnode
node emitter AuroraEmitter02
  parent tnp_gsol1c
  position -0.5 6 13
  orientation 0 0 0 -90
  update_sel 2
  update Fountain
  render_sel 3
  render Billboard_to_Local_Z
  blend_sel 3
  Blend Lighten
  spawnType 0
  xSize 150
  ySize 150
  opacity 0.9
  colorStart 0.7 0.8 1
  alphaEnd 0.9
  sizeStart 1.0
  sizeEnd 1.0
  sizeStart_y 30.0
  sizeEnd_y 30.0
  birthrate 1
  lifeExp 5
  particleRot 0.005
  blurlength 10
  affectedByWind false
  texture plc_lightshaft3
  twosidedtex 1
  xgrid 1
  ygrid 1
  fps 0
  frameStart 10.0
  frameEnd 10.0
  random 0
  lightningDelay 0
  lightningRadius 0
  lightningSubDiv 0
  lightningScale 0
  blastRadius 0
  blastLength 0
endnode
endmodelgeom tnp_gsol1c
donemodel tnp_gsol1c


It changes the default Bioware Lightshaft, Blue [ Placeables - Standard - Visual Effects - Lightshaft. Blue ] into moonrays. The original comes from NWNCQ and I use it as moonrays during the night in caves.

What I'd like to do is create another .mdl file but change the colour to sunrays!

The current .mdl above uses a Bioware texture to create the light colour.

texture plc_lightshaft3

I've tried changing this texture to plc_lightshaft2 or plc_lightshaft5 as an example, but when I test it, the light no longer flickers and fades, it's just all blocky. Nor does it use the new texture.

Would anyone be interested in making one of yellow/orange colour to simulate sunlight for me? I don't have any editing tools and usually make small cosmetic changes such as texture replacements like this - and they usually work - but not this time.

Two examples below.

Working placeable (posted as the working .mdl file)

Posted Image

My attempt to change the texture colour.

Posted Image

FP!

Modifié par Fester Pot, 03 janvier 2013 - 05:50 .


#2
Zwerkules

Zwerkules
  • Members
  • 1 324 messages
This looks like a missing texture which would appear white is coloured light blue.
It says in the model colorStart 0.7 0.8 1.
Those are the colour values for red, green and blue. If you wanted it to be yellow you'd need more red and green and less blue.
Light yellow is 255 255 224 in gmax. The 255 will be a 1.0 in the model file and the 224 will be 0.88.
Usually there's also a colorEnd there which I can't find in your model file. Maybe that means the colour doesn't change. With colorStart and colorEnd you can make it change between two colours, iirc.

The only texture I could find was plc_lightshaft. plc_lightshaft3 is probably a texture from NWNCQ. The three probably means that there are three shafts of light instead of just one like in the Bioware texture.

Modifié par Zwerkules, 02 janvier 2013 - 04:52 .


#3
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<making an offer...>

Send me the model and texture and I'll tweak it if you like.

You might want to stick with the default lightray texture and apply tint instead of a new texture, like Henesua (and you!) do with fog.

Also, you may want to animate the color change with moon/blue being the deactivated state and sun/yellow being the activated state with a nice long transition in between for dawn/dusk. That way you only need the one placeable and script only its state. And the color shift tells the player the outside world is still turning ;-)

Posted Image

<...easily refused>

#4
NWN_baba yaga

NWN_baba yaga
  • Members
  • 1 232 messages
i had the exact same problem FP and i think zwerkules is right about the missing texture. But the one Rolo has shown...created by _six? is veryyyyyyyyy nice too

#5
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<dragging his infernal friend...>

Yup, those are the lights in _Six's Q castle interior. I'm working on giving them all day2night/night2day anims. So you can tell something about the time of day without going outside ;-)

Some interesting findings...

<...into the mix>

#6
DM_Vecna

DM_Vecna
  • Members
  • 280 messages
 This is a useful and beautifil idea. Any chance you would post the work after completion. I have used the one in HP's Temple of Tempus I would love to see more of these in a package. SO USEFUL

#7
Fester Pot

Fester Pot
  • Members
  • 1 395 messages
Thanks!

Used the same texture as the posted .mdl and changed the ColorStart values.

I'll fiddle with it. I really like 666's sunlight. Think mine has too much yellow :D

Posted Image

# Exported from NWmax 0.8 b47 at 03/02/2006 3:23:35 PM
# mdl file
#
#NWmax MODEL ASCII
# model: tnp_gsol1d
filedependancy Unknown
newmodel tnp_gsol1d
setsupermodel tnp_gsol1d NULL
classification Character
setanimationscale 1
#NWmax GEOM ASCII
beginmodelgeom tnp_gsol1d
node dummy tnp_gsol1d
parent NULL
endnode
node emitter AuroraEmitter00
parent tnp_gsol1d
position 0 5 13
orientation 0 0 0 -90
update_sel 2
update Fountain
render_sel 3
render Billboard_to_Local_Z
blend_sel 3
Blend Lighten
spawnType 0
xSize 200
ySize 200
opacity 0.9
colorStart 1.254902 1.254902 0.254902
alphaEnd 0.9
sizeStart 1.0
sizeEnd 1.0
sizeStart_y 30.0
sizeEnd_y 30.0
birthrate 1
lifeExp 5
particleRot 0.005
blurlength 10
affectedByWind false
texture plc_lightshaft2
twosidedtex 1
xgrid 1
ygrid 1
fps 0
frameStart 10.0
frameEnd 10.0
random 0
lightningDelay 0
lightningRadius 0
lightningSubDiv 0
lightningScale 0
blastRadius 0
blastLength 0
endnode
node emitter AuroraEmitter01
parent tnp_gsol1d
position 0.5 4 13
orientation 0 0 0 -90
update_sel 2
update Fountain
render_sel 3
render Billboard_to_Local_Z
blend_sel 3
Blend Lighten
spawnType 0
xSize 150
ySize 150
opacity 0.9
colorStart 8.000000 8.000000 0.000000
alphaEnd 0.9
sizeStart 1.0
sizeEnd 1.0
sizeStart_y 30.0
sizeEnd_y 30.0
birthrate 1
lifeExp 5
particleRot 0.005
blurlength 10
affectedByWind false
texture plc_lightshaft2
twosidedtex 1
xgrid 1
ygrid 1
fps 0
frameStart 10.0
frameEnd 10.0
random 0
lightningDelay 0
lightningRadius 0
lightningSubDiv 0
lightningScale 0
blastRadius 0
blastLength 0
endnode
node emitter AuroraEmitter02
parent tnp_gsol1d
position -0.5 6 13
orientation 0 0 0 -90
update_sel 2
update Fountain
render_sel 3
render Billboard_to_Local_Z
blend_sel 3
Blend Lighten
spawnType 0
xSize 150
ySize 150
opacity 0.9
colorStart 1.254902 1.254902 0.254902
alphaEnd 0.9
sizeStart 1.0
sizeEnd 1.0
sizeStart_y 30.0
sizeEnd_y 30.0
birthrate 1
lifeExp 5
particleRot 0.005
blurlength 10
affectedByWind false
texture plc_lightshaft2
twosidedtex 1
xgrid 1
ygrid 1
fps 0
frameStart 10.0
frameEnd 10.0
random 0
lightningDelay 0
lightningRadius 0
lightningSubDiv 0
lightningScale 0
blastRadius 0
blastLength 0
endnode
endmodelgeom tnp_gsol1d
donemodel tnp_gsol1d


Also, you may want to animate the color change with moon/blue being the
deactivated state and sun/yellow being the activated state with a nice
long transition in between for dawn/dusk. That way you only need the one
placeable and script only its state. And the color shift tells the
player the outside world is still turning ;-)


Ah, I do this already. Moonrays appear at night and dusk, while sunrays appear during the day/dawn via a script - not activate/deactivate (too difficult for this average bear).

Using SetTileMainLightColor or SetTileSourceLightColor, a brighter yellow/orange color can be used when it's day/dawn that the sunrays illuminate, and shift it to a dark blue or dark cyan when the moonrays appear.

@DM_Vecna

I use the HP Temple window moonlight rays and also created one for the day as well, for windows.

At night, from the city streets, the orange glows through the windows.

From within, the moonlight glows through the windows.

As an example, I've placed both next to each other to show what it look like.

Posted Image

Shop window from outside, flickering out onto the street at night.

Posted Image

FP!

Modifié par Fester Pot, 03 janvier 2013 - 12:00 .


#8
Fester Pot

Fester Pot
  • Members
  • 1 395 messages
Here's the finished product. Thanks for all the suggestions, but the easiest route was making variation changes to ColorStart to get the color shift, and using a new texture. It's not as yellow as my first attempt and I got rid of the blocky missing texture!

So here's how the system works.

During the night, moonrays shine through cracks in the cave ceiling and illuminates the tile they're placed on, changing the color using SetTileMainLightColor to DARK_BLUE.

During dusk/dawn, both moonrays and sunrays can be seen together.

During the day, the moonrays vanish as the sunrays take full hold. The tile color is changed to a PALE_YELLOW and PALE_ORANGE.

I'm sure the moonrays and sunrays could emit light, but I don't have or know how to use GMAX. Also, if they did emit light, there could be that annoying light ball glow so many other placeables have. That's why I opted the script route to change the tile color the placeable is sitting on.

Moonrays in a cave.
Posted Image

Moonrays/sunrays in cave [Dusk/Dawn] * sun shines through exit crack in the wall *
Posted Image

Sunrays in cave.
Posted Image

FP!

#9
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<rubbing his hands together...>

I disagree about the light node added to the placeable, FP.
In fact, I really want to try it. Without the flare (that annoying light-ball), a dim lightnode would answer my search for a way to add radiosity to six's Q castle Interior.

And (when I get around to the placeable versions) I'm going to do the activate/deactivate anims. I just really like that long, subtle shift from yellow to blue by way of (of course) purple ;-)

You really sparked some inspiration, ol fella :-)

<...in de-light>