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 / Cubemaps and water effects...

Author
Message
Zealous
20
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 18th Mar 2005 10:12
I would like to generate a low res cube map and apply it to a water plain to get some nifty reflections, but im wondering how to compile my 6 camera snapshots into one file that I can pass to a shader (or perhaps use dbpros built in cubemap if its working yet).

Anyone have any idea? Ive monkeyed around with NVIDIAs FX Composser and all their cubemaps are in a .dds format. How can I compile the images I get in dbpro to a cubemape able .dds?

Thanks in advance.

PS - Was also wondering, where is the best point in world space to generate my cubemap? Assuming I want to do water reflections, where exactly on the water should I be placing the camera when I grab my images for the cubemap?

All you need is zeal
CuCuMBeR
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 18th Mar 2005 16:16
ive no idea about the first question,
for the second;
camera position has to be in the middle of everything, briefly your world in the x and z vectors, and y should be the eye height that you want.

you can check the cube map tutorial ive in the snippets for bryce, which gives you exact calculations.
[href]
http://forum.thegamecreators.com/?m=forum_view&t=49330&b=6[/href]
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Mar 2005 21:44
With the SET OBJECT CUBE MAPPING command you can specify the image numbers to use on each face of the cube. You can even set these as dummy cameras and have live reflections, but that's so performance unfriendly that I would'nt recommend it for anything but a tech demo.


Van-B


It's c**p being the only coder in the village.
Zealous
20
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 19th Mar 2005 10:26
Well I really want to stay away from dbpros built in cubemapping, I know its slow. A hlsl shader seems like it would be much faster. It doesnt really hurt my frames that much to grab 6 images (when you think about its less than a 6fps hit), I just need to get those images into a format my hardware shader can work with.

All you need is zeal
DcZee
22
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 21st Mar 2005 03:20
hmmmm,..I have found the method of using the cameras for live reflections to be a tad slow, however simply using the cubemapping command and supplying the cubemap images to it has had zero performance hit to my program. I was surprised because of what others have said. Didnt even lose a fps. Snapping 6 live pics would introduce a fps hit though. ive used bmp images for the cubemap,..doesnt seem to make much difference but perhaps dds can introduce some transparency effects I havent tried. You can use DBPro to load in several different image formats and then save them as .dds files though. What I have observed in most games is the fixed image reflection maps,..it seems to work. I suspect they have taken the shots live in game from key perspectives, then used those for the final maps. so, you could setup your level then go in and use a routine to take snap shots and save them for your cubemap. What u wont get is real time reflections doing it that way. Most of what we do is smoke and mirrors anyways hehe.

Login to post a reply

Server time is: 2025-05-29 06:25:32
Your offset time is: 2025-05-29 06:25:32