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 / Placing shadow bitmap under character wich follows him and u know making a shadow. (with pics!)

Author
Message
Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 10th Nov 2003 00:51
Like they say a picture is worth a thousand words so,
here this is wat I mean (borrowed images from Bren )

this is the bitmap:


and this is wat I want to do with it:


get it? I tryed looking at roadterrain demo and browing for other threads but had no luck. If anyone can tell me how to achieve this, I will really appriciate it

thanks

My philosophy:
LESS CHAT MORE SCREENIES.
qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 10th Nov 2003 01:31
what if you just position a plain under him? with a high resolution on the texture you might be able to get a semi transparentness with a dot-nodot-dot pattern? or using the db transparency or ghost commands. you would have the obj follow the char like a skybox, only right under him i would guess 0 or 1 units above the ground height
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 10th Nov 2003 02:23
NEVER use .bmps online. ALWAYS use .jpegs.

--Mouse: Famous (Avatarless) Fighting Furball

A very nice %it, indeed.
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 10th Nov 2003 02:24
Oh, and just position it at the player's position, rotate it to face upwards and lower it the distance to the floor. Or use get ground height() if you have a matrix.

--Mouse: Famous (Avatarless) Fighting Furball

A very nice %it, indeed.
Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 10th Nov 2003 19:40
yea but how do I make it follow the character?

thanks

My philosophy:
LESS CHAT MORE SCREENIES.
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 10th Nov 2003 19:56
texture an object plain with the shadow bitmap
set alpha mapping on ShadowObject,Transparency%
position the plain at the players x and z positions
for the y position, position it just above the ground, 1 or 2 units will be ok.
watch in amazement as a shadow appears


Go on, click on my signature image, you know you want to
Favourite smiley>>>
Bren
22
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Belgium
Posted: 10th Nov 2003 20:06 Edited at: 10th Nov 2003 20:07
Put this line of code at the end of your characters' movement code:


@Mouse
Normaly I never upload bitmaps, but this one was only 30kb, not worth the conversion to me

Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community
Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 10th Nov 2003 22:23
So I replace "OBJECT_SHADOW" with the image number of my bitmap shadow and replace "CHARACTER" with my character number?

thanks

My philosophy:
LESS CHAT MORE SCREENIES.
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 10th Nov 2003 23:41
Perhaps you should try to understand variables & 3d commands before you tackle shadows .

--Mouse: Famous (Avatarless) Fighting Furball

A very nice %it, indeed.
Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 11th Nov 2003 00:32
well, we noobs dont have time for that.
but ok (still wanna know the answer though)

My philosophy:
LESS CHAT MORE SCREENIES.
Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 11th Nov 2003 01:15
dang it I'm an idiot, I forgot to put the plain!
(must have looked like a complete mental kid)
but now the damn thing flickers and it isnt transparent! (ill have to fix that too)

thanks

My philosophy:
LESS CHAT MORE SCREENIES.
Kharnor
23
Years of Service
User Offline
Joined: 5th Jul 2003
Location: Australia
Posted: 11th Nov 2003 08:15
It probably flickers because it's on exactly the same Y co-ord as the ground, try setting it slightly higher.

Always cool, Farmboy Kharnor was seen walking around with a long string of toilet paper stuck to his foot.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th Nov 2003 14:45 Edited at: 11th Nov 2003 14:46
I'm gonna be posting a new method for making shadows tonight, does'nt use plains, uses a boned 4 poly/5 vert mesh that sorta blankets the ground, looks much better and has far less defects than silly plains .


Van-B


I laugh in the face of fate!
Beta 1
22
Years of Service
User Offline
Joined: 27th Aug 2003
Location:
Posted: 11th Nov 2003 16:38
ooo I think I can follow your thinking from the other thread.

Could look very nice.
Bren
22
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Belgium
Posted: 11th Nov 2003 18:03 Edited at: 11th Nov 2003 18:08
Megaton this is the code to set up a plain as a shadow. Now the shadow image of mine you want to use is kind of useless The white will create a burned out yellow. I you are using photoshop opened it, add a new layer, fill this layer with black and set opacity to 50%. Then save it back as a .bmp, now the white is turned into grey and that should work.

For more details read the other thread of mine, Van B helped me out with the sadows and probably explained it better Or you could wait for Van B's bone-shadow system

To make it easy, here is the code and the image:





Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community
Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 11th Nov 2003 18:16
k thansk Bren!
I'll try it out as soon as I get home! (Cause I'm in the middle of my Buisness class and not really supposed to be on-line)

thanks again

My philosophy:
LESS CHAT MORE SCREENIES.
Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 11th Nov 2003 18:17
oh and Van, ur methoad sounds good, when do u think ull be done?

My philosophy:
LESS CHAT MORE SCREENIES.
Bren
22
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Belgium
Posted: 11th Nov 2003 18:58
np megaton and you should use "edit" if you want to add something extra to your post.

Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th Nov 2003 22:29
Here's that code:

http://www.dannywartnaby.co.uk/rgt/attachments/lens-shadows.rar


Van-B


I laugh in the face of fate!
tomazmb
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Slovenia
Posted: 11th Nov 2003 23:42
Hello,

Thank you Van B for shareing your knowledge. Nice demo.

Have a nice day,

Tomaz

Why some people take programming so seriously ?
Bren
22
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Belgium
Posted: 12th Nov 2003 01:52
thanks alot Van B

Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community
Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 12th Nov 2003 08:54
hey thats very nice, could really use that

thanks Van B

My philosophy:
LESS CHAT MORE SCREENIES.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Nov 2003 11:36
No worries.


Van-B


I laugh in the face of fate!

Login to post a reply

Server time is: 2026-07-26 17:34:15
Your offset time is: 2026-07-26 17:34:15