New Track : "Green Valley"

Re: New Track : "Green Valley"

Postby Wolfs » 05 Sep 2011, 21:16

I've finished the conversion with the help of a little script I wrote to make converting the old LOD settings to the new ones easier. I attached it in case anyone finds it useful. I can't guarantee that it works, though, I only tested it on my own track :)
Attachments
lod_convert.py
(2.48 KiB) Downloaded 555 times
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: New Track : "Green Valley"

Postby Auria » 05 Sep 2011, 23:27

Hmm here I just used this simple script :

{l Code}: {l Select All Code}
import bpy
for obj in bpy.data.objects:
    if "name" in obj:
        a = obj["name"]
        if "_LODx" in a:
            a = a[:-5]
            obj["lod_name"] = a
            obj["type"] = "lod_instance"
        elif "_LOD" in a:
            dist = int(a[a.find("_LOD")+4:])
            name = a[:a.find("_LOD")]
            obj["lod_distance"] = dist
            obj["lod_name"] = name
            obj["type"] = "lod_model"


Yours seems quite elaborate, what more does it do?
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: New Track : "Green Valley"

Postby Wolfs » 05 Sep 2011, 23:41

Auria {l Wrote}:Hmm here I just used this simple script :

{l Code}: {l Select All Code}
import bpy
for obj in bpy.data.objects:
    if "name" in obj:
        a = obj["name"]
        if "_LODx" in a:
            a = a[:-5]
            obj["lod_name"] = a
            obj["type"] = "lod_instance"
        elif "_LOD" in a:
            dist = int(a[a.find("_LOD")+4:])
            name = a[:a.find("_LOD")]
            obj["lod_distance"] = dist
            obj["lod_name"] = name
            obj["type"] = "lod_model"


Yours seems quite elaborate, what more does it do?

It also checks for invalid values, wrong data types of the properties and prints out some messages :). But, as mentioned in the script, this is my first program in Python; I knew nothing about this language and learned it while writing the script, which explains the cumbersome code ;)
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: New Track : "Green Valley"

Postby Wolfs » 06 Sep 2011, 13:26

I'm currently trying to implement Kinsu's idea for a low poly forest. It works very well, but Irrlicht draws white borders around some of the trees. Which and how many trees are affected seems to depend on the player's position. If I check the "Disable writing to Z-buffer" option, this effect vanishes, but now a lot of trees located in rows further behind are drawn in front of trees which would normally be in front of them, which doesn't look good, too :(. Does somebody know how I can solve this problem?

I also have problems with the track exporter when I add Kinsu's animated sheep to the track. If I try to export the track, the exporting process stops with an error message. However, since I am not familiar with animations, this could also be my fault ;).

I attached the blend file of the track. The animated sheep is the big one standing on the road near the finishing line.
Attachments
green_valley.zip
(8.86 MiB) Downloaded 428 times
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: New Track : "Green Valley"

Postby Auria » 06 Sep 2011, 16:48

Can you post the error that the exporter gives you? Here the track exports just fine

Also, can you post a screenshot of the white outline? Is is this :
Screen shot 2011-09-06 at 11.35.42 AM.png
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: New Track : "Green Valley"

Postby Wolfs » 06 Sep 2011, 18:16

No, this is not the outline I meant, that's another problem :)

I'm very sorry, I just remembered that I had gone back several revisions in my copy of SuperTuxKart this morning, because the latest version crashed when I tried to play a track. I'm pretty sure it's the same error I had been complaining about some days ago :(.

I have made two screenshots of the tree problem. trees-wrong-order shows that some trees a drawn over the trees which are in front of them. It's a bit hard to see because the picture is not moving. trees-border.png shows the outline around some of the trees in the forest, though it's green there, not white :).
Attachments
trees-wrong-order.png
trees-border.png
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: New Track : "Green Valley"

Postby Auria » 06 Sep 2011, 19:07

OK Now I see. Unfortunately this is an irrlicht limitation. What you could do is to split each "row" of trees in a separate object of its own (with type = object), this should help irrlicht order the trees correctly (hopefully the results will be good enough)
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: New Track : "Green Valley"

Postby Wolfs » 18 Nov 2011, 18:35

Hi, I just wanted to say that I still intend to further improve this track. Sadly, I currently do not have the time to do this and I cannot say when I will be able to continue :(.
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: New Track : "Green Valley"

Postby Kinsu » 20 Nov 2011, 14:03

Hi Wolfs, nice to hear about you :)
Green valley is very promising, so it's good to know you will finish it !
User avatar
Kinsu
 
Posts: 476
Joined: 15 Mar 2011, 14:28

Re: New Track : "Green Valley"

Postby MCMic » 23 Nov 2011, 12:49

Great track, tried it thanks to the addon manager, love it!
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: New Track : "Green Valley"

Postby Wolfs » 04 May 2012, 16:13

Hello,

Having finally found some time to continue work on this track I have finished the small forest and changed several details of the landscape in an attempt to make the track more interesting to drive :).
Unfortunately, I'm having trouble with the track exporter again :(. The track exports fine, but in game none of the objects using level of detail are visible. It would be great if someone could tell me what's wrong with my track or the exporter, or if there have been some changes that I didn't notice.
Attachments
green_valley.zip
(9.95 MiB) Downloaded 531 times
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: New Track : "Green Valley"

Postby asciimonster » 04 May 2012, 17:42

Nice work. I like the waterfall particle emitter and the new music.
Could you remove the floating tree and sheep to the right of the starting line?
asciimonster
 
Posts: 375
Joined: 03 Dec 2009, 18:24

Re: New Track : "Green Valley"

Postby Wolfs » 04 May 2012, 17:54

The floating tree and sheep are part of the problem I have with LOD. They are the models for the level of detail instances and should not be visible. However for some reason all instances are hidden (normally the landscape should be covered with trees and several sheep should be standing near the starting line) and the models are visible.
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: New Track : "Green Valley"

Postby Auria » 05 May 2012, 20:10

Wolfs {l Wrote}:The floating tree and sheep are part of the problem I have with LOD. They are the models for the level of detail instances and should not be visible. However for some reason all instances are hidden (normally the landscape should be covered with trees and several sheep should be standing near the starting line) and the models are visible.


To help debug the problem, I would need to see the blender file.

For the record, the real problem is that all LOD instances are placed at coordinate (0,0,0) in your scene.xml file
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: New Track : "Green Valley"

Postby Wolfs » 05 May 2012, 23:07

Auria {l Wrote}:For the record, the real problem is that all LOD instances are placed at coordinate (0,0,0) in your scene.xml file

Thanks for your help, I just found out what the problem was :). For some reason the center point of all objects have been set to (0,0,0).
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: New Track : "Green Valley"

Postby Wolfs » 06 May 2012, 11:58

This is a new version of the track. I solved the LoD issue and made some more minor changes to the landscape. Please test and give feedback!
The next thing I will do is adding the animated sheep to the track. Is it somehow possible to combine the animated sheep with level of detail? This would be useful because on 3/4 of the track you either can't see them or you are too far away to see them moving.
Attachments
green_valley.zip
(10.16 MiB) Downloaded 489 times
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: New Track : "Green Valley"

Postby Auria » 06 May 2012, 20:34

Hmm I suggest you just try to LOD them, and if it doesn't work then ping me and I will add this feature, we definitely need to LOD animations!
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: New Track : "Green Valley"

Postby Wolfs » 07 May 2012, 09:26

I have tried to add the animated sheep to the track. After setting interaction=ghost to the sheep's mesh, there is an animation (a rather weird one :)):
The right sheep has been added via File > Append from Kinsu's Blender file:
sheep1.jpg

As you can see it's somehow rotated and its movement seems rather messed up.

The left one is a clone of the right sheep with location, scale and rotation applied. As you can see it's standing upright and it's movement is better, but still weird.
sheep2.jpg

If I render the scene in Blender, both sheep are behaving correctly:
sheep.ogv
(164.54 KiB) Downloaded 473 times

Is this a problem with the exporter or did I again miss something :)?

The sheep in the background are using LOD and are not moving at all.

The Blender file is located in the ZIP archive that contains the track, that, by the way, introduces the nice, ultra low-poly trees from Willem Sonke's "Mountain Village" :).
Attachments
green_valley.zip
(10.48 MiB) Downloaded 439 times
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: New Track : "Green Valley"

Postby ctdabomb » 07 May 2012, 14:49

the sheep are funny enough that you don't even have to fix them :D
Some people are like slinkies... not really good for anything, but you still can't help smiling when you shove them down the stairs.
ctdabomb
 
Posts: 1075
Joined: 13 Dec 2011, 21:21
Location: halfway there

Re: New Track : "Green Valley"

Postby Auria » 08 May 2012, 01:39

Hi,

i think you found a bug in the exporter :cry: sigh, we need to fix those bugs, but that's NOT fun to work on ^^ I will create a ticket, I'm sorry about these issues
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: New Track : "Green Valley"

Postby Wolfs » 08 May 2012, 13:31

Auria {l Wrote}:i think you found a bug in the exporter :cry: sigh, we need to fix those bugs, but that's NOT fun to work on ^^

Well, we could just follow ctdabomb's advice and rename the track to "Weird Valley" :D.
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: New Track : "Green Valley"

Postby ctdabomb » 08 May 2012, 13:33

Wolfs {l Wrote}:
Auria {l Wrote}:i think you found a bug in the exporter :cry: sigh, we need to fix those bugs, but that's NOT fun to work on ^^

Well, we could just follow ctdabomb's advice and rename the track to "Weird Valley" :D.

I could whip out some pig models, paint them purple and give them wings :P
Some people are like slinkies... not really good for anything, but you still can't help smiling when you shove them down the stairs.
ctdabomb
 
Posts: 1075
Joined: 13 Dec 2011, 21:21
Location: halfway there

Re: New Track : "Green Valley"

Postby Auria » 18 May 2012, 02:04

Hi,

just a quick update. I recently fixed one bug in the exporter, now one of the 2 sheeps will export fine. I still need to look to make the second one export fine too
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: New Track : "Green Valley"

Postby Auria » 18 May 2012, 02:23

OK I know what's wrong with the second sheep :) it's a known limitation of the exporter, documented at http://supertuxkart.sourceforge.net/Sep ... #Rationale (scroll down a little)

When preparing the mesh and armature make sure they both have a rotation of (0,0,0) to avoid problems (after the rigging is done, though, you can move the object around. Just make sure the "rest position" of both of them is non-rotated). We're working on resolving these issues but for now please bear with limitations of the exporter.


So until I finally gather the courage to fix this, the solution is to reset the rotation on the armature, unparent the mesh and the armature, apply rotation on the mesh and reparent the mesh and armature. Then you can rotate the armature again
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: New Track : "Green Valley"

Postby Wolfs » 18 May 2012, 09:17

Auria {l Wrote}:I recently fixed one bug in the exporter, now one of the 2 sheeps will export fine. I still need to look to make the second one export fine too

Thanks, it works now :). I also tried to add an animated LoD model for the sheep, but the sheep are not moving. And is it already possible to start the animation at a random point?

I encountered a minor problem again. If you get rescued before you reach the checkline (which is located at the rock near the lake), you get reset to the finishing line and have to drive all the way again. How can I solve that?

I attached a further version of the track featuring two correctly animated sheep and some more plants. Please test and give feedback!

I am also planning to upload a new revision of the track to the add-ons, because the version there seems to be a bit outdated :).
Attachments
green_valley.zip
(12.31 MiB) Downloaded 444 times
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Who is online

Users browsing this forum: Bing [Bot] and 1 guest