Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Help with effect using an Alpha Map

Author
Message
TinTin
20
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 6th Apr 2010 21:45
Hi Guys
I have an effect I'm working on, got it 70% complete but I'm having difficulty finishing it.

I have a series of plains spaced out one behind the other that travel towards the camera, the fade from 100% transparent to 90% transparent at the furthest view distance, then travel towards the camera at 90% until a set distance before the fade back to 100% again. So far this is working, and I'm can texture these with an image. I'd like this image to be an alpha map as I intend to interpolate between several different images as the object moves and to use the set diffuse colour to cycle the apparent colour.

Think of six images containing an fuzzy circle offset from center each 60 degree from previous, animating these would give the appearence that there was a circling fuzzy circle. now add depth to that with each layer having a following image to its predecessor, I now have a spiral effect. (this is where I've got so far)
I now want to be able to cycle the colour as it travels (<-Meltdown) any ideas would be most welcome.

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 7th Apr 2010 09:57
One thing that is always handy to remember, is that you can rotate the plain on it's pointed axis - not sure exactly which axis to use though, X or Z. For instance, if you make a plain and orientate it to the camera, it sets the rotation of the plain object. What I do, is rotate limb 0 on the Z axis (I think) and that 'spins' the plain. I tend to spin plain objects randomly when they are for particle effects, but obviously you could take full control over things. I would suggest using 6 different coloured textures, with the same image - then you don't need to worry about changing colours because just using a random texture each time would give a really colourful effect. I'm imagining these particles spinning on the Z axis while scaling and fading, to give a nice spiral effect.

I've done this sort of thing loads though, so I know it works, let me know if you want more specifics. I think the last time it was to give an electric effect, like I made a lightning image with lines coming from the centre - then spin that randomly every loop and you get an electric sparks effect with just 1 texture.


Health, Ammo, and bacon and eggs!
TinTin
20
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 7th Apr 2010 20:34
Hi Van
Yeah, thats what I've already achieved...

A little more info is needed I think....
If we limit this to one plain for the moment, while I'm rotating the plain, I animate it's texture. These textures are an elaborate cycling loop that give the impression of movement, kind of like an animated fire or smoke.

The textures have alpha values that fade toward the end and edges, infact at the most opaque there only about 10%. They are basicaly white with the pattern drawn in the alpha channel. (wonder if I should use black!) Anyway I was thinking of using the diffuse colour to change the effect colour, but so far this hasn't worked.

I've posted a minimal demo below and a smoke.dds texture for what I have so far. Alpha stuff took ages to figure out, had it working a different way before but these are the only Alpha settings I could get working this time.



Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 10th Apr 2010 02:12
Quote: "I now want to be able to cycle the colour as it travels"

How about using multiple textures in a range of colours?

TinTin
20
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 10th Apr 2010 20:53
That's what Van suggested, but I know that this wouldn't create the effect I'm trying to create. what my example is, is a very basic implimentation to test the effect. This will eventualy be getting illuminated by multiple comet like effects.

e.g.
If I had a blue and a red light on either side of a white plain the plain would fade from blue to red automaticaly. Now introduce a circling green light and a whole new set of colours appear. generating an immage per frame of animation in each of these coulours would take thousands of pictures, so this is deffinately not an option.

The dds texture supplied above is totaly white, the cloud effect is created in the alpha layer.

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
TinTin
20
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 10th Apr 2010 21:39
Just changed my signature image and avitar can't get the sig working..


Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
TinTin
20
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 10th Apr 2010 21:40
Ah, now it works woohooo


Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.

Login to post a reply

Server time is: 2026-07-26 15:31:44
Your offset time is: 2026-07-26 15:31:44