Reflection maps?

Posted By: DEX

Reflection maps? - 03/20/04 02:17

Is it possible to apply reflection maps to models in 3DGS?

I used to make nice effects with reflection maps in shockwave3D with easy.
That way it is possible to make great shining swords and other metals.

Thanks
Posted By: tesanders

Re: Reflection maps? - 03/20/04 16:43

You can do reflection/environment maps via shaders (see the Shaders forum at http://www.conitecserver.com/ubbthreads/dosearch.php?Cat=&Forum=SHADER&Words=environment&Match=Entire%20Phrase&Searchpage=2&Limit=25&Old=allposts). Ventilator's envmap works like a charm, but there might be an easier way to do this nowadays(?)
Posted By: DEX

Re: Reflection maps? - 03/21/04 16:34

Yes but shader working on system with graphics card more powerfool then gForce 4. Then, how I used them in shockwave3D with systems even without 3d cards. I tested my shader effects and all worked well on very low systems.
On each model I had to apply reflection map an thats all, worked perfectly. I don't think that that isue has to be complicate. TWO LINES OF CODE

Here is a screen shot from my shockwave3D engine game.


Look at the diamond, nice reflection when diamond rotate.
Here is code

//applying texture to shader
oo.shader.texture = scene.texture("stampTXT2")
//give the #reflection property to that shader part
oo.shader.textureModeList[1] = #reflection

TWO LINES

Why this is not possible in 3DGS, 2 lines of code and you have any reflection you want on any model you want? That sounds too good

Shockwave engine is very powerfool but it is way toooo slow, but you can make good things with few lines of code.

And that shader thing confuses me, how that slow engine work perfect with shaders on ALL systems and 3DGS need gForce FX5200+ to work with shaders.

Thanks


Posted By: Turrican

Re: Reflection maps? - 03/21/04 17:03

Hi there!
Yes, it's indeed a bit dull that 3DGS doesn't support environment mapping natively. Even HalfLife had this feature. But, well, it can be faked.

Have a look at this thread.

And please read the whole thread, there are some improvements made...
Posted By: Zapan@work

Re: Reflection maps? - 03/22/04 07:52

You can do nice "shader" effects with the a6 engine. Since you have accses to the renderstates(fixedFunction, vertex/Pixel-shaders) you can create greate looking effects.

Following pictures uses envMapping with the fixedFunction pipeline:






Rendering-speed ist a bigPoint here!
Posted By: mk_1

Re: Reflection maps? - 03/22/04 16:36

That's nice, Zapan, but this doesn't really help us. How do we use this in A6?

Posted link by Turrican: I've improved the code a bit down the site. Make sure you use this code.
Posted By: DEX

Re: Reflection maps? - 03/22/04 21:08

May be we shoud ask Doug to give as some advice on that issue. I think that models should have at least two skins at a time, with properties to set up, one for diffusion, one for reflection map, but don't ask me how and is it possible, but example from shockwave shows that it is possible for all systems without need for gforce 980000+.
May be aproach on both systems are totaly different. In shockwave you can get model from max exporter and model don't have skins. Each model can have more mesh groups and each group has it's own shader that can be controled by properties. All those shaders are not environment shaders, and they are controling only those models who have that shader applied. It means that you can have a bunch of models using one shader for reflections and one for diffuse maps.
For me it is little strange that so powerful engine like 3DGS have problems with (for me basic) issue like reflection map.
In my country there are about 10% of computers that can use shaders, so thats means I will cut down my market 90% if I use shaders for reflections.

Dont get me wrong I think that 3DGS is great engine, but I can not belive that simple reflection map issue could not be solved easy vay.

For me the ideal solution should be to have property (skill) to simply apply (choose) reflection map to a model. But for that engine should be writen again, from start




Posted By: Anonymous

Re: Reflection maps? - 03/22/04 21:32

Then maybe you should suggest it in the engine's futute forum.
Posted By: ventilator

Re: Reflection maps? - 03/22/04 21:38

a6 supports fixed function environment mapping (which works with directx7 compatible graphics cards) since a few months now. look in the wiki for an example. with one line of code you can apply the effect to your model!
Posted By: mk_1

Re: Reflection maps? - 03/23/04 00:47

It somehow doesn't work properly.
1. If I have the material assigned to more than one entity all entities use the skin of the entity which was last assigned with the material.
2. I don't have a "ceiling".
My cube map is a 3072x512 bitmap (512x512) named cube+6.bmp. First four parts are the sides, than the sky and finally the floor. Ingame there's no sky to see, only a black square.

I'm using a GeForce2MX400. Not the best card but capable of DX7.
Posted By: ventilator

Re: Reflection maps? - 03/23/04 01:10

it should work. the first problem sounds like a bug. if you can't solve it you should ask jcl.

try to use a smaller cube. some cards don't support cubes with 512x512 sides for cube mapping.
Posted By: mk_1

Re: Reflection maps? - 03/25/04 21:38

Strange! I'm using a 256x256 cubemap but still strange things happen. Here is one side of the cubemap (the rest is exactly the same):


And this is the result:


Can't be! Anyway cubemapping works with all commercial games so I'm sure my card supports it.
Posted By: ventilator

Re: Reflection maps? - 03/25/04 21:46

it's perfectly normal that cubic environment mapping is distorted on this cube! it's the way it works. cubic environment mapping will only look good on rounder objects with more polygons.

...
if you want to have better cubic environment mapping on cubes or other objects with flat surfaces, you have to make the edges hard (split the vertices so that there isn't only one averaged normal) and you have to use a shader which calculates the view vector per vertex.
Posted By: mk_1

Re: Reflection maps? - 03/25/04 22:07

uhm, well...okay. I'll have to use it this way then. thx
© 2024 lite-C Forums