how to add library nodes to a track??

how to add library nodes to a track??

Postby rubberduck » 17 Jan 2015, 15:18

how can i add library nodes into my track.
i use blender 2.7.2, and i have the newest version of the assets and also the newest version of the track exporter scripts.

i can open a track that uses some, they got displayed too, but i don't know how to add these to my track.

what could be the problem?
https://notabug.org/rbduck/Nucleagacy
my puzzle / action game in godot 4
User avatar
rubberduck
 
Posts: 910
Joined: 23 Apr 2013, 18:31
Location: sitting with tux in a bathtub

Re: how to add library nodes to a track??

Postby samuncle » 17 Jan 2015, 15:59

Hi

You need to link them (see how to link an object)

1) You have to link the object
2) You have to convert the proxy to an linked object (ctrl + p)
3) To make a duplication YOU NEED TO KEEP THE LINK, ONLY DUPLICATE WITH ALT+D (it's very important :D). If you forget this when you update the object in the lib it won't be updated in the blend. Blender doesn't tell you easily if it's linked or not. Tips, if your object isn't editable when you press tab then it's linked
Image
User avatar
samuncle
STK Moderator
 
Posts: 752
Joined: 16 Mar 2010, 21:28

Re: how to add library nodes to a track??

Postby Anon » 17 Jan 2015, 17:53

You can tell whether an object will be interpreted as a library node by the exporter by going to the stk settings section of the properties panel with the object selected, and seeing if it says something about library nodes being unconfigurable. You can also tell if an object is still linked in Blender by going to "Mesh" in the properties panel and seeing if the mesh datablock selector says "LF" (or maybe some other two letters) beside where it says the number of users.

I think you should also be able to fix accidentally unlinked library objects by choosing the appropriate datablock for the object's mesh. Though, IIRC, you can't change how STK treats objects, so this is only useful if you accidentally shift-D something.

If you accidentally make a bunch of shift-D'd objects and don't feel like replacing all of them, you might be able to fix them en masse by selecting all of them, making a correct library object your active object, and linking its data to the broken objects with ctrl-L. Again though, I've never tried this and can't say for sure whether or not it will work.

There's also a reference for making library objects on the wiki.
Anon
 
Posts: 208
Joined: 03 Jul 2014, 16:30

Re: how to add library nodes to a track??

Postby Anon » 17 Jan 2015, 17:56

Actually, how do the STK scripts determine what objects are library objects anyway? It's not by seeing whether they're proxies, and there don't seem to be any custom properties that I can find...
Anon
 
Posts: 208
Joined: 03 Jul 2014, 16:30

Re: how to add library nodes to a track??

Postby rubberduck » 18 Jan 2015, 18:08

i have an issue with a library node i have added.
in the blend-file i have 4 seperated objects, 2 flower pots and 2 flowers.

then i added these into my track, i linked all of these 4 objects at once, but in stk they are displayed multiple.
stk_lib_issue.jpg

i moved the flower mesh a bit, it seems that every mesh i have added adds all of these meshes i exported from this blend-file

what is wrong here??
https://notabug.org/rbduck/Nucleagacy
my puzzle / action game in godot 4
User avatar
rubberduck
 
Posts: 910
Joined: 23 Apr 2013, 18:31
Location: sitting with tux in a bathtub

Re: how to add library nodes to a track??

Postby Anon » 18 Jan 2015, 19:08

rubberduck {l Wrote}:i moved the flower mesh a bit, it seems that every mesh i have added adds all of these meshes i exported from this blend-file


Ya, that's how it works. Think of the whole library node file as an entire track or scene unto itself, which is appended into the main STK track when the game loads. You only have to link one of the objects, and everything else will follow (assuming you've named your library node's .blend file's directory properly).

This might make it hard to get a preview in Blender when your node has more than one object, since you only end up linking one. To work around this, you should be able to create a dummy object by merging all your objects and setting it to "Ignore" in STK properties. Then, you can link this dummy object into your scene to get a better preview of how it would look with the full node. STK uses the directory name of the library's .blend when exporting scene.xml, so the full node should still be used ingame.

However, I'd advise you to be conservative with the number of objects you have in each node. IIRC, samuncle and vlj have said that the framerate in chocolate (now Cocoa Temple, I guess) is limited by the CPU, due to the sheer numbers of library objects in the track. I also asked Auria if the performance impact from library nodes is per node or per object (e.g., your flower would count as four objects), and the reply was that it was per object. As a result, each library node in my valley demo contains five trees (it's probably not such a big deal with a flower pot, but it still might be best to consider optimization).
Anon
 
Posts: 208
Joined: 03 Jul 2014, 16:30

Who is online

Users browsing this forum: No registered users and 1 guest