Texture Clones of shared instances of images & BTB xpack update issues.

Ahoy folks.

Ive run into some significant problems with a track im working on. The track (project) itself consists mainly of imported 3ds objects made in max.
In my max project i have a number of buildings.. each of these buildings share alot of textures with other buildings in the scene, the only difference being that the objects uv coords may differ. What I usually do is group each building in max then when i want to export a building i will choose that group, delete everything else, ungroup, then attach all the buildings objects (elements) together, then save out as 3ds. I will repeat the process exporting a bunch of buildings.
So i now have some 3ds files of buildings.. and all these buildings will share some of the textures that others have... so i start to import these 3ds files into xpacker, into the one same xpack. However I notice that xpacker is making unique instances of every texture on every imported object even if its the same image file. So for a understandable example if I import 10 buildings into xpacker, all of which are sharing the same textures, lets say they all use 1 texture each but the same image file.... xpacker will create 10 instances of that texture. This is a major problem because the project im working will perhaps contain 100`s of buildings and other things that will share certain textures. Right now my btb project has over 8mg of cloned textures that the game has to load.. in fact all the cloned textures vastly out number the non-cloned textures by about 80% .. so as u can see when i come to test on rfactor i am assuming that the game is loading these 80% of textures when it dosent really have to.

Someone advised me that I can change these textures in btb`s mats editor itself. So I would go to the mats editor find all the references of the same texture and reload each one to point to one source image file. The problem there is when I try to attempt that BTB gives me that "object not set to a reference" error (or whatever it was.. cant remember the exact wording of it)... This leaves me unable to "ok" out of the mats editor, so btb then forces me to quit the programme.

The only way I can think of avoiding xpacker making these clones is to export my whole 3ds max project out as one 3ds, which in my case is not going to work.

Dose anyone know why xpacker is creating clones of shared textures that are using the same source image file.. and in addition if anyone know a good way around this it would be also great.

Just another thing while im posting here:
Can someone give me the procedure in simple steps on how to update an xpack. I am fed up of having to create brand new xpacks for every tiny little change made on either an imported object or texture xpack. For example if im working on one object i may import into to btb 10 times to make sure the object is correct.. i always end up with 10 xpacks in btb.. Reloading an xpack into xpacker itself dosent seem to work.

Please note the first issue regarding cloned textures and the 2nd minor issue regarding updating xpacker are separate issues.

I hope someone can give me some genuine help here... Ide hate to end up with a track using 100`s of needlessly cloned textures.

Regards
pan :)
 
Making BTB use same texture in many materials, can be done via Xpack editing, but I believe there is more wise men than me to explain that out.


About the Xpack updating:

When you need to update Xpack, or bring new models to the track but preferably via same Xpack just go to your project folder and locate older version of the same Xpack from there. I believe its in projectfolder/xpacks or similar. Then replace the older Xpack with newer, and reload your project. Xpack is updated.
 
Yes, XPacker does it always. Simply solution is that you can make unique material of your own, then copy it's path and paste it to the path of all new materials created when you add new objects. At the end - "pick" (hit the button) and choose the correct texture for the material. This way all objects will use the same material/texture. If you want to have multimaterial for your objects, the procedure would be the same, but you have to know which textures you use.
After it's finished, go to Textures tab and you can delete all textures which are not used ("used by 0 materials" as it says there)
Takes time, I know ;)
Obviously, the XPack would be smaller, and I believe the less materials would improve a performance (for sure in rbr), also you would have less textures exported (btb would rename all of them, adding numbers to their file names).

The second issue - I'm sorry, I don't understand what exactly you mean. Maybe you can add the same objects with little changes to the same xpack and rename them?
 
For the 1st issue, you can merge or overwrite to the same material/shader name, same for textures name paths. Once you edit materials names, you'll see those updates in the objects materials tab. Same for textures paths, just copy & paste 1 path & overwrite the others which using the same texture. I usually use texture grids composed of more than 4 textures inside 1 bigger texture (dds files => 2048 x 512xp or 512 x 2048px minimum) & eventually playing with UVs inside BTB since you can scale/rotate them easily.

For updating, be careful when you update / overwrite your same Xpack & paste that to your same Xpack zip in your project files from your BTB Xpacks zip folder, sometimes you'll edit/update objects (Xpacks) which are already used by your BTB track, so always do a simple copy of it, in case of reverting your work. For testing your Xpack, do it like Brendon, just test it on a newly created test track. Once happy, delete your track objects (the Xpack updated onces) & overwrite your new Xpack in your project & finally re-open your scene to finish your work.
 
Cheers everyone for the feedback.
Ill try it again, this time ill make a new folder, and copy all the relevant textures into it, perhaps rename them to something else (to avoid confusion), then manually link any shared textures via xpacker . i may aswell try updating an xpack too while im at it ..

thanks again
 
.. ok guys heh.. im still a little confused here. ..
here is what i did so far
I made 2 boxes in max i exported it out as a 3ds . each box has a diff texture on it... then i changed the uv tilling settings on my next export (just so i can be sure visually that nothing messed up) but the same texture are applied.
So i have 2 3ds files.. I import them into xpacker..
i expand both objects material tree on the materials tab.. and choose the 2nd objects first material.. i then select pick (or replace) and i point it to the first texture on the first object. I do the same for the 2nd texture on the 2nd object.
Now i can see that all the 2nd objects paths are linking to the 1st objects texture paths in xpacker.
I zip the xpack, and import it into btb... I place both object into scene.. but now when i open the materials editor in btb I still see 4 textures, 2 of them are clones... I examined the paths (in btb mats editor) to see if at least the paths imported with the modified settings i set in xpacker. but according to btb mats editor the paths have not been changed at all. ie. object 2`s first texture is still linking to object 2`s specific path, and of course same story with object 2`s second texture.
I cant do anything about it btb mats editor as i explained, it will prompt that "object not set to an instance" error then force me to quit.

I also tried the same as the above but linking in xpacker to the original source image files.. but it still results in cloned textures in btb.

By the way, you mention about deleting textures.. is there a way to do that in btb?.. or do i have to manually go to the folders and delete them.. further more, im not even sure what files are what.. like.. im just so confused about the whole way btb links up to textures to be honest.. im not sure even where or what folders btb is using, I am aware of the common folder, but there are zip files in there too, do i unzip things to delete textures? what if the texture i want to delete isnt in common..etc etc all these questions ive been meaning to ask.

anyway, I really dont know what to do any more with this :confused:

I am making for rfactor, is there some sort of file I can edit via a text editor after exporting to rf where i can manually paste in paths to point to textures, .. or dose rf embed the textures into some other format?
 
You told it, it's tricky, even for Racer, because originally I had almost hundreds BTB Racer materials 'automatically' set/exported, which most of them were pointing to the same texture path. That's why my thread created earlier, to avoid that annoying issue.

Concerning Xpacker, I had also some 2/3 days of struggling, especially with dae files which I don't use atm. You can check Piddy tutorial on youtube, from what I know, you shouldn't create manually your folders & doing any tweak outside Xpacker. When you import your 3DS files, you typically organize & create categories, the same for materials & the textures at the same time like 'Fences\Fence_01'.

For updating your new same Xpack, be sure to delete or rename your older Xpack (in case of...) & then copy your new Xpack zip into your BTB project folder. Be sure, any unpacked Xpack folder is deleted...You should be good now !
 
Sorry guys, perhaps i didnt explain myself too great in my last post.
The reason why its seemingly become complicated/confusing is I "seem" to be doing everything correctly yet in btb itself its still showing the path changed made in xpacker as linking to what they where originally. I have made a quick vid to show you what i mean. (ull have to view in 720p to be able to see the values properly)


As you can see, in xpacker the paths have been changed .. so the two textures on the 2nd object are linking to the 1st object.. next i show you firstly that btb created doubles, in addition I also click on each one in the video to show you that in btb the paths are not what i modified in xpacker.

QuadCoreMax, Your first post , is the first part in context to using a texture atlas? I did concider making something like that, but to be honest ive never worked with atlas before, I heard they are tricky to work with.


To all, sorry if im missing something totaly obvious here, ive never messed about with these sorts of things before so im learning new aspects.. im sure ill work something out.
 
hey guys... i got some help on how to do this, but it was just really an example of doing it with the above simple test. I have since started to put this into practice and things are not going well at all. In fact ive now lost my project, and im unable to open any of the backups of the project. This has now escalated into a major problem, im stuck, i dont know what to do next, i dont have a mic to make a video to explain what happens.. im confused at the amount of locations btb saves textures, ive no idea what folder is referencing to what texture, every thing i do brings up errors in btb.. and now i cant even open any of the projects that ive been working on for the past 2 or so months solid.

i really dont know what to do. ive got great help from folks, but its just the same dam thing every time, as soon as u put it into practice, nothing works.. im trying so dam hard with this, its ALL ive been doing the past 3 or 4 days,,, just working with this stupid dam issue.. and now its resulted in loosing all my dam work :mad::mad:


bah
what a glorious waste of time ... i wonder if ill ever bother doing a track again.... to thunk what i could have achieved in 2 months doing something else... arggggghh
 
Yes I can sympathize. Just spent 3 weeks trying to work out how to deal with texture atlases. I say deal with in the deepest sense as I too got within ------ that much of giving up and shooting the mother in law. But it seems that the problems your having are related to much the same as I encountered, updating the same XPack all the time and getting several objects to use the same texture.
I have to thank Martinez for dangling the proverbial carrot as although he didn't give the whole tutorial he has in the past placed plenty of tit-bits of knowledge. And if Martinez says it can be done you know it can be done. - But back to your problem.This is how it came out for me.You have to forget your project for the moment untill your sure of what your doing here.
Updating XPacks .--Make a "New" XPack with a simple object.(Leave unzipped) - Open BTBuilder Files - XPacker(unzipped) file --Open
"New" XPack. Leave open. -------- Make a new Xpack in BTBXPacker calling it "Test". Leave empty and -Zip to BTB. -- Go into the BTBuilder Files -- Open XPacker(unzipped) file --Open "Test" XPack.. -- (So you have the two lots of open XPacker XPacks unzipped files).
Copy the "New" XPack (unzipped) files -Object , Materials , Textures, and paste to the "Test"XPack. Open up a file to make sure it copied over correctly.
Open your BTBXPacker and open your "Test"XPack. If it gives an error,which at this stage it shouldn't, note what it is.
Zip to BTB your "Test" XPack.-- Open BTBuilder and make a simple test track. It will just be used for seeing that the object copied works OK. --Save the new track. -- Click on "File" -- "New" -- This closes your track without closing BTBuilder.
Open BTBuilder files -- XPack (zipped) files -- Copy "Test" XPack. -- Open My Projects file-- Open "Your new track" file -- Open XPacks -- Paste "Test" XPack.
Now when you open your new track you should have your simple object at your disposal.
To summarize - copy and paste unzipped files across XPacks -- zip to BTB -- Copy and paste zipped XPack into My Projects.
Hope you can follow that. If you can, and have not "shot your mother in law" I will try and put into words how I make several objects use one texture.
Just hope someone can help you get your projects back. Do you know what the errors said.
 
I have some tutorial of mine about xpacking somewhere... But it's rather big and my English is probably hard to understand ;) If you want it, PM me and I will upload it. There is also a section about merging materials for texture atlases.
 
A while ago I wrote a batch file that makes it easier to copy an updated XPack into your project:
http://simtrackipedia.wikidot.com/btb:xpackupdate

The above page has been up for some time but I forgot to add a link to it :o


im confused at the amount of locations btb saves textures, ive no idea what folder is referencing to what texture
1) [btb folder]\XPacks - the ones you download go here, as do the ones that XPacker adds/updates when you go to 'Zip to BTB'. When you tell BTB to load an XPack, it gets them from this folder, and copies them to folder 3).

2) [btb folder]\XPacker\XPacks\ - these are XPacks in progress. The XPacker program uses these files when you modify objects, add/remove materials etc. BTB doesn't use this folder.

3) [btb folder]\My Projects\[project name]\XPacks\ - the zip files have been copied from folder 1). When BTB loads your project, it reads the XPacks in folder 3). In this folder you may also see folders with the same names as the XPacks, within which are xml files. If you go to Venue Materials in BTB, and modify a material, the changed files (xml) are stored in these folders.

If your project won't load, there should be an error message saying what things are missing. If it reports an object, just import any old 3d model into XPacker and recreate the path. The same for materials.
 
:) i gota say folks, i really cant tell you how much i apprechiate all the suggestions and help.

While i was trying to put what I was advised to do into practice i lost track of exactly what i did what errors came up.. etc Its sorta like trying to memorise a bad chess game where u fail with flying colors. Or your in a space shuttle cockpit furiously pressing various buttons that your not really sure what they do, after 100 presses of various things uve forgotten the sequence of events that got you to the mess in th first place. ;)

So... Im going to give this project one last go. I was lucky enough to have exported the track to dx , (for use as a template in max) .. so what ive done is imported the track (3ds files) back into a fresh btb project. I then used that to trace out the track again. I have deleted ALL xpacks on my system, and any other possible references to xpacks (except the default pack of course).. Today ill attempt to try this one more time and start exported thing out from the max project , slowly, calmly and carefuly. Testing in btb every tiny step to identify the reason for a problem at a particular stage. Perhaps the reason why this is more difficult then it need be is the sheer amount of xpacks I had on my system the vast majority of them are test objects or textures they I never learnt to update. So my HD was a mess of badly named xpacks and textures..etc

I will be working on this today, so of course ill report back to tell you guys how im getting on.

and sorry about my frustration, its like watching a house uve build collapse while trying to fix some of the roof tiles.
 
While i havent fully explored all the advice in this thread yet.. here is just one example the problems im encountering with this..

In the mean time if someone could explain what im doing wrong here, it would be great..
Looks like ill have to start over again and build a new track..
Please understand, when i make reference to my "atlas object" i dont mean a texture atlas in the normal sense, its just a name i gave the object.
http://www.fractalscapes.net/btb/btbclones/btbclones.html

:confused:
 
I believe the most important thing is that you should always fix the paths of textures/materials before (in xpack)you use them in BTB. BTB doesn't usually like such changes made afterwards...


I did it like this with Cannonball:

1. I made a Xpack containing several objects that shared same textures.
2. I changed the texture paths IN Xpacker so that they shared same textures.
3. I brought the Xpack to BTB.

So that way I didn't have problems and also didn't have duplicated textures. General rule with BTB seems to be that one should always add, but never remove.

I think people here know how to change texture paths afterwards, but it is too risky business if not completely sure how it should be done.


Hope you can save your progress somehow :(
 
thanks for the suggestion rojola, but perhaps you missed this part of the thread:
http://www.racedepartment.com/bobs-...mages-btb-xpack-update-issues.html#post889026

.. also even if it did work in xpacker, ide still have to export everything into the scene into one xpack.. then ide be stuck with that..
if i wanted to perhaps update one object in the btb project i would have to start a fresh, then export everything again from 3dsmax..
I dont really see any other choice other then to manually edit the xml files. but even thats not working.

oh well.
 
+1 Johannes !

@Pangea

Looking at your textures in your link example, you see your buildings pattern, so theoretically you could crop those, assemble them into 1 new texture/material & scale/position your 3ds objects UVs correctly.

You shouldn't touch or manually edit those xmls, as I explained before, also be sure when editing the same Xpack in your project, that none of those fresh edited Xpack objects, sobjects etc... aren't used in it. Make always copies when you're unsure, the best is always to develop its own Xpack on test tracks reloading each time the same new overwritten Xpack zip file in your project folder, not your application Xpack folder...

Hope you'll get your work back, I admit I also lost 1 map corrupting my whole BTB project file, hopefully I've build from a csv file with height data, so rebuilding the same way is an easy & fast process.
 
Oh lord pan, what have you done…
hehe, god knows, the only thing i know for sure right now is , its all gone a bit pear shaped ;)


ah now that you and martinez mentioned it, i had a feeling somwhere in my bones telling me that some of the issues ive been running into may have something to do with zipping.
That last error was only one of about 3 or 4 errors specificity related to zip reference.. i think another error was something to do with "invalid zip file header"

I was using winrar, and renaming the .rar to zip (this works for other things). however I did download winzip last night and stilll getting some odd errors pertaining to zips...
I do have 7zip, installed, so i guess ill try that next.

if that fails.. i might do it this way..
export the whole max seance out as 4 3dsfiles.. this is mega awkward for me, and it will still result in at least 4x cloned textures, but the way my project is now, im looking at at least 10 clones of each shared texture. So if i can get it down to 4 and there is no game performance issues, ill be content with that result.

I will of course be providing the btb project, all max and psd files, texture maps..etc etc so someone else can further optimise things if they want, or do a remix of the track..etc

but, this weekend, im having a btb free weekend. god knows i need the metal break..
Often things work after coming back with a fresh head anyway.


like the new avatar ehrlec :)
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top