Jump to content

Couple questions/issues with model import....


MikeV
 Share

Recommended Posts

Hey all...

 

So as a test, I put together a quick and ugly model, complete with UV texture just to see how the process works and if I could get through it without any major issues, etc.

 

A quick run through of the steps I followed...

- I exported as FBX, converted to GMF via the tool.

- I converted the texture to DDS and then from the DDS, I used the tool to generate the .mat file.

- I also exported an .obj version of the model to set up collision with the phy program (I selected the one that wasn't collision hull.. forget the exact name right now)

 

I copied all those files into their own folder under Models, and am able to successfully to bring the model into a scene.

 

Everything went smoothly until....

 

Problem is two-fold...

1. The model is showing up blood-red with a hint of the texture in there. I had no color set for my diffuse or anything like that in Blender and the UV map looks fine outside LW editor.

 

2. Even with the .phy file generated and physics active in the editor, I'm still falling through the model when trying to land on it.

 

I've tried searching around for help on it, but no dice.

 

Sooo... Here's a screenshot of the model in the editor...

 

Appreciate any help/advice/feedback anyone may have...

 

Thanks!

Link to comment
Share on other sites

Have you set up the collisions for the model as well as the entity type. EntityType(TEntity, int type) and Collisions(int, int, int)?

 

So for example if your one model is called floor and your other model is called ball:

LE::TModel floor = LE::LoadModel(".......");
LE::TModel ball = LE::LoadModel(".......");
LE::EntityType(floor, 1);
LE::EntityType(ball, 2)
LE::Collisions(1, 2, 1) /*This sets up a relationship between types 1 and 2 to
1(meaning they will collide) if the 3rd parameter is 0 there will be no collision
and if it is 2 a collision will be registered but not actioned.*/

 

Also ensure that the .phy file name is written exactly the same as the mesh name except with a .phy extension. Thats all I can think of for the physics at least.

 

As for the color's I've had that happen before but only with skinned meshs.. Though I use UU3D for export so I can't really comment on what you might be doing wrong in that respect

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

Have you set up the collisions for the model as well as the entity type. EntityType(TEntity, int type) and Collisions(int, int, int)?

 

So for example if your one model is called floor and your other model is called ball:

LE::TModel floor = LE::LoadModel(".......");
LE::TModel ball = LE::LoadModel(".......");
LE::EntityType(floor, 1);
LE::EntityType(ball, 2)
LE::Collisions(1, 2, 1) /*This sets up a relationship between types 1 and 2 to
1(meaning they will collide) if the 3rd parameter is 0 there will be no collision
and if it is 2 a collision will be registered but not actioned.*/

 

Also ensure that the .phy file name is written exactly the same as the mesh name except with a .phy extension. Thats all I can think of for the physics at least.

 

As for the color's I've had that happen before but only with skinned meshs.. Though I use UU3D for export so I can't really comment on what you might be doing wrong in that respect

 

Hmm.. So I need to write code to have collision work? Or, is that something else I'm supposed to be editing? I haven't actually come across any documentation that mentions anything about that. Only the phy generation program and such in the documentation.

 

Also, I converted the file from PNG to DDS using the converter provided with LW, so shouldn't that have corrected/overwritten any issues in the material? Same for the FBX2GMF converter?

Link to comment
Share on other sites

Exclude bones and animation from fbx when you export it for static objects, in the editor you add a script to your object

require("scripts/class")
local class=CreateClass(...)

this will give your collision options

My first Adobe purchase was Photoshop 2.0, CS6 was my last! < = >

Link to comment
Share on other sites

Did you generate mipmaps when saving your textures? Do they have a mat file. Static Objects such as a oildrum and their physics can be set in the editor thru the objects properties dialog.

 

It best to load characters that are to be animated in code as they will need a controller

 

To get an objects properties click on the base object in right panel of editor and enter the following lua script in the script editor ,and save it.

 

require("scripts/class")

local class=CreateClass(...)

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Link to comment
Share on other sites

  • 3 months later...

I am having trouble with collisions as well. I just want them to work when testing in Leadwerks 2.5 (by pressing CTRL-G).

 

If the model is called "Smokehouse" and the other is the player model (the one that comes standard with the FPS demo), how would I set collisions up? I tried the above property trick and it did not work.

 

Mike

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 980 GTX with 16gb vram / SSD drives

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1060 GTX with 8gb vram / SSD drives

Alienware Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1070 Ti with 16gb vram / SSD drives

My Patreon page: https://www.patreon.com/michaelfelkercomposer

My music for sale: https://www.tgcstore.net/category/513?format=all&amp;perpage=30&amp;textures=undefined&amp;price=all&amp;order=default&amp;artists[]=87213

Custom synths and sounds - http://www.supersynths.com

Link to comment
Share on other sites

No. Nvidia GeForce GTX 360M

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 980 GTX with 16gb vram / SSD drives

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1060 GTX with 8gb vram / SSD drives

Alienware Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1070 Ti with 16gb vram / SSD drives

My Patreon page: https://www.patreon.com/michaelfelkercomposer

My music for sale: https://www.tgcstore.net/category/513?format=all&amp;perpage=30&amp;textures=undefined&amp;price=all&amp;order=default&amp;artists[]=87213

Custom synths and sounds - http://www.supersynths.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...