GPWiki.org
GPWiki.org
It is currently Thu May 23, 2013 2:55 pm

All times are UTC




Post new topic Reply to topic  [ 67 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Tue Jan 25, 2005 9:44 am 
Level 22 Norse Warrior-Librarian
User avatar

Joined: Fri Aug 20, 2004 1:58 pm
Posts: 538
Location: UK
The word from a graphics programmer here is that your best bet is to set your surface to A8R8G8B8 and set it as a render target to draw the light blobs.
He knows it works in dx8, he can't remember if there is anything you needed to know about dx7.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 10:05 am 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6716
Location: Oxford, Englandshire
Almar Joling wrote:
Codehead wrote:
PSP Doesn't handle 32bit TGAs, it thinks that they max out at 24bit. To do 32bits you need Photoshop or The Gimp.


Hm. I'm sure I've seen 32 bit somewhere in PSP.. strange :)


It handles 32 bit in other formats, but not in TGA or BMP which can both support it.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 4:51 pm 
Level 22 Norse Warrior-Librarian
User avatar

Joined: Fri Aug 20, 2004 1:58 pm
Posts: 538
Location: UK
http://www.gamasutra.com/features/19991 ... er_pfv.htm

Seems that dx7 does support render to surface...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 8:18 pm 
Dexterous Droid
User avatar

Joined: Wed Aug 18, 2004 7:40 pm
Posts: 3735
Location: South Africa
Ok, I'll get round to reading that gamasutra article but in the mean time... AT: does that article explain how to do the Alpha blending? Will I need to learn d3d?

_________________
Whatever the mind can conceive and believe, it can achieve


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 9:53 pm 
Dexterous Droid
User avatar

Joined: Wed Aug 18, 2004 7:40 pm
Posts: 3735
Location: South Africa
Isn't there an in-house, or at least easy way to do alpha blending, like calling some nice little dll or something similar?

_________________
Whatever the mind can conceive and believe, it can achieve


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 10:15 pm 
Digerati

Joined: Fri Sep 24, 2004 3:15 am
Posts: 1791
Location: No longer near Boston, MA
Have you looked at VBDABL? You might want to look at the tutorials at VoodooVB off of the side bar at http://www.vbgamer.com ;)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 26, 2005 6:53 pm 
Dexterous Droid
User avatar

Joined: Wed Aug 18, 2004 7:40 pm
Posts: 3735
Location: South Africa
Sadistic Penguin wrote:
Have you looked at VBDABL? You might want to look at the tutorials at VoodooVB off of the side bar at http://www.vbgamer.com ;)

I didn't really like vbDABL, but if its the only thing I can use then I guess I'll try and figure it out properly... but when I put it into my game, I was blitting a small glow of like 200x300 pixels and it reduced my FPS to 4 (from 190). would it be possible to make a "lightmap" (800x600) and then put all the lights onto that surface and then vbDABL it over the backbuffer? I think that that would probably take my game to 1/2 FPS :)

Any suggestions?

_________________
Whatever the mind can conceive and believe, it can achieve


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 26, 2005 7:25 pm 
Gamer Geek

Joined: Mon Aug 16, 2004 3:51 am
Posts: 33
The alpha channeling is too slow ( since I would have to update it every frame) and can't be the way other games do it :/ Here are some example screenshots of the type of Day/Night lighting I'm after:

http://www.tibia.com/home/?subtopic=screenshots&screenshot=frodo
http://www.tibia.com/home/?subtopic=screenshots&screenshot=dragon
http://image.com.com/gamespot/images/2004/news/01/13/ashenempires/ashenempires_screen001.jpg
http://uwfi.0wns.org/AshenEmpires004.JPG

If anyone knows how they did those awsome lighting effects, please let me know, thanks :)

VBStrider


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 26, 2005 10:47 pm 
Digerati

Joined: Fri Sep 24, 2004 3:15 am
Posts: 1791
Location: No longer near Boston, MA
1. Use as few calls as possible
2. Don't use it if the call goes off-screen...
3. Blend as little as possible
4. If it can be pre-calculated, do it!

I can't say that I've used such lighting, but I have gotten some good speeds off of VBDABL... that was only for some projectile trails, and therefore was using the minimum possible stuff... If you're using tiles and you have a lamp tile, you can just blend the light on, and save it. Not very elegant, but I guess it works in some situations...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 26, 2005 11:51 pm 
Mumbo Jumbo
User avatar

Joined: Wed Sep 22, 2004 6:44 am
Posts: 789
IGTHORN wrote:
Isn't there an in-house, or at least easy way to do alpha blending, like calling some nice little dll or something similar?


Alpha isnt really THAT hard.. but like all new things it takes a little while to get your head around the example code, and figure out why it works.

I would recommend looking at the Direct3D/DirectDraw hybrid tutorial, it has a working demo of fast alpha blending using some basic 3d code.

Strictly speaking, all you have to learn to use that code is some basic use of trianglestrips, and initializing Direct3D. There is no actual 3D math and whatnot involved in it, you are placing vertices entirely in a 2D orientation. The tutorial I am thinking of is on the old site, I could not find it on the wiki: http://www.rookscape.com/vbgaming/tutBT.php

Obviously, doing 2D drawing using 3D operations is more complicated than simply blitting it, but you can do alpha blending, as well as colorization, rotation and scaling with very little, if any speed impact, because it is hardware accelerated (DLL's like vbdabl have to use CPU not GPU).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 27, 2005 8:35 pm 
Dexterous Droid
User avatar

Joined: Wed Aug 18, 2004 7:40 pm
Posts: 3735
Location: South Africa
JH: I'm on my way now, gonna try and learn that hybrid stuph. How long do you think it'll take? Also, I'm deep into my game with dd7 so I DO NOT want to change any code if possible, will it be a painless port to the hybrid engine?

_________________
Whatever the mind can conceive and believe, it can achieve


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 27, 2005 9:34 pm 
Level 22 Norse Warrior-Librarian
User avatar

Joined: Fri Aug 20, 2004 1:58 pm
Posts: 538
Location: UK
Depends on how much you want to do with the hybrid engine, and how your project is currently set up.
If (like vbstrider) you are drawing 32x32 pixel tiles then converting it to use dx3d is pretty simple.
If you are using lots of different shapes of sprites it could be a bit of a pain, though there is nothing stopping you from keeping most of your directdraw stuff and only using dx3d for bits of the game you think it would help with.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 27, 2005 10:05 pm 
Babirusa
User avatar

Joined: Thu Aug 19, 2004 2:55 pm
Posts: 9241
Location: The Netherlands
Maybe someone should write a tutorial on it. I have a simple Alpha channel tutorial on my site. I'm not sure about it's accurateness though.

_________________
Serious game developer

http://www.persistentrealities.com
http://www.persistentrealities.com/vbfibre
http://www.ambiances.nl


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 28, 2005 12:10 am 
Mumbo Jumbo
User avatar

Joined: Wed Sep 22, 2004 6:44 am
Posts: 789
IGTHORN wrote:
JH: I'm on my way now, gonna try and learn that hybrid stuph. How long do you think it'll take? Also, I'm deep into my game with dd7 so I DO NOT want to change any code if possible, will it be a painless port to the hybrid engine?


Well, let me put it this way. How long it will take? Not too too long. But there is certainly more to learn about TU/TV coordinates, vertices and the format they have to be arranged in, etc. (Unless you just copy / paste the tutorial code, of course).

The beauty of the DD7/D3D hybrid engine is that you dont have to change ANY of your existing blt/bltfast calls. Basically, you change a few of your DirectDraw initialization flags, and use the new method for any sprites that you want to alpha/colorize/rotate/etc.


I am pretty familiar with Matt's tutorial (to which I posted the link last time), If you have any questions about it, feel free to post :yeah


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 28, 2005 8:42 am 
Babirusa
User avatar

Joined: Thu Aug 19, 2004 2:55 pm
Posts: 9241
Location: The Netherlands
JH wrote:
IGTHORN wrote:
JH: I'm on my way now, gonna try and learn that hybrid stuph. How long do you think it'll take? Also, I'm deep into my game with dd7 so I DO NOT want to change any code if possible, will it be a painless port to the hybrid engine?


Well, let me put it this way. How long it will take? Not too too long. But there is certainly more to learn about TU/TV coordinates, vertices and the format they have to be arranged in, etc. (Unless you just copy / paste the tutorial code, of course).

The beauty of the DD7/D3D hybrid engine is that you dont have to change ANY of your existing blt/bltfast calls. Basically, you change a few of your DirectDraw initialization flags, and use the new method for any sprites that you want to alpha/colorize/rotate/etc.


I am pretty familiar with Matt's tutorial (to which I posted the link last time), If you have any questions about it, feel free to post :yeah


Next that it's also nice to know for future games :) ;)

_________________
Serious game developer

http://www.persistentrealities.com
http://www.persistentrealities.com/vbfibre
http://www.ambiances.nl


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 28, 2005 8:04 pm 
Dexterous Droid
User avatar

Joined: Wed Aug 18, 2004 7:40 pm
Posts: 3735
Location: South Africa
Ok, well I'll try and get stuck into it. Just for the record, what's the difference between alpha one and alpha blending?

_________________
Whatever the mind can conceive and believe, it can achieve


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 28, 2005 9:40 pm 
Gamer Geek

Joined: Mon Aug 16, 2004 3:51 am
Posts: 33
Well, I've got an example of alpha blending and alpha one on the first page of this thread I think.
Basically with alpha blending you tell it how "see-through" it is, and alpha one makes it "see-through" depending on how bright the pixel is... So if you have a circle with a white center and a dark grey outline, the center will be solid and you will be able to see pretty well through the dark grey.
Generally, you will want to use alpha one for particles, since it will blend in with the other particles, were as alpha blending wont.

Hope that helps :)

VBStrider


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 29, 2005 7:59 am 
Dexterous Droid
User avatar

Joined: Wed Aug 18, 2004 7:40 pm
Posts: 3735
Location: South Africa
Ahh, cool, I get it!

_________________
Whatever the mind can conceive and believe, it can achieve


Top
 Profile  
 
 Post subject: bingo!
PostPosted: Tue Dec 16, 2008 12:48 pm 
Grand Optimizer
User avatar

Joined: Mon Jan 17, 2005 6:01 pm
Posts: 352
Location: Canada
Ryan Clark wrote:
Well if you're using D3D, can't you just use a point light at the location of the torch?


I'm using D3D adn I cant find any tutorials on how to do JUST that.

Any help?

Thanks!

_________________
"None are more hopelessly enslaved than those who falsely believe they are free."
"It is no measure of health to be well adjusted to a profoundly sick society."
"Hope is the first step on the road to dissapointment." -Jonah Orion
http://tankzgame.blogspot.com


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 16, 2008 2:48 pm 
Mumbo Jumbo
User avatar

Joined: Fri Aug 20, 2004 1:15 pm
Posts: 804
Location: Michigan, USA
Jimbo, it's been 3 years since this thread was created! It won't be long before you hear something about zombies and such.

As for the solution to your problem, Machaira will be along shortly expounding the benifits of XNA.

_________________
The path to hell is paved with clever code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 67 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group