How to place objects in blender?

All about making tracks for MX Simulator
VMX_SKYmx99
Posts: 836
Joined: Sat Feb 09, 2008 9:51 pm
Team: BOMR
Location: San Francisco, CA

How to place objects in blender?

Post by VMX_SKYmx99 »

Could someone please do a quick tutorial of how to place objects in blender? I thought there was a tutorial somewhere, but can't seem to find it. Basically, I am wanting to create a spline and import an object into my scene to follow that spline. Is it possible to import a .jm into blender and do this? Or do I have to create the object myself?
Image
yzmxer608
Posts: 15352
Joined: Mon Dec 29, 2008 4:30 am
Team: SYS
Location: Wisconsin, U.S.A

Re: How to place objects in blender?

Post by yzmxer608 »

You cannot import jm's back into blender. Here's a tutorial by Wheels that shows you how to place banners using splines, but it only creates banners. http://forum.mxsimulator.com/viewtopic. ... 49#p472649

If you want something for bales or stakes DDMX made a program that uses colored pixels on an image to denote where a statues should be placed: http://forum.mxsimulator.com/viewtopic. ... 36#p252136
TeamHavocRacing wrote:If I had a nickel for every time someone asked for this, I would have a whole shitload of nickels.
VMX_SKYmx99
Posts: 836
Joined: Sat Feb 09, 2008 9:51 pm
Team: BOMR
Location: San Francisco, CA

Re: How to place objects in blender?

Post by VMX_SKYmx99 »

Thanks for the response! I completely forgot about DDMX making that program. I am definitely gonna try that when I get home from work.

I guess in the future, I just need to make my own objects and then I can place them in blender.
Image
ddmx
Posts: 5373
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Re: How to place objects in blender?

Post by ddmx »

That program was alright but it had so much potential. Unfortunately it had a few bugs and I never took the opportunity to fine tune it. Hopefully it works for you though!
wheels1758
Posts: 4132
Joined: Tue Oct 21, 2008 5:20 pm
Location: Washington, USA
Contact:

Re: How to place objects in blender?

Post by wheels1758 »

I have a python script for writing the statues lines based on blender position of objects. Nothing for placing objects in blender based on their in-game position yet.

I have been hesitant to write a jm importer for blender. I mean, it wouldn't be THAT difficult, but I'm sure it would be controversial (since most people don't want their stuff to be 'ripped'). Haggqvist has talked about placing the objects in blender to render AO maps based on their placement relative to other objects (or something along those lines). Other than that, I'm not sure what the need for the jm in blender would be. If placing objects along a spline, curve, or whatever, you could just use a basic cube, and get the coordinates from there.
VMX_SKYmx99
Posts: 836
Joined: Sat Feb 09, 2008 9:51 pm
Team: BOMR
Location: San Francisco, CA

Re: How to place objects in blender?

Post by VMX_SKYmx99 »

Yeah, I'm not trying to start a big controversy over ripping objects. That didn't really cross my mind when I started this topic. It's a shame we have to think like that isn't it? I just wanted a way to place trackside banners that didn't take days. lol
Image
wheels1758
Posts: 4132
Joined: Tue Oct 21, 2008 5:20 pm
Location: Washington, USA
Contact:

Re: How to place objects in blender?

Post by wheels1758 »

VMX_SKYmx99 wrote:Yeah, I'm not trying to start a big controversy over ripping objects. That didn't really cross my mind when I started this topic. It's a shame we have to think like that isn't it? I just wanted a way to place trackside banners that didn't take days. lol
For placing banners (that follow the terrain), you can do that in blender fairly easily. I think I wrote a tutorial on that. I also recently discovered that you can use Photoshop/Illustrator to draw the curves around the track for the banners to follow. I might put up a quick tutorial on that in the next couple days.
VMX_SKYmx99
Posts: 836
Joined: Sat Feb 09, 2008 9:51 pm
Team: BOMR
Location: San Francisco, CA

Re: How to place objects in blender?

Post by VMX_SKYmx99 »

Thanks man! That would be great.
Image
Boblob801
Posts: 3998
Joined: Mon Nov 16, 2009 4:59 am
Team: <3 Andy
Location: New Zealand
Contact:

Re: How to place objects in blender?

Post by Boblob801 »

Ok I got some ideas. Mr wheeler, build a jm import script, take a bunch of track objects and turn them to .blend files. Erase the import script. No harm should really be done by this. I am very interested in the script that allows you to export the track objects from blender. Could you tell us more and is there a small possibility that you could give it out (if you haven't already)
Hi
wheels1758
Posts: 4132
Joined: Tue Oct 21, 2008 5:20 pm
Location: Washington, USA
Contact:

Re: How to place objects in blender?

Post by wheels1758 »

Boblob801 wrote:build a jm import script, take a bunch of track objects and turn them to .blend files.
I think the problem most people would have with people having the actual models (obj, blend, 3ds) which they could modify, export, and release. The only real good way I could see anyone being okay with it is if the import script removed the texture coordinates, so anyone who wanted to modify and export the model would have to UV map the thing from scratch.

And again, I'm not really sure what good having the actual objects in blender is, unless you're rendering shadows/AO maps, or something of that sort.
Boblob801 wrote:I am very interested in the script that allows you to export the track objects from blender. Could you tell us more and is there a small possibility that you could give it out (if you haven't already)
One of them writes the statues lines for the objects placed in Blender, referenced from the (0,0) location of the terrain.

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

Yeah, I'll post them sometime later this week, once I get a minute to make sure that they are both complete.
wheels1758
Posts: 4132
Joined: Tue Oct 21, 2008 5:20 pm
Location: Washington, USA
Contact:

Re: How to place objects in blender?

Post by wheels1758 »

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
VMX_SKYmx99
Posts: 836
Joined: Sat Feb 09, 2008 9:51 pm
Team: BOMR
Location: San Francisco, CA

Re: How to place objects in blender?

Post by VMX_SKYmx99 »

Thanks a lot for all your effort. I am sure a lot of us will put this to good use.
Image
haggqvist
Posts: 352
Joined: Sun Jan 31, 2010 11:44 am
Location: Sweden

Re: How to place objects in blender?

Post by haggqvist »

wheels1758 wrote:Haggqvist has talked about placing the objects in blender to render AO maps based on their placement relative to other objects (or something along those lines).
I told you before that I've been rendering terrain ao-maps with objects placed in blender the whole gp-season for use in the decal overlays...
I've always suspected that you're paying more attention to the dog while we're talking :lol:
Image
Max1633du16
Posts: 200
Joined: Sun Jan 13, 2013 10:27 am
Location: France

Re: How to place objects in blender?

Post by Max1633du16 »

Haggqvist, how do you do for imorter / open the terrain.png in blender because I can not find soluion or tutorial explaining?

Thank you for your reply :) hagg.
wheels1758
Posts: 4132
Joined: Tue Oct 21, 2008 5:20 pm
Location: Washington, USA
Contact:

Re: How to place objects in blender?

Post by wheels1758 »

haggqvist wrote:- open blender 2.65+.
- add a plane and move it so that one corner is at the center and make sure that the coordinates correspond to in game.
- adjust the size of the plane to match the terrain and apply scale and rotation.
- uv-unwrap the plane, project from view (bounds) from top view.
- subdivide the plane 1025 times.
- add the terrain.png as a texture with linear color space and texture coordinates uv.
- add a displace modifier with texture coordinates uv, midlevel 0 and strenght equal to the difference in ft between the min max elevations in the terrain.hf.
Post Reply