Jump to content

vehicle creation issues [solved]


flachdrache
 Share

Recommended Posts

Well, i try to get a 8 wheeler vehicle lua script to work and keep failing with the given .gmf pipeline.

 

Currently i want to verify the memory leak the default monster_truck.lua produces but le2.43 keeps overwriting the

.phy collider mesh in its own, given, folder ... and it seams the garbage collector of le2.43 just does a better job.

 

The bad thing is, i need to fully understand leadwerks implementation within its newton boundaries - since i need

the 8 wheeler, a jeep and a motorcycle for the player to drive. Please understand my issue here ... its by design.

 

Well, here`s the deal ...

 

UU3D cant export multi-group .gmf models (to my knowledge) - only fbx2gmf.exe does keep its childs to be found.

 

The models structure looks like :

 

scene-root (mesh:Static_Mesh)

- Mesh:body

- Mesh:Tire_L1 etc. etc

- Mesh:TirePivot_L1 etc. etc

 

Yes, i added tires and tire pivots ... just to have them available. These are scene root childs which can be found to

hide/replace the visual models - which does happen.

 

Here is the block of script :

 

pivot=object.model:FindChild("PL1") -- PL1 is a Mesh:TirePivot
if pivot~=nil then
   Print("found PL1")

	tireradius=pivot.aabb.h*2.0
	object.vehicle:AddTire(TFormPoint(pivot.position, pivot.parent, model),tireradius,suspensionlength,springconstant,springdamper)
	object.tire[0]=LoadMesh("abstract::vehicle_truck_stryker_Wheel.gmf", object.model)

	pivot:Hide()
end

 

The "pivot" gets found and hidden, no matter if its my "Mesh:TirePivot" or my "Mesh:Tire".

 

The instance of "TFormPoint(pivot.position, pivot.parent, model)" is what bugs me the most - the "model" in the line does have no reference

but the very "class:CreateObject(model)" - which looks like a hack non the less.

 

Even if the pivots got found and replaced by its visual, non physic, vehicle tires - the actual "AddTire" fails on me ...

please take a look into the provided model source and help me understand this newton thing here ... a dummy vehicle SDK

setup would be nice too and highly needed because of the model pipeline.

 

thx.

AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3

zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5

 

adv_banner-april2012_720x150_tex01.png

 

Xxploration FPS in progress ...

Link to comment
Share on other sites

Assuming that the truck model has the same issue that the jeep model does, then you have ran into the same issue as I have. The mesh jeep model has all of the meshes in the hierarchy but the positions of the separate meshes are lost. All of their origins are the main model's origin, which then screws up the size of the tire radius and the placement of the physics tire. So you would have to offset it to the correct position for each tire as needed from the model's origin and set the tire radius separate from the bounding box.

 

And the conversation with LE/UU3D has taken place concerning saving the mesh hierarchy (including the positions/origins of each separate mesh) but so far has fell on deaf ears. You can hack around it and save the mesh hierarchy from UU3D but it still suffers from the same issue of only one origin.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

? Thats the first time i read about a position of a subMesh could get lost - i wouldnt mind to set up a pivot rig ... if it works. So, there are still 6 to 9 other ways to do it differently ... good. ^_^

 

PS: here is the 8 wheeler - just for reference.

Jeep and Truck Models where found on the interweb w/o attached license e.g. for private use only.

 

If you are a fancy 3dStudioMax owner - i wouldnt mind to get a working stryker_truck 8 wheeler.

 

Edit :

I looked in my database and the stryker vehicle was downloaded from "gfx-3d-model.blogspot.com" but is no longer featured there. Models w/o license end up in my "non-commercial" folder but this particular model was offered as no-strings-attached download.

AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3

zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5

 

adv_banner-april2012_720x150_tex01.png

 

Xxploration FPS in progress ...

Link to comment
Share on other sites

uu3d does not save the position information. look at your model in the modelviewer and you will see that the positions read 0,0,0... if you have the old windmill model and you view it with the modelviewer, you will see that its submesh has values for position referenced from the main model's origin.

 

no unfortunately im not a 3dsmax owner... and even more unfortunate, it appears they are the only ones that have the ability to save mesh hierarchy correctly in LE.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Well, i dont consider advertising being a wish list either but since there is no real sample for it i guess the script just breaks at one point. I was just too tired to go on / clean up.

 

Edit:

solved ... one actually just need to update all tires in the array. ^_^

Clean and tweak vehicle model in uu3d to obj to blender-2.56, for positioning tires etc. relative to vehicle body (group origin to geometry).

AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3

zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5

 

adv_banner-april2012_720x150_tex01.png

 

Xxploration FPS in progress ...

Link to comment
Share on other sites

Clean and tweak vehicle model in uu3d to obj to blender-2.56, for positioning tires etc. relative to vehicle body (group origin to geometry).

 

please explain this in detail. are you saying that your model now has individual origins for the individual submeshes or that you were just able to get the exact location of each submesh from blender then used those values to properly set the position of the tires by code?

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Exactly - the pipeline worked out just like it should be.

I wouldn't say programmer friendly but doable with little experience in blender.

The mode itself has some issues which i need to fix still but the pos and orientation is finally there.

The script is just like the monsterTruck but with 4x steering wheels.

 

vehicle_truck_stryker_fbx.jpg

 

I already had imaginations of all kinds of horror scenarios for work arounds really ... good that no 6k model programm is needed too.

I think grouping isnt needed at all just the models relation to each-other need to be obtained.

AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3

zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5

 

adv_banner-april2012_720x150_tex01.png

 

Xxploration FPS in progress ...

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