• Welcome to MX Bikes Official Forum. Please login or sign up.
 
April 25, 2024, 11:03:31 PM

News:

MX Bikes beta18j available! :)


Invisible objects with collision

Started by Asdrael, June 13, 2016, 10:43:46 AM

Previous topic - Next topic

Asdrael

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?
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

𝖙𝖋𝖈

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..

Asdrael

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:


I'm at a loss now.
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

𝖙𝖋𝖈

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!


Snappe

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)

Asdrael

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:


Export as FBX, with these options:
.
(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 ;)
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

𝖙𝖋𝖈

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..

Snappe

June 13, 2016, 06:45:19 PM #7 Last Edit: June 13, 2016, 07:01:51 PM by Snappe
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.

pacopastor34

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.

Asdrael

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.
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

BadStar

Stay strong Asdrael! When u get this working, it will be the answer to future SX racing in mxb! thx man.
Most Active In-Game        PM me and I may be able to race!
Mon-Fri
East Coast: 4p-10p 
Forum Time: 9pm-3am (-5)
Sat/Sun Anytime

Asdrael

June 14, 2016, 12:15:30 PM #11 Last Edit: June 14, 2016, 12:43:17 PM by Asdrael
    Problem solved, thanks to everyone for the help.

    For future reference: the only problem was that object naming does NOT seem to work in Skletchup for FBX exporting. The names get lost on the way. The rest of what I was doing looks fine however. My workaround was as suggested by Paco:

    • Work my 3D objects in Sketchup, placement and all
    • Export in .3DS
    • Import .3DS in Blender (1000 scale)
    • Name objects properly (right click to select object/grouping, hit N, scroll to Item and name it there).
    • Export to .FBX
    • Run converter, process normally with scenes etc.
    Edit: it also got rid of the FBX2EDF error.
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

𝖙𝖋𝖈

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!

BadStar

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.
Most Active In-Game        PM me and I may be able to race!
Mon-Fri
East Coast: 4p-10p 
Forum Time: 9pm-3am (-5)
Sat/Sun Anytime

Asdrael

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.
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord