'Hollow' Transparent Cube

BlitzMax Forums/MiniB3D Module/'Hollow' Transparent Cube

Matt Vinyl(Posted 2010) [#1]
Hi all,

Please take a moment to look at this picture: [url]http://www.askart.com/AskART/photos/SNY20061115_3658/444.jpg[/url]

How would I achieve this sort of effect within BMax? I have Milkshape 3D and I can get something similar rendered within that, but not within BMax.

I'm guessing I can't just use a simple cube entity, and would have to build all the sides separately?

If anyone could advise, that would be great. Please let me know if you need any more pointers on what I'm trying to achieve - effectively, just a cube that you can 'see through' and obviously, see the other sides, etc.


Kryzon(Posted 2010) [#2]
Quite easy actually, and it has nothing to do with any software or solution you are using. It's all in the texture - it involves a transparent one.
Let's see how much time I take. Ready..... GO!



I made this PNG texture. It has an alpha channel with that border (nothing stops you from making it thicker).
Make sure to enable double-sided rendering or the backfaces won't show up.
The cube has a standard, per-face mapping.


Matt Vinyl(Posted 2010) [#3]
Hi Kryzon, thanks for this, most useful. Where is that image rendered, from within BMax? I could get a semi-transparent image using an alpha channel - as in I could see 'other' objects through the cube, but I couldn't see the cube's 'backfaces' within BMax.

Thanks again,
M.


Kryzon(Posted 2010) [#4]
Not BMax, but 3DSMax :)
To get that smooth shining corner in mB3D you'd either have to set up a highly tesselated cube (as in, lot's of polygons) or use a pixel shader to get the interpolated vertex-normals for lighting.

To get double-sided going on for a mesh you need to set its entity's (or brush's, preferably) FX to 16.

See more about EntityFX in here: http://blitzbasic.com/b3ddocs/command.php?name=EntityFX&ref=3d_cat
By the way, you can eat up all the online B3D Docs as mB3D is supposed to immitate it's functionality to some extent.


Matt Vinyl(Posted 2010) [#5]
Ah, excellent stuff, will peruse and also try and dig out my old Blitz3D manual. ;)