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.

Code Snippets / Transparency effect and opacity mapping (with percentage)

Author
Message
kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 12th May 2003 00:14
I don't know if this is usefull to anyone, or if there are better ways already to do simple transparency effects, but this is easy and works quite fast. Try it out and use it if you want to. ;D

This is DBPro only.




Kevil
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th May 2003 02:15
Again, excellent work Kevil. Seems you're a pretty talented coder

This is VERY useful.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_101.zip
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th May 2003 02:24
Found a bug though. If you try and view a reflective surface through an object ghosted using this method, you can just see the backdrop. Not sure if this is DBP or your code though.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_101.zip
kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 12th May 2003 02:34
I think it is a DBPro bug, because I have seen it before with trees. Now where was that.
http://www.darkbasicpro.com/apollo/view.php?t=9953&b=1

Maybe it's the same problem?
Anyway, the only thing I did is change the image data, so that couldn't be the problem I guess.

Kevil

Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th May 2003 02:37
^^ and another, it can't handle images larger than 128x128, but by the looks of it, it should be easily fixable.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_101.zip
kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 12th May 2003 11:20
Hmmm, I think it has to do with the opacity mapping function, right? Because the opacity image needs to have the same size as the other image. I'll fix it, give me a minute .

Kevil

kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 12th May 2003 11:50
Ok, it's fixed this way. And now I hope that the memblocks used will not come in the way with the memblock you use yourself. And I also deleted the memblocks now after usage.



Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 12th May 2003 13:34
This is ecellent work, nice 1 man

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
samjones@kangaroo2.com - http://www.kangaroo2.com - If the apocalypse comes, email me
n3t3r453r
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Russia
Posted: 12th May 2003 14:27
I'm shocked! He is coping my ideas! I've made probably the same code for creating mesh matrix few months before! Then I've made such transparency effect and then I've made real time shadows. I'm sure that his next program will be something like "shadow generator"

I'd like to change the world, but God doesn't want to give me sources!
kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 12th May 2003 14:31
:-s .
LOL, I promise I will not make a shadow generator.
I've never seen your code before. Maybe because I'm new to DBPro.

Kevil

Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th May 2003 14:40
@neteraser

Kevil is doing this as a learning curve, calm down. I don't really care who does the work, both of you have produced some pretty useful stuff.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_101.zip
n3t3r453r
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Russia
Posted: 12th May 2003 14:58 Edited at: 12th May 2003 15:01
> I've never seen your code before
I know no1 (except DMiTR0S) have seen my code. But I didn't said that you've copied it. I was simply shocked, because you have exacly the same ideas as I and DMiTR0S.

> I'm new to DBPro
You are very talented programmist in that case!

BTW, MeshMatrix(R) and (C) NetEraser(R) (net-eraser@mail.ru(R))

I'd like to change the world, but God doesn't want to give me sources!
kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 12th May 2003 15:09
Thanx .
Rob is right. I'm doing this to learn memblocks and I think I understand them well now. They can be so useful.

BTW do you have a demo with that shadow generator? Sounds interesting .

Quote: "
MeshMatrix(R) and (C) NetEraser(R) (net-eraser@mail.ru(R))
"


Ok.... What does it mean????.

Kevil

Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 16th May 2003 09:52
it doesnt matter what i do, both versions return a memblock position out of range on line 141 as soon as i press a key T_T

kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 16th May 2003 11:11
Impossible?!

Kevil

Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 16th May 2003 14:32
I kid you not :-s I tried both the sources and copy pasted exactally n everything

kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 16th May 2003 14:53
You must be using DBC then, because else I don't know what's wrong.

Kevil

Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 16th May 2003 14:55
nope, im using darkbasic pro with patch 4 -_-

kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 16th May 2003 17:24
Ok, that means you have no memory . LOL
I honestly don't know what could be wrong. Seems to work for most people.

Kevil

Login to post a reply

Server time is: 2024-04-20 01:05:19
Your offset time is: 2024-04-20 01:05:19