MTM2.com

A forum for mtm2 discussion
FAQ :: Search :: Members :: Groups :: Register
Login
It is currently Sat Sep 22, 2018 6:46 am



Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Transparent faces hiding other parts of the model
PostPosted: Sun Mar 30, 2003 11:51 pm 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 11
I remember reading that BigDogge (I think) found a work around for the transparency problem where a face will make everything behind it disappear... but I can't find the post. Does anybody remember this? Does anybody remember the fix? Does anybody have a link? BigDogge, if it was you, any change of repeating yerself?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 12:53 am 
easy company
User avatar

Joined: Tue Feb 29, 2000 2:01 pm
Posts: 2018
I believe the only sure fire work around is to 'cut out' the area's you want transparent... but I've also found that by flipping all the faces then reinserting the model within itself then merging the verts works to some degree, I did this with the checkpoints on Arctic, and several other similar models.

http://rhinoseros.com/~malibu350/tnt/fiberglassing.htm

[edit] link

<font size=1>Edited by Malibu350 (31-03-2003)</font>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 1:18 am 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 11
Ah, this rings a bell.

> To finish, load the inside model into BinEdit first, then select Insert and...

I'll try to work with it. Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 3:56 am 
Member
User avatar

Joined: Wed Nov 06, 2002 2:01 pm
Posts: 881
Location: Silicon Valley, California. USA
I've looked everywhere at Vales, but I can't find the detailed post I wrote on my success. lemme see if I can repeat it:

I've even been able to merge transparent textures and animation several times (like Tornado (propeller), Slasher (blades), and the Moonracers below (force-field dome)

<IMG SRC="http://mtm2.com/~bigdogge/temp_pics/lunaracers_ani.gif" border=0>


Basically, the trick is to keep the faces set to transparent face type (and painted RGB 0,0,0) as a separate BIN model.

When the final assembly of the truck is to be done, use INSERT to add the bin with the "glass" faces to the truck lastly, before saving the truck model for PODDING. Any faces/add-on parts added to the model after the transparent ones will not show through the transparent areas.

WHY?

The truck's faces (polygons) seem to be rendered (drawn) on the screen in the order that they are assembled on the model (or created). Any add-on part's faces that are INSERTed to the bin model are usually rendered on the monitor screen last.

MTM2 creates transparency by NOT rendering area that are supposed to be clear, thus allowing the background and portions of the truck THAT WERE RENDERED FIRST( before the transparent faces) to "show through" like clear glass. In a nutshell, when it is told to take a pixel that is set to "transparent" and paint it totally black (RGB 0,0,0), it instead skips over that pixel and goes to the next one. Result? one "transparent" black pixel!

THE BUG: For some reason, the pixels rendered to solid faces, that sit behind a transparent face, and are rendered/drawn on the screen AFTER the transparent faces, are not rendered but rather skipped over, as if they were transparent too.

I don't know for sure if my explaination is correct, but the results speak for themselves.

I hope this is helpful.


------------------
- BigDOGGe's Boneyard ...The Best Custom Trucks in MTM2 -

<font size=1>Edited by ZOtm_BigDOGGe (31-03-2003)</font>

<font size=1>Edited by ZOtm_BigDOGGe (01-04-2003)</font>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 4:07 am 
Member
User avatar

Joined: Sat Feb 26, 2000 2:01 pm
Posts: 0
Rendering order - interesting concept BigDOGGe!

As for that vehicle, just yesterday I downloaded it for the first time, thought it was very cool indeed. Nice animated pic there, shows it off well. These vehicles, along with the readme, is basically what prompted me to say what I did in the Expo track thread ongoing at this moment.

edit: oh yeah, forgot to mention - I cracked up when I saw the important info (which I certainly recognise) on the cockpit display! Too funny!

<font size=1>Edited by Winterkill (31-03-2003)</font>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 6:24 am 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 11
Excellent. I just checked two models and the render order is backward for a good theoretical display. I'll remake them and post again to let you know the results.

Update.

The render order theory holds true. Check out the [url=javascript:void(0)]before and after[/url] pic.

Great stuff, thanks for the help.

<font size=1>Edited by Phineus (31-03-2003)</font>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 9:33 am 
easy company
User avatar

Joined: Tue Feb 29, 2000 2:01 pm
Posts: 2018
ahhh thought I was pullin your leg eh?... I don't have the befores but here's some afters..

[url=javascript:void(0)]1[/url] [url=javascript:void(0)]2[/url] [url=javascript:void(0)]3[/url] [url=javascript:void(0)]4[/url]

Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 12:31 pm 
Member
User avatar

Joined: Wed Nov 06, 2002 2:01 pm
Posts: 881
Location: Silicon Valley, California. USA
Allow me to gum-up my own "works"....

I tried placing transparent windows on my new truck. I removed the windshield, back and side-window faces from the rest of the truck, and saved them as a separate BIN. The body is saves sans windows.

OK. I assemble the truck parts first, then I insert the windows (now set as transparent faces), and save the complete model as a whole.

I run it on a track, and all looks great..UNTIL.....the truck gets to a point where I can see the passenger side (right side). For some reason the PURPLE AREAS of the driver model are transparent, along with a portion of the chassis, when viewed through the right side window! the truck looks fine through the windshield and left window, as well as the back window.....too screwy!! I fussed with it for some time to no avail.

To make a long tail short (pun intended), I cut-out the windows and built-up new window frames. I left the back window intact as a transparent texture (added last as a separate bin of course), as it gave me no problems, and has lettering decals applied to it...it looks cool with the decals apparently "floating"in the air...that's crystal-clear glass!


Quote:
I cracked up when I saw the important info (which I certainly recognise) on the cockpit display! Too funny!


I think you are the only one who noticed that and told me. ;-)


------------------
- BigDOGGe's Boneyard ...The Best Custom Trucks in MTM2 -


<font size=1>Edited by ZOtm_BigDOGGe (31-03-2003)</font>

<font size=1>Edited by ZOtm_BigDOGGe (01-04-2003)</font>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 1:56 pm 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 11
[url=javascript:void(0)]<font size=+2 face=Wingdings class=nf>ΓΌ</font>[/url]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2003 12:07 pm 
Member
User avatar

Joined: Fri May 04, 2001 2:01 pm
Posts: 495
Location: Bathurst, NSW, Australia
*Ears *beep* up*

Here's some more explanation...

"THE BUG: For some reason, the pixels rendered to solid faces, that sit behind a transparent face, and are rendered/drawn on the screen AFTER the transparent faces, are not rendered but rather skipped over, as if they were transparent too."

It's called hidden surface removal. When rendering the faces of a 3-dimensional scene, overlapping faces have to rendered in the right order or else the illusion of three-dimensionality breaks down. You can imagine it as building up a picture by layers: ideally you would render all the faces in order from farthest to nearest, drawing over the top of those previously drawn (this is what Z-buffering does - it sets the order of the objects in the scene). Of course, you can't always count on everything to be nicely ordered like this (for example, interior details inside a truck might be rendered after the exterior), so it will also detect and cull (not draw) out-of-order 'hidden' faces - eg. if a truck body is drawn, and an engine within it is drawn next, the renderer will avoid drawing the faces of the engine that are hidden by the body. If it didn't, it would completely ruin the image.

The problem is the game also treats transparent faces as if they were solid - hence it culls faces 'hidden' behind transparent faces once the transparent face has been rendered. The method that DOGGe has come up with is simply a workaround this limitation, by ordering the model faces so that interior details are drawn *before* the transparent faces are considered and rendered over the top of it.


"The truck's faces (polygons) seem to be rendered (drawn) on the screen in the order that they are assembled on the model (or created)."
"For some reason the PURPLE AREAS of the driver model are transparent, along with a portion of the chassis, when viewed through the right side window!"

I have noticed that BINedit likes to order faces not only as they are created, but also alphanumerically by the texture they are mapped to. For example, my Falcon ute model (which I'm sure you're all sick of me talking about by now) has three textures, that broadly correspond to the front, the cab, and the bed/rear and underside, respectively. I have noticed that the faces have become ordered into three distinct groups that directly correspond to the textures - if you cycle through the faces of the model, it always goes through the front ones first, then the cab, then the bed and the underside - despite the fact that during creative I've done all sorts of things to it (removing/reinstering the nose, removing/reinserting the tail, deleting parts of the underside, etc) that you would expect to change the ordering of the faces. That's not to say doing such things doesn't change the ordering of the faces, it does - but they always get grouped back with other faces that are similarly textured. In other words, the ordering of the faces is an amalgamation of their creation order, and their texture grouping.

For example, if I was to add a face to the model, it would (naturally) become the last face of the model - but if it was mapped to the texture that is alphanumerically first, when I save the model the face ordering is reshuffled so that what was the 'last' face now becomes last in the first-texture group (which places it somewhere in the middle of the overall ordering, ie. god-knows-where). I would surmise that maybe this is causing your problem with the transparent-purple details - your purple texture is 'lower' in the 'queue' than your window glass, so even though you are trying to make the window glass go after the interior, the faces are being reordered so that the glass is coming first! Am I right?

------------------
Please use the brake provided and not the vehicle in front of you.
- V8 Challenge online racing guidelines


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2003 1:23 pm 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 11
Hmm. Render order and now texture naming. I wonder if the same theory holds true across models. For instance, on Maple Grove, mikey had no end of trouble with transparent trees hiding other objects. I'll have to try some experiments with that. Also, how does any of this account for certain face types that 'shine through' the terrain no matter where they are or when they were inserted.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2003 2:55 pm 
Member
User avatar

Joined: Sat Feb 26, 2000 2:01 pm
Posts: 0
Amazing stuff. Thanks for sharing that BidDOGGe, and thanks for that explainification D2S.

> I wonder if the same theory holds true across models.

As you experiment, try to note the effect in relation to the sunlight source.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2003 3:07 pm 
Member
User avatar

Joined: Fri May 04, 2001 2:01 pm
Posts: 495
Location: Bathurst, NSW, Australia
>> how does any of this account for certain face types that 'shine through' the terrain no matter where they are or when they were inserted.

I can only surmise that such face types are drawn last when they are handled by the game's renderer, without any consideration of hidden surface removal. It already does this sort of thing for the hud instruments (the dashboard dials and needles), so maybe it's interpreting these 'certain' face types as analogous to those?

------------------
Please use the brake provided and not the vehicle in front of you.
- V8 Challenge online racing guidelines


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group