How to do double-sided texturing?

Blitz3D Forums/Blitz3D Programming/How to do double-sided texturing?

PowerPC603(Posted 2004) [#1]
Hi,

I want to create some sort of vortex (sort of wormhole tunnel) in my spacesim, to let the user jump from one sector to another (= jumpgate).

But, I want it so that the player can see the texture of the vortex on the outside and the inside of the tunnel (looks like a funnel, see Star Trek: Deep Space 9).

I know I have seen it before (a flag or something to make a mesh double sided), but cannot find it anymore.
I've searched the Blitz commands already without success.

And I know that it doubles the polygon-count of the mesh.

How can I do that?


Genexi2(Posted 2004) [#2]
You could copy the entity and use FlipMesh on it, the only problem I'd see is that there may be some Z-Buffering issue's when viewing that model at a distance....


PowerPC603(Posted 2004) [#3]
I got one thing going already.
I can set the model to be 2-sided in 3ds max (using the b3d pipeline), and it loads perfectly into Blitz as a double-sided object (I tried a white plane).

But the only problem now is, that the light falling onto it, only affects 1 side.

I created a test-program that turns (around the Y-axis) the plane in front of the camera, so I can see both sides.
The light is positioned above the camera (point-light).
When the normal face (the one which would be shown if the mesh was single-sided) faces the camera, it is fullbright, because of the point-light shining onto it.

When the other face (other side) faces the camera, is it dark-grey (no light affects this face).

Only when I set the entire mesh to be fullbright using "EntityFX Mesh, 1", then both faces are fullbright (which is not what I want).



The vortex will not be visible when the player is outside it's range, as it only pops up when the player is nearby.
So I don't think the Z-buffering will cause (much) trouble (I hope I'm right).


GitTech(Posted 2004) [#4]
You mean the EntityFX command?

EntityFX entity,16



PowerPC603(Posted 2004) [#5]
Ah, now that you mention it...

I tried it, and it works, with a single sided object loaded (b3d-file), but the lighting-situation stays the same (light affects the backside a lot less, actually doesn't react at all).
I removed the lightsource from the scene and now both sides are lit the same (probably by the ambientlight).

But I could use this "feature".
Then it automatically appears if the inner side is darker than the outer side (or reversed if I flip the normals of the mesh).

I also tried copymesh (or copyentity, don't know anymore), but then my program freezes and can only be shutdown by using the task manager and "kill" the program.

Could it be that my plane (= testobject) was a child of a sceneroot, and that I tried to copy that child?