MTM2.com

A forum for mtm2 discussion
FAQ :: Search :: Members :: Groups :: Register
Login
It is currently Sun Nov 24, 2024 11:22 pm



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Couple of weird texture bugs
PostPosted: Sun Jan 03, 2010 2:32 pm 
Member
User avatar

Joined: Sat May 24, 2003 2:16 pm
Posts: 369
Location: UK
So I'm having some trouble re-texturing models at the moment. I've made the 256x256 texture I need, and load it into Traxx to convert it to RAW and ACT, but whenever I do this Traxx shifts it across about 10 pixels, leaving me with a mis-aligned texture. It's started doing this after about an hour of working with no problems, and I can't fix it by restarting. Are there any workarounds, or possibly a fix?

One more thing I'm working on is unrelated but not worth making another thread about. Trying some ways to get around the 512 models limit, I'm adding copies of the same model to one single model. Same visual effect, but not so many models. Now, the problem I have is that individual trees take up loads of space in the 512 models allocation. Any ideas for how to put multiple trees in one model without it looking strange? Trees usually use the No Collide (Facing) option, but with multiple trees in one space, the whole thing would spin around in some ridiculous manner. I've tried the method used in a lot of games where you have two one-sided models intersecting each other at perpendicular angles, but the way MTM2 handles transparency renders this useless. Some alternative ideas would be appreciated, and I can post pictures to show what I've tried already in case I've explained it badly.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 04, 2010 5:20 pm 
Member
User avatar

Joined: Mon Oct 27, 2003 7:28 pm
Posts: 608
FlyRawGui is my favorite RAW maker, just save the file as a 256 color BMP and open it up in FRG and it will make both RAW and ACT: http://cownap.com/~mtmg/downloads/mtm2/graphics/FlyRawGui.zip


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 05, 2010 7:41 pm 
MTM2 Fanatic

Joined: Thu Sep 04, 2003 1:48 pm
Posts: 680
----------

EDIT: Just tried the calculating, it looks like this idea won't work... sorry. I'll keep trying though, and read on for theory in case anybody gets new ideas from it.

----------

Regarding the trees - here's a solution that may or may not work if you wanted to try it. The problem is that it pushes the vert count per tree, so if you have several in a close area, it might cause lag or errors...

Anyhow, the possible solution to the transparency issue is to have eight quads per tree, installed in pairs back-to-back, like this symbol:

Basically, this would give you control over which faces are rendered over which others. I recall a discussion about face rendering order in which it was stated that:
-If one transparent face is rendered over another, it actually looks like one transparent face over another.
-If, however, the front face is rendered first, the engine can't draw another face behind it, so the shape of the front face will hide most of the rear face.

I believe that faces are rendered in the order they are created, i.e. Face 1 is rendered first, face 7 is rendered seventh, etc. To defeat the transparency bug, you'd have to figure out how to order the faces in the above illustration so that faces behind it are always rendered first. That's why the subdivision - since no faces intersect, this theoretically would be possible.

Rather than making you do the grunt work, this idea has made me curious enough to want to try it. If I can come up with a transparent no-need-for-facing tree, I'll send you the model.[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 05, 2010 8:07 pm 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
I don't know exactly what you mean by the texture shifting but flyrawgui gives you exactly what you create, no slicing and spacing - which is for terrain anyway. Traxx should do this if you uncheck the overlap options.


For merging models, you can put trees all in a line but just use no collide, instead of the facing option. Yes it can look odd sometimes but if you place them with care along road sides or behind actual facing trees, then it can fill out the scene the way you want.

Note. When inserting models inside one another, the transparency is rendered from the first faces to the last, so that you want to put the faces further away into the model first, so that all faces get rendered rather than just a few. I did this with the oil rigs in black gold, and others have worked with trucks the same way.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 05, 2010 8:40 pm 
MTM2 Fanatic

Joined: Thu Sep 04, 2003 1:48 pm
Posts: 680
That pretty much sums it up.

I just finished the model attempt. There is one corner it looks bad from, but it should be fairly easy to place that corner away from the track, assuming you won't see the tree from behind (i.e. if two roads close together, trees between them.)

For cases where you see a tree from all sides, sticking to no-collide-facing would probably still work if you've already saved a few models by using these static ones. Phin's suggestion should help a lot as well. (Idea: place one-sided trees far from the road, these relatively 3D trees closer, and facing trees nearest the racing path. I'd suggest placing them in this order, too, as model placement order works the same as transparent face rendering order.

I UVmapped the model and it's ready to resize and retexture as you please. Let me know if you'd like me to e-mail it to you.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 06, 2010 4:55 am 
Member
User avatar

Joined: Sat May 24, 2003 2:16 pm
Posts: 369
Location: UK
Phineus wrote:
I don't know exactly what you mean by the texture shifting but flyrawgui gives you exactly what you create, no slicing and spacing - which is for terrain anyway.


This is what I got with Traxx:

Input image, 8-bit 256 colour BMP
Image

Output texture
Image

I can see no logical reason for this to happen, and it just skews the image enough for it to not align on the model.

Thanks for the FlyRawGui link though Cale, I wasn't expecting it to work on 64-bit Vista but it did.

Mat-Allum wrote:
I just finished the model attempt. There is one corner it looks bad from, but it should be fairly easy to place that corner away from the track, assuming you won't see the tree from behind (i.e. if two roads close together, trees between them.)


That's a very interesting way of working around this problem, I had no idea MTM2 handled transparency like that. Can always count on you guys to have a clever solution for everything!

What I'm trying to do with this track is simulate a mountain-side road. I'm using various textures to give it contrast and such but with MTM2's limited draw distance I need some scenery to fill up space in a convincing way. The track is nearly 4 minutes long though, so 512 models wouldn't be nearly enough. I've worked out I have about 400 models left for foliage, which never seemed enough on short tracks, let alone a rally. I think with these alternative methods you've suggested I should be fine though. Thanks for all your help.

Mat-Allum wrote:
I UVmapped the model and it's ready to resize and retexture as you please. Let me know if you'd like me to e-mail it to you.


That'd be great, thanks. Hopefully this track will see the light of day and your work will get some exposure.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 06, 2010 7:19 am 
MTM2 Fanatic

Joined: Thu Sep 04, 2003 1:48 pm
Posts: 680
I'll send it ASAP. I figured out a way that might further improve the model's appearance, so I'll make that change before sending.

Edit: E-mail sent. Enjoy! :)


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


Who is online

Users browsing this forum: No registered users and 12 guests


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group