Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: complicated question about transparency... (FALLOUT related)  (Read 3434 times)

0 Members and 1 Guest are viewing this topic.

fabiobasile

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
    • View Profile
    • my brand new website!!
complicated question about transparency... (FALLOUT related)
« on: April 26, 2006, 08:54:14 PM »

I'm back!!!

I have survived a colossal system crash but now i am operational again and back to my "Fallout wannabe" project! :)

Anyway... i have this question related to transparency and actually if anyone of you ever played Fallout 1 or 2 that would help even better to understand my issue.

You know how the Vault Dweller, when he walks behind walls and objects makes a "hole" around him so that you can still see him and every other sprite (excluding the background/floor) becomes transparent within that "transparency circle" around him?

That's what i wanna do...

Well i hope it's clear enough, unfortunately my ftp server is down at the moment and i can't apload any screenshots right now :(
Logged
What would i do with a million dollar? I'd give it to what's left of Black Isle/Interplay and tell them to finish the damn game!!!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: complicated question about transparency... (FALLOUT related)
« Reply #1 on: April 26, 2006, 09:32:14 PM »

Unfortunately I don't think this effect can be achieved by the available means. Or at least I can't think of any way.
But you could make an entire wall semi-transparent, by setting its AlphaColor property. That's something like Fallout Tactics did, if I remember correctly.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

fabiobasile

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
    • View Profile
    • my brand new website!!
Re: complicated question about transparency... (FALLOUT related)
« Reply #2 on: April 26, 2006, 11:19:06 PM »

how could i accomplish that? is there a way to dinamically control the level of transparency of a sprite in relation to how far from the sprite's pivot the actor is?
If that is possible i could theoretically break a wall in multiple sprites, each disappearing gradually as the actor approaches the pivot of each...
Logged
What would i do with a million dollar? I'd give it to what's left of Black Isle/Interplay and tell them to finish the damn game!!!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: complicated question about transparency... (FALLOUT related)
« Reply #3 on: April 27, 2006, 07:59:26 AM »

Since you're using the overhead view, perhaps it would be enough to simply compare the Y coordinate of the actor and the wall. And if they are close enough, you'd change the alpha of the wall.

Something like (untested):

Code: [Select]
// get the wall entity
var SomeWall = Scene.GetNode("some_wall_name");

// if the absolute distance is less then 50, set the alpha value to 128 (half-transparent)
if(Math.Abs(actor.Y - SomeWall.Y) < 50) SomeWall.AlphaColor = MakeRGBA(255, 255, 255, 128);
// otherwise make the wall non-transparent
else SomeWall.AlphaColor = MakeRGBA(255, 255, 255, 255);

This is the basic concept. In reality, you'd probably make a script running in a loop, and the script would check all walls and set their transparency.
Once again, totally untested, just to give you some idea:

Code: [Select]
var MainLayer = Scene.MainLayer;

// endless loop
while(true)
{
  // process all entities in the main scene layer
  for(int i=0; i<MainLayer.NumNodes; i=i+1)
  {
     var Node = MainLayer.GetNode(i);
     if(Node.Type=="entity") DoWallTransparency(Node);
  }
 
  // go to sleep for some time
  Sleep(100);
}

// this is the code described above, moved into a function
function DoWallTransparency(Wall)
{
  if(Math.Abs(actor.Y - Wall.Y) < 50) Wall.AlphaColor = MakeRGBA(255, 255, 255, 128);
  else Wall.AlphaColor = MakeRGBA(255, 255, 255, 255);
}
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

fabiobasile

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
    • View Profile
    • my brand new website!!
Re: complicated question about transparency... (FALLOUT related)
« Reply #4 on: April 27, 2006, 08:54:08 AM »

hey thanks!

Yes i think that's pretty close to what i had in mind... i hope one day WME will implement a way to have a transparency mask that you can attach to an actor or NPC and have foreground sprites affected by it. I think it would be a great effect and it would allow the player to enjoy the graphics of the environment a lot more compared to having huge chunks of sprites disappearing...
Logged
What would i do with a million dollar? I'd give it to what's left of Black Isle/Interplay and tell them to finish the damn game!!!
 

Page created in 0.09 seconds with 24 queries.