How to place objects in blender?

All about making tracks for MX Simulator
Max1633du16
Posts: 200
Joined: Sun Jan 13, 2013 10:27 am
Location: France

Re: How to place objects in blender?

Post by Max1633du16 »

Oops I had not seen this post sorry, thank you :)
Max1633du16
Posts: 200
Joined: Sun Jan 13, 2013 10:27 am
Location: France

Re: How to place objects in blender?

Post by Max1633du16 »

Sorry for the double post, but would it be possible to make a tutorial to open a terrain.png in blender and place the fence? Because I do not understand English properly and I do not know much blender. lol :lol:

Thanks boys :)
Max1633du16
Posts: 200
Joined: Sun Jan 13, 2013 10:27 am
Location: France

Re: How to place objects in blender?

Post by Max1633du16 »

So ?
ColtonD719
Posts: 631
Joined: Tue Jun 21, 2016 4:15 am
Team: Privateer
Location: Oregon
Contact:

Re: How to place objects in blender?

Post by ColtonD719 »

wheels1758 wrote:Here is a script to write the placement of objects that have been placed in blender.

Basically, the coordinates will be written with respect to the origin. If the objects are placed in the x-z plane, uncheck 'Convert to y-up' when exporting.

To set up an object:
1. Place object in blender.
2. Select object and go to properties window.
3. In object properties, select 'Custom Properties'
4. Add a property. Edit this and set Property Name to model. Set Property Value to the name of the model (ie mytrack/mybale.jm)
5. Repeat for texture and collision (those are the Property Names. if you skip these steps, the objects will be written as 'default_model.jm', 'default_texture.png', etc)
6. Open blender Text editor, load this script.
7. Select all objects to write.
8. Click 'Run Script' in the text editor window.

http://www.mediafire.com/download/31zf6 ... ent.v1.zip
Is there a way to get this to export the rotation of the objects? Depending on the option I select when running the script, all of the objects get 0, -2pi, or random rotation. I can't figure out how to maintain the rotation that I've set in Blender.

Thanks!
ColtonD719
Posts: 631
Joined: Tue Jun 21, 2016 4:15 am
Team: Privateer
Location: Oregon
Contact:

Re: How to place objects in blender?

Post by ColtonD719 »

ColtonD719 wrote:Is there a way to get this to export the rotation of the objects?
Looks like I have to be working on an x-z plane. Only took me the afternoon to figure that out!
VUSTTOS
Posts: 837
Joined: Sun Jan 17, 2016 2:02 am
Team: Spanish MX Gamers
Location: GPS not working

Re: How to place objects in blender?

Post by VUSTTOS »

I swear I saw like a week ago a post from Race where he explained how to get objetcs into a terrain.png on Blender.
Some people asked for the Occusion map or something like that too... Am I getting crazy or has that post been deleted?
Alex V111#1017
Image
ColtonD719
Posts: 631
Joined: Tue Jun 21, 2016 4:15 am
Team: Privateer
Location: Oregon
Contact:

Re: How to place objects in blender?

Post by ColtonD719 »

VUSTTOS
Posts: 837
Joined: Sun Jan 17, 2016 2:02 am
Team: Spanish MX Gamers
Location: GPS not working

Re: How to place objects in blender?

Post by VUSTTOS »

ColtonD719 wrote:You mean this one from barrington? http://forum.mxsimulator.com/viewtopic.php?f=11&t=46002
Yes Sir, thanks!
Alex V111#1017
Image
ColtonD719
Posts: 631
Joined: Tue Jun 21, 2016 4:15 am
Team: Privateer
Location: Oregon
Contact:

Re: How to place objects in blender?

Post by ColtonD719 »

wheels1758 wrote:The other writes the placement of objects that do not fall within the bounds of the terrain (You must have the terrain in Blender, as the surrounding object Y location is dependent upon the height of the terrain at the edge pixels).
Is this script available anywhere? Trying to get objects to sit at the proper height on a surrounding terrain object, haggqvist style.
haggqvist wrote:...
ColtonD719
Posts: 631
Joined: Tue Jun 21, 2016 4:15 am
Team: Privateer
Location: Oregon
Contact:

Re: How to place objects in blender?

Post by ColtonD719 »

Like this:
haggqvist wrote:Thanks to wheels brilliant bpy-script the surrounding terrain object on Fermo now have a few billboard trees placed on it.

Image
Image
ColtonD719
Posts: 631
Joined: Tue Jun 21, 2016 4:15 am
Team: Privateer
Location: Oregon
Contact:

Re: How to place objects in blender?

Post by ColtonD719 »

With my nonexistent python knowledge, I managed to edit wheels' write.placement.v1 script to give me usable height values for objects outside of the main terrain, but it only works in game if I flatten the edges of terrain.png. I don't know how to take into account the game's invisible extension of the terrain. Any thoughts?
ColtonD719
Posts: 631
Joined: Tue Jun 21, 2016 4:15 am
Team: Privateer
Location: Oregon
Contact:

Re: How to place objects in blender?

Post by ColtonD719 »

jlv wrote:?
Is there a way to duplicate in Blender the game's invisible extension of the terrain beyond the edges of the map? Or maybe better, a way to disable it in regards to the height of objects placed outside the map?

I'm just trying to find a way to get billboards and/or statues to sit properly on custom made extended terrain statues. I am able to get Y-axis coordinates by placing the objects in Blender, but of course in-game the Y-axis placement is offset by the invisible extension of the terrain. Flattening all edges of terrain.png is the only semi-workable solution I've found so far, but that isn't practical for all tracks as you could get stuck out of bounds if you accidentally ride off the edge.

I wish I knew how wheels and haggqvist did it, but I figure if I could replicate the way the game extends the terrain in blender, I could use those values to counter the offset.

Hope that makes sense! Or if there is a better way I am all ears!
ColtonD719
Posts: 631
Joined: Tue Jun 21, 2016 4:15 am
Team: Privateer
Location: Oregon
Contact:

Re: How to place objects in blender?

Post by ColtonD719 »

I think I figured it out. It looks like the edges of the terrain are simply extruded out the sides. If I get the Y coordinates of the objects set on the extruded terrain, and subtract those from the Y coordinates of the objects set on the custom extended terrain, the objects sit properly on the ground in-game.

Probably nobody else cares about this, but at least I'm satisfied, ha.
Post Reply