City Conversion

Re: City Conversion

Postby horace » 11 Dec 2010, 09:14

i am not sure about making it shorter. it would be a different track then. i like the serpentines through the hills. :) i will try to reduce the steepness some more though.

if i make new tracks from scratch in the future, then i won't make them so long anymore.
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: City Conversion

Postby ggreenn » 11 Dec 2010, 14:34

Hey, horace, I was the one originally working on converting the track and since I just found out that you're the creator, I thought I'd ask some questions. First, can you post the .blend of the converted track you gave us? Second, I was thinking about making some modifications to the track, (ex moving boards, trees along the beginning of the track, a river going under the bridge, and a sidewalk along the area with buildings) would this be ok with you? I like what you did with the track, nice work with that. I also found in a lot of comments about this track that people seemed to want a shortcut somewhere in it. I think I know where to add one, so could I?
ggreenn
 
Posts: 48
Joined: 26 Sep 2010, 14:49

Re: City Conversion

Postby horace » 11 Dec 2010, 15:58

hi ggreenn,

i also started to work on the track again and i had very similar ideas. what do you mean with moving boards? where would you make the shortcut? i am not sure if both working on the same track would work out very well? maybe you could do your own version of the track (reuse the textures, track segment models,... but with a different layout and shorter like auria would prefer)? i will upload the blend file once it is more cleaned up. there still are a few things missing...

{attachment removed}

this is the current version. i tried to add a building with reflective windows. it doesn't look quite right yet though.

how does the sphere="Y" reflection exactly work? how would i have to render the skycube into my city_reflection.tga correctly? or would it also be possible to do a cube map reflection somehow?

it would be awesome if sphere="Y" and alpha="0.5" could be combined. could this feature be added? i think it would look much better if the reflection was only 50% or so.
Last edited by horace on 13 Dec 2010, 13:40, edited 5 times in total.
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: City Conversion

Postby horace » 11 Dec 2010, 17:41

Image
oh, a sphere map has to look like that. i have to figure out how to best convert a cube map into this.

for the current version i put a reflective sphere within the sky cube in blender and pointed a camera at it. but it didn't turn out quite right. :) it's hard to find the right settings. i will have to experiment some more...

edit: ah, i have figured it out. it's necessary to use an orthographic camera and i pointed the camera at the sphere from a wrong side...
Last edited by horace on 12 Dec 2010, 09:52, edited 1 time in total.
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: City Conversion

Postby rudy85 » 12 Dec 2010, 02:44

Could you send us your blender file please ? I want to learn :|
STK 3D animation
My work is under the licence you want
User avatar
rudy85
 
Posts: 420
Joined: 06 Dec 2009, 13:44
Location: France

Re: City Conversion

Postby horace » 12 Dec 2010, 09:49

city.7z
(6.8 MiB) Downloaded 374 times

ok, here it is with the blend file. but this still is very much work in progress.
(i had to use 7zip because the zip was too big for an attachment i think. i hope this is ok?)

i have a question about shortcuts. are shortcuts really supposed to be shorter? :) wouldn't everyone always take the shortcut then? or should shortcuts be shorter but much more difficult to drive? how should this be balanced?
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: City Conversion

Postby ggreenn » 12 Dec 2010, 14:43

Well, not everyone takes a shortcut because not everyone knows about the shortcut, that's what's cool about them, and unless you make the shortcut really obvious it should stay. In other words, you want a discreet little shortcut.
ggreenn
 
Posts: 48
Joined: 26 Sep 2010, 14:49

Re: City Conversion

Postby Arthur » 12 Dec 2010, 14:53

Making it more risky is probably a good way to ensure that new players doesn't lose just because the other knows about a shortcut. Though you can't make it absolutely balanced, but I'm in favor of some other differences than just the road length (more bananas, more narrow/curvy road etc).

But it's your track, so do whatever you want. :)
Hey pal, I took an oath for justice! "In happy days or tightest tights..." or something like that.
User avatar
Arthur
 
Posts: 1073
Joined: 06 Dec 2009, 00:49

Re: City Conversion

Postby horace » 12 Dec 2010, 15:29

and should i also make a driveline for a shortcut? so that the ai karts can take it too?

how is performance for you with the current track version? is it ok? i am concerned that it will get too slow once i add some more buildings (about twice the current number) and some vegetation. maybe i will have to make the whole thing smaller/shorter even if had prefered not to. :)
Last edited by horace on 12 Dec 2010, 21:16, edited 1 time in total.
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: City Conversion

Postby Auria » 12 Dec 2010, 20:09

Hi,

you can find how to make drivelines for shortcuts here : http://supertuxkart.sourceforge.net/New_drivelines

Regarding performance : the current state of the track contains a number of polygons that seems comparable to canyon track (up to 60K triangles) - and canyon is one of our heavy tracks. So yes it will probably be important to use polygons carefully
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: City Conversion

Postby horace » 12 Dec 2010, 21:06

ok, i guess i will really make it shorter then like you suggested. :) since most polygons are in the track itself. i always use quite a lot of polygons in my track models to achieve smooth curves.

what about mixing sphere="y" and alpha="0.5" in materials? do you think this would be possible and easy to add with irrlicht?
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: City Conversion

Postby horace » 12 Dec 2010, 23:10

topview.png

i have altered the track a bit. it's shorter now and the bridge is only 40m high instead of 60m.

it would be cool if we could test drive the track directly in blender. :) does anyone here have experience with blender's game engine? it uses bullet too, so with some python scripting it should be possible to do a simple kart.
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: City Conversion

Postby hiker » 13 Dec 2010, 00:30

horace {l Wrote}:i have a question about shortcuts. are shortcuts really supposed to be shorter? :) wouldn't everyone always take the shortcut then? or should shortcuts be shorter but much more difficult to drive? how should this be balanced?

Ideally a shorter way should be more risky, and a 'shortcut' (better called an alternative way) might also be longer, and less risky. The idea is to give people something to discover, and/or some variation. They definitely should not make a huge difference. I guess we need some experience with that, i.e. what is good, what is bad.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: City Conversion

Postby horace » 13 Dec 2010, 10:38

the problem with more risky is that the ai probably will fail much too often on the shortcut. :) but i will see...

how does the ai decide which driveline it takes? random with probability 0.5?
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: City Conversion

Postby asciimonster » 13 Dec 2010, 11:18

horace {l Wrote}:how does the ai decide which driveline it takes? random with probability 0.5?

In a PM Hiker told me:
[quote=hiker]The code
clearly is:
int indx = rand() % next.size();
[/quote]
But on windows I've been seeing that all karts take 1 route and 1 route only. Hiker however, is not having any problems. I'm not quite sure how the two observations can be different for the same source code... :?
asciimonster
 
Posts: 375
Joined: 03 Dec 2009, 18:24

Re: City Conversion

Postby hiker » 14 Dec 2010, 10:48

asciimonster {l Wrote}:Hiker however, is not having any problems. I'm not quite sure how the two observations can be different for the same source code... :?

That's not entirely true - I have seen it as well, but when I tried to debug it, everything was behaving fine :(

But it's in the tracker now (thanks), so I'll have another look at it.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: City Conversion

Postby acme_pjz » 14 Dec 2010, 16:16

{l Code}: {l Select All Code}
int indx = rand() % next.size();


I think you shouldn't write random select code in this way, because rand's internal implementation is usually mulitiply-add pseudo-random number generator. So usually the result of rand() is odd,even,odd,even... so if next.size()==2 ,then indx is 1,0,1,0... completely not random. Instead, you should write code like this:

{l Code}: {l Select All Code}
int indx = (int)((float)rand()*(float)next.size()/(float)RAND_MAX);
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: City Conversion

Postby horace » 14 Dec 2010, 17:37

{attachment removed}
here is a test version of the new shorter track.

i have some nice ideas for shortcuts now but first i have to fix the terrain again. :)
Last edited by horace on 15 Dec 2010, 23:38, edited 1 time in total.
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: City Conversion

Postby Auria » 14 Dec 2010, 21:03

Nice work, very noticeable improvement :)
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: City Conversion

Postby hiker » 14 Dec 2010, 22:45

acme_pjz {l Wrote}:I think you shouldn't write random select code in this way, because rand's internal implementation is usually mulitiply-add pseudo-random number generator. So usually the result of rand() is odd,even,odd,even... so if next.size()==2 ,then indx is 1,0,1,0... completely not random. Instead, you should write code like this:

Yes, I basically know that ... but the point is: we don't see even, odd, even, odd ... we see even, even, even, ... (or odd, odd, ...). But when I debugged, I did indeed see karts taking both ways.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: City Conversion

Postby hiker » 15 Dec 2010, 12:26

acme_pjz {l Wrote}:
{l Code}: {l Select All Code}
int indx = rand() % next.size();


I think you shouldn't write random select code in this way, because rand's internal implementation is usually mulitiply-add pseudo-random number generator. So usually the result of rand() is odd,even,odd,even... so if next.size()==2 ,then indx is 1,0,1,0... completely not random. Instead, you should write code like this:

Well, I double checked, since I wasn't entirely sure: I've added a simple linear congruential pseudo-random number generator (intended for networking), and this one has indeed the known issue of the lower bits having a very short period. But rand()%4 for example does not have a short period - which it should have if it would be a simple linear congruential algorithm (that's with VS). Anyway, I have to add our own random number generator for networking anyway, and then will do it properly :)

And the actual problem is not explained by this - so still some debugging to do.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: City Conversion

Postby horace » 15 Dec 2010, 23:41

{attachment removed}
i have recreated the terrain and there is a river now.
next some more building variations and the alternative route...
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: City Conversion

Postby horace » 16 Dec 2010, 22:21

city.zip
(6.75 MiB) Downloaded 361 times

today i have added some trees. they are from http://www.yofrankie.org but i have reduced the polygons a bit.
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Re: City Conversion

Postby Auria » 17 Dec 2010, 01:51

Hi,

very nice work, keep going :)
The polygon count is a little high unfortunately, apart from that it looks great though :)

a possible improvement could be to use vertex colors to make the inside of the tunnel darker
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: City Conversion

Postby horace » 17 Dec 2010, 02:10

i didn't know that vertex colors are supported now. do you know how i can assign vertex colors in blender without painting them? for example select all the tunnel vertices and set them to 0.5 0.5 0.5? i find painting the colors a bit cumbersome.


i still have some stuff to add... at least one more building type and the alternative route needs a lot more work. but i think there is some room for saving polygons. for example i could delete edge loops of some straights in the baked track pieces.
Last edited by horace on 17 Dec 2010, 11:26, edited 1 time in total.
horace
 
Posts: 94
Joined: 21 Jan 2010, 16:32

Who is online

Users browsing this forum: No registered users and 1 guest