MX Bikes Official Forum

Mods => Track Editing => Topic started by: Asdrael on June 13, 2016, 10:43:46 AM

Title: Invisible objects with collision
Post by: Asdrael on June 13, 2016, 10:43:46 AM
How do you guys go about this?

I tried through Sketchup, naming objects using the guidelines (WLLWIREINVISIBLE for example) - then export, and create an edf named WLLWIREINVISIBLE. Still visible, no collision.

I tried using layout in the TrackEd, now I have collision, but still visible. I used WLLWIREINVISIBLE in every instance possible to name the file.

What am I missing here?
Title: Re: Invisible objects with collision
Post by: 𝖙𝖋𝖈 on June 13, 2016, 11:06:32 AM
You can add your invisible object to your original sketchup objects and make it a component named WLLWIREINVISIBLE (in the entities box) and it should work fine.

If you're making it it's own edf, you need to add it to your tht and hmf as another scene. Scene0 has your scenery.edf and scene1 can have your WLLWIREINVISIBLE.edf..
Title: Re: Invisible objects with collision
Post by: Asdrael on June 13, 2016, 04:24:09 PM
Quote from: TheFatController on June 13, 2016, 11:06:32 AM
You can add your invisible object to your original sketchup objects and make it a component named WLLWIREINVISIBLE (in the entities box) and it should work fine.

Thanks for the attempt, but I'm having no success. Tried Objects, Components, 2D, 3D, WLLTYRE, WLLWIREINVISIBLE, TRKSAND, always without collision (and always visible even when using INVISIBLE).

My Sketchup looks like this:
(https://i.gyazo.com/a8c7acee92eaee1ee96b1159adb6aa35.png)

I'm at a loss now.
Title: Re: Invisible objects with collision
Post by: 𝖙𝖋𝖈 on June 13, 2016, 04:57:47 PM
Entity Info is the right place..

Try WLLCONCINVISIBLE_walls or something..

WLLCONCINVISIBLE is just a prefix, I'm not sure it needs a unique identifier but it's definitely the first thing to try, can't remember for sure!

Title: Re: Invisible objects with collision
Post by: Snappe on June 13, 2016, 05:14:16 PM
Quote from: TheFatController on June 13, 2016, 11:06:32 AM
you need to add it to your tht and hmf as another scene. Scene0 has your scenery.edf and scene1 can have your WLLWIREINVISIBLE.edf..

This ^
Make sure you are referencing the correct edf file in your surfaces/collisions file (.tht)
Title: Re: Invisible objects with collision
Post by: Asdrael on June 13, 2016, 06:18:27 PM
I'm sorry to be thick but it's not working out. My workflow goes like this, downloaded the track tools freshly:

Build the component in Sketchup (2 or 3D). Create a Component out of it.

The component in Sketchup in named adequately:
(https://i.gyazo.com/c58299f6151eb9fecba02c845b926be2.png)

Export as FBX, with these options:
(https://i.gyazo.com/87f421f5e7c23a884cc57187a554091c.png).
(Also tried WITHOUT export 2 sided + separate disconnected).

The .tht file (and the .hmf) have 2 scenes, the first one being the scenery and the second one the object I want to be invisible and collision enabled:
scene0
{
name = stad.edf
pos
{
x = 0
y = 0
z = 0
}
rot
{
x = 0
y = 0
z = 0
}
}
scene1
{
name = WLLCONCINVISIBLE.edf
pos
{
x = 0
y = 0
z = 0
}
rot
{
x = 0
y = 0
z = 0
}
}


Both 2D and 3D objects show up in mapviewer and in game, and they do not have collision.

I do have this warning however in the fbx2edf:
WARNING: parent WLLCONCINVISIBLE_01 of object Mesh1 not found
Not sure what that does.

Do I have to put a collision / invisiblity = 1 parameter or something somewhere?

And yes, I tried turning it off and on again ;)
Title: Re: Invisible objects with collision
Post by: 𝖙𝖋𝖈 on June 13, 2016, 06:41:09 PM
You don't need the component definition, I'm not sure what it does but I've only ever used the name field and have had invisible collisions working fine before.

The warning you see in fbx2edf is some kind of bug as far as I can tell from reading the PiBoSo board and won't affect anything.. Just a harmless warning.

So both your scenes show up in mapviewer? I'm guessing then that it's not making the WLLCONCINVISIBLE invisible or collidable?

I have no experience with sketchups FBX export as I only have SU Make which doesn't allow FBX export. Instead I export as DAE and use Sket2FBX to convert. I don't see how it would be any different though.

You could try removing the definition from the component in the entity window, past that I don't know..sorry..
Title: Re: Invisible objects with collision
Post by: Snappe on June 13, 2016, 06:45:19 PM
Why do you need 2 scenes? Just have one scene and point to the collisions.edf file in the tht, and the the scenery.edf file in the hmf.

The warning "WARNING: parent WLLCONCINVISIBLE_01 of object Mesh1 not found" suggests that a problem has occurred at the fbx export stage.
Title: Re: Invisible objects with collision
Post by: pacopastor34 on June 13, 2016, 07:28:18 PM
Why don't you use blender to import 3ds file format and export to fbx instead of sketchup conversor? I don't links how sketch up make its own groups and names. I recommend you strongly 3Ds Max for that purpose. And blender is a good free alternative.
Title: Re: Invisible objects with collision
Post by: Asdrael on June 13, 2016, 07:46:38 PM
QuoteWhy do you need 2 scenes? Just have one scene and point to the collisions.edf file in the tht, and the the scenery.edf file in the hmf.
I was using 2 scenes because I'm trying to keep my Sketchup files light for my processing purposes. Allows to test changes much faster - but I could clean it up between collision enabled and disabled, true.
Quote from: pacopastor34 on June 13, 2016, 07:28:18 PM
Why don't you use blender to import 3ds file format and export to fbx instead of sketchup conversor? I don't links how sketch up make its own groups and names. I recommend you strongly 3Ds Max for that purpose. And blender is a good free alternative.

I'm using the built in Sketchup exporter, it has FBX now.

I will try giving it a loop through Blender via 3DS. Thanks.
Title: Re: Invisible objects with collision
Post by: BadStar on June 13, 2016, 09:44:16 PM
Stay strong Asdrael! When u get this working, it will be the answer to future SX racing in mxb! thx man.
Title: Re: Invisible objects with collision
Post by: Asdrael on June 14, 2016, 12:15:30 PM
Title: Re: Invisible objects with collision
Post by: 𝖙𝖋𝖈 on June 14, 2016, 12:24:42 PM
Well who would have thought it lol.. Guess exporting as DAE for me maintains the component names, then converting with Sket2FBX also does.

Glad you got it sorted!
Title: Re: Invisible objects with collision
Post by: BadStar on June 14, 2016, 05:28:41 PM
Interesting.. I wonder if this is the brick wall I kept hitting when exporting .fbx from sketchup.. I have the free trial which allows .fbx export and this may be a good reason it never works for me! Will have to investigate soon.
Title: Re: Invisible objects with collision
Post by: Asdrael on June 14, 2016, 05:40:42 PM
Quote from: BadStar on June 14, 2016, 05:28:41 PM
Interesting.. I wonder if this is the brick wall I kept hitting when exporting .fbx from sketchup.. I have the free trial which allows .fbx export and this may be a good reason it never works for me! Will have to investigate soon.
Everything works with the built-in exporter (actually, everything works surprisingly well with it). The ONLY problem is the names are lost.

Right now, I prefer exporting directly from Sketchup everything that has no collision as it handles much better the 2D and materials.
Title: Re: Invisible objects with collision
Post by: BadStar on June 14, 2016, 05:51:35 PM
Hmm.. who knows then, I was trying to make 2d tree's and tree lines but couldn't get them to work. I think I am missing a step and soon will get some popcorn and watch geo's movies a bit more  ;)
Title: Re: Invisible objects with collision
Post by: 𝖙𝖋𝖈 on June 14, 2016, 05:53:53 PM
Trees are a bastard.. SketchUp doesn't sort UV's properly so you get alpha halo's.

Also, when you do try - Make sure the textures have the CK prefix or you will see distant trees inside closer ones.. The images you use don't need to be named CK something, but in SketchUp under the materials window you can name it, call them something like CK_tree.
Title: Re: Invisible objects with collision
Post by: BadStar on June 14, 2016, 06:04:12 PM
Ok, thanks for the heads up!  I had a few nice tree's in sketchup with some nice tree lines but when I exported and ran through scenery converter I kept getting an error. I will set aside some time soon to re-hash it all.