trouble with objects

Discuss or share your track-related work here

Moderator: kilo

Re: trouble with objects

Postby simon-2 » Sun Mar 22, 2015 2:57 am

fixed it myself :)

change src/tools/trackgen/track.cpp line 204:

Code: Select all
   case TR_RGT:
                  curPos.toRight  = -offset - RtTrackGetWidth(curPitSeg, toStart);
                  curPos.toLeft   = curMainSeg->width - curPos.toRight;
                  curPos.toMiddle = - curMainSeg->width / 2.0 + curPos.toRight; //changed plus and minus


just a tiny sign error :lol:

now i get it correctly-
pits left:
pits_left.png


and finally: pits right :)
pits_right.png


i will add it to that ticket...
You do not have the required permissions to view the files attached to this post.
simon-2
 
Posts: 85
Joined: Thu Jan 29, 2015 3:01 pm

Re: trouble with objects

Postby simon-2 » Mon Mar 23, 2015 1:20 am

next question is on turn marks :)

first thing:
signs are levitating:
levitating_sign.png


is there a possibility yet to draw the post without including it in the sign texture itself (that would waste alot of texture space..), as in Salzfelden?

second:
i try to use "turn marks" for several road signs and even ads, being either rectangular, round, or triangular. As far as i have noticed, there is only one back-sign texture, which is rectangular by default. if all signs where round, for example, i could use a round back-sign texture and everything fine. But as i have them mixed, one texture does not "really" work for all sign shapes.
any possibility without changing them manually in .ac-file?
You do not have the required permissions to view the files attached to this post.
simon-2
 
Posts: 85
Joined: Thu Jan 29, 2015 3:01 pm

Re: trouble with objects

Postby simon-2 » Tue Jun 16, 2015 8:53 pm

simon-2 wrote:the other problem still exists (all objects textured with tree1.rgb), but i think i can cope with it (search&replace, depending on numvert, for every object), as long as number of different objects is manageable (though i wonder why it does not work correctly)


this problem keeps existing for my next track as well. Some objects appear with their correct texture and don't cause troubles, but other objects get any texture from any other object. i can not see any rule it this behaviour... this is imho the most annoying issue with trackgen :x
doesn't anyone have an ideas how to avoid this?
simon-2
 
Posts: 85
Joined: Thu Jan 29, 2015 3:01 pm

Re: trouble with objects

Postby MiniJoe » Tue Jun 16, 2015 9:53 pm

@Simon-2,
Can you post an xml that exhibits the behaviour?
I will see if I can help.
MiniJoe
 
Posts: 95
Joined: Fri Mar 16, 2012 1:32 am

Re: trouble with objects

Postby simon-2 » Thu Jun 18, 2015 2:38 pm

Hi Joe,

archive contains the xml and the corresponding ac files (no textures included for file size...)
https://www.dropbox.com/s/0ptv3qfl1myfo3p/tex_error.tar.7z?dl=0

objects that work correctly:
gate
tent
Startbuilding
tribune
tree1 (from defaults)

objects that get wrong textures:
trackpost (gets the texture of gate)
camper (gets the texture of tribune)
trucks (get texture of tribune)

i guess that something is wrong with the ac files, but i have no idea what it could be. It seems to me that there is no logic, but the same objects work/don't work on every trial, so there must be a rule in this behaviour :-?
simon-2
 
Posts: 85
Joined: Thu Jan 29, 2015 3:01 pm

Re: trouble with objects

Postby simon-2 » Thu Jun 18, 2015 2:48 pm

addition:
if i exclude the gates, trackpost will get its correct texture.
if i exclude the tribunes, all trucks and the camper will get the texture of truck1.

maybe, every object needs an individually named material..? i will check this :-)

yehaa :-) the solution is:
all objects need individual materials. It is not enough to just give them individual material names, as trackgen obviously combines identical materials, but if one of the values is different, it is another material and takes its correct texture.

i.e.:

Code: Select all
MATERIAL "truckMat1" rgb 0.4 0.4 0.4  amb 0.8 0.8 0.8  emis 0.4 0.4 0.4  spec 0.502 0.502 0.502  shi 50  trans 0

Code: Select all
MATERIAL "truckMat2" rgb 0.39 0.4 0.4  amb 0.8 0.8 0.8  emis 0.4 0.4 0.4  spec 0.502 0.502 0.502  shi 50  trans 0

Code: Select all
MATERIAL "truckMat3" rgb 0.4 0.4 0.39  amb 0.8 0.8 0.8  emis 0.4 0.4 0.4  spec 0.502 0.502 0.502  shi 50  trans 0


all those within one track work fine :geek:
simon-2
 
Posts: 85
Joined: Thu Jan 29, 2015 3:01 pm

Re: trouble with objects

Postby MiniJoe » Thu Jun 18, 2015 4:30 pm

Simon-2,
I downloaded the 7z file, but it looks like your missing the "objects-map.png" file.
So, none of the objects show up along the track. Could you remake the zip file or upload the object-map seperately?
Thanks
MiniJoe
 
Posts: 95
Joined: Fri Mar 16, 2012 1:32 am

Re: trouble with objects

Postby simon-2 » Thu Jun 18, 2015 9:26 pm

hi Joe,

workaround is already found (look above). Although i think this is a bug, as materials and textures are two different things and should be handled seperately (the most funny thing is that the whole track gets only one material in the track ac file, no matter what materials are defined in the objects' ac files. so materials are just used to mix up textures :lol:), but i know how to manage it, now (just use different material names and properties for every individual texture). This also works if two textures are used in the same ac object (as long as the appropriate polys use different materials).
Track will be uploaded very soon ;-)

regards
simon-2
 
Posts: 85
Joined: Thu Jan 29, 2015 3:01 pm

Re: trouble with objects

Postby MiniJoe » Thu Jun 18, 2015 10:06 pm

I was hoping to get the file(s) without your work around. I have a theory about the problem, but I cannot duplicate the original problem to test.
MiniJoe
 
Posts: 95
Joined: Fri Mar 16, 2012 1:32 am

Re: trouble with objects

Postby simon-2 » Thu Jun 18, 2015 10:10 pm

okay, so one moment...
you only need objects map?

https://www.dropbox.com/s/2s7anz5axuftkpu/objects-map.png?dl=0
simon-2
 
Posts: 85
Joined: Thu Jan 29, 2015 3:01 pm

PreviousNext

Return to SD Tracks

Who is online

Users browsing this forum: No registered users and 1 guest