![](sad.gif)
Lighting in Iso engine
I need some help.
I made some basic iso engine in 16-bit color and now, I''m little comfused about how to make effects like day/night, lightning and so on....
I tought that DirectDraw support alpha-blending, but that feature is only in Direct3D.
I found this solutions :
1. remake engine into Direct3D
2. write some very fast alpha-blend blit rutine in asm
3. use paletes (but I don''t know how in 16-bit mode)
Have someone any suggestions?
(I must apologize for my english. I''m from Czech Republic where teach me German and Russia language
)
![](sad.gif)
You should go to my web-site to learn all you need to know about switching to Direct3D from the Iso projection to rendering with DrawPrimitive.
http://therabbithole.redback.inficad.com
It''s in the "Tricks" section.
Ben
http://therabbithole.redback.inficad.com
It''s in the "Tricks" section.
Ben
They are all valid an plausible solutions.
(1) If your ISO-Engine is far from be complete and it''s much like a bunch of test-routines, it would be greate to rewrite it from scratch in a 3D fashion (I mean REAL 3D with a fixed ISO-View), as many other ISO-Engines do nowadays.
A solid 3D-Programming knowledge is required, of course.
(2) Performing software alpha-blending is quite easy. You could code it in plain C/C++ and not necessarily to be done using assembly.
(3) Palettized modes can be simply simulated regardless of the display depth using a Look-Up Table that maps INTEGER values into PACKED RGB values.
There isn''t a BEST SOLUTION. It just (heavily) depends on how much will you use the ISO-Engine alpha-blending capabilities.
In my opinion, solution (2) is a good candidate, since it doesn''t force you to re-write the engine and fits with the the already-coded blitting routines.
Moreover, with the increasing CPUs performances you won''t notice any (appreciable) difference with the accelerated blitting routines (unless you alpha-blit a lot of huge BOBs
).
Hope it help. Let me know if you need any other information.
[home page] [e-mail]
---
"Lifting shadows off a dream once broken
She can turn a drop of water into an ocean"
(1) If your ISO-Engine is far from be complete and it''s much like a bunch of test-routines, it would be greate to rewrite it from scratch in a 3D fashion (I mean REAL 3D with a fixed ISO-View), as many other ISO-Engines do nowadays.
A solid 3D-Programming knowledge is required, of course.
(2) Performing software alpha-blending is quite easy. You could code it in plain C/C++ and not necessarily to be done using assembly.
(3) Palettized modes can be simply simulated regardless of the display depth using a Look-Up Table that maps INTEGER values into PACKED RGB values.
There isn''t a BEST SOLUTION. It just (heavily) depends on how much will you use the ISO-Engine alpha-blending capabilities.
In my opinion, solution (2) is a good candidate, since it doesn''t force you to re-write the engine and fits with the the already-coded blitting routines.
Moreover, with the increasing CPUs performances you won''t notice any (appreciable) difference with the accelerated blitting routines (unless you alpha-blit a lot of huge BOBs
![](smile.gif)
Hope it help. Let me know if you need any other information.
[home page] [e-mail]
---
"Lifting shadows off a dream once broken
She can turn a drop of water into an ocean"
---[home page] [[email=karmalaa@inwind.it]e-mail[/email]]
Thanks much for sugestions.
I didn''t known that most of ISO engines are in 3D with fixed view angle. I tought that ISO engine is for imitating 3D. Make full 3D game with fixed view is odd for me.
I''m poor with Direct3D but I tought taht I can switch to Direct3D, make some surface and make all the same way but with alpha-blending, lighting etc.
Yesterday I try some alpha-blendig routine in C++, but it was VERY slow....![](sad.gif)
I didn''t known that most of ISO engines are in 3D with fixed view angle. I tought that ISO engine is for imitating 3D. Make full 3D game with fixed view is odd for me.
I''m poor with Direct3D but I tought taht I can switch to Direct3D, make some surface and make all the same way but with alpha-blending, lighting etc.
Yesterday I try some alpha-blendig routine in C++, but it was VERY slow....
![](sad.gif)
I wouldn''t put too much faith in software alpha blending effects; they''re slow because the CPU was built to handle everything in general, not graphics in particular (sorry, 3DNow! users
).
What I''m doing in my game engine is loading images as textures (limited to powers-of-two sized sides, and 256-pixels max per side for limited Voodoo users), and rendering them as quads (two triangles positioned to look like a rectangle or square), using DrawPrimitive, glVertex3f, and grDrawTriangle. My game supports all three major renderers (Direct3D, Glide, and OpenGL), and uses compressed TGA files for textures. So it saves space when storing images, image decompression isn''t too much of a bottleneck (yet), and image rendering is ultra fast (with alpha testing used in place of color keying).
I would say that the visual gratification is worth it... check here for an example. If you want some assistance with the Direct3D part, as long as it''s DX8, let me know.
Good luck!
MatrixCubed
http://MatrixCubed.org
![](http://24.114.12.207/paleribbon.jpg)
![](smile.gif)
What I''m doing in my game engine is loading images as textures (limited to powers-of-two sized sides, and 256-pixels max per side for limited Voodoo users), and rendering them as quads (two triangles positioned to look like a rectangle or square), using DrawPrimitive, glVertex3f, and grDrawTriangle. My game supports all three major renderers (Direct3D, Glide, and OpenGL), and uses compressed TGA files for textures. So it saves space when storing images, image decompression isn''t too much of a bottleneck (yet), and image rendering is ultra fast (with alpha testing used in place of color keying).
I would say that the visual gratification is worth it... check here for an example. If you want some assistance with the Direct3D part, as long as it''s DX8, let me know.
Good luck!
MatrixCubed
http://MatrixCubed.org
![](http://24.114.12.207/paleribbon.jpg)
[ Odyssey Project ]
quote:
Original post by Martin Kaspar
Thanks much for sugestions.
I didn''t known that most of ISO engines are in 3D with fixed view angle. I tought that ISO engine is for imitating 3D. Make full 3D game with fixed view is odd for me.
Well, using a real 3D engine for imitating an ISO fake-3D engine is a "recent" addiction in video-gaming...
quote:
Original post by Martin Kaspar
I''m poor with Direct3D but I tought taht I can switch to Direct3D, make some surface and make all the same way but with alpha-blending, lighting etc.
If you can afford it, switch to real 3D rendering at once.
It''s worth the effort and it makes you able to *very* *easily* implement a bunch of nice visual effects that "usual & basic" ISO engines can''t do.
quote:
Original post by Martin Kaspar
Yesterday I try some alpha-blendig routine in C++, but it was VERY slow....
Well, it depends on HOW did you implement it...
![](smile.gif)
One of the projects of mine is a portabile, machine independent, object-oriented graphics library. It''s fully coded in C++ with no hardware acceleration at all and it''s quite fast.
If you need some suggestion, just e-mail me a code snippet and I''ll check it out!
[home page] [e-mail]
---
"Lifting shadows off a dream once broken
She can turn a drop of water into an ocean"
---[home page] [[email=karmalaa@inwind.it]e-mail[/email]]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement