Page 1 of 2

How to place objects in blender?

Posted: Tue Aug 27, 2013 6:40 pm
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?

Re: How to place objects in blender?

Posted: Tue Aug 27, 2013 6:47 pm
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. viewtopic.php?p=472649#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: viewtopic.php?f=2&t=11094&p=252136#p252136

Re: How to place objects in blender?

Posted: Tue Aug 27, 2013 7:04 pm
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.

Re: How to place objects in blender?

Posted: Tue Aug 27, 2013 11:39 pm
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!

Re: How to place objects in blender?

Posted: Wed Aug 28, 2013 1:31 am
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.

Re: How to place objects in blender?

Posted: Wed Aug 28, 2013 12:27 pm
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

Re: How to place objects in blender?

Posted: Wed Aug 28, 2013 4:34 pm
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.

Re: How to place objects in blender?

Posted: Wed Aug 28, 2013 4:46 pm
by VMX_SKYmx99
Thanks man! That would be great.

Re: How to place objects in blender?

Posted: Wed Aug 28, 2013 8:12 pm
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)

Re: How to place objects in blender?

Posted: Wed Aug 28, 2013 10:33 pm
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.

Re: How to place objects in blender?

Posted: Fri Aug 30, 2013 7:55 pm
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/31zf67qo7ubl7yh/write.placement.v1.zip

Re: How to place objects in blender?

Posted: Fri Aug 30, 2013 8:11 pm
by VMX_SKYmx99
Thanks a lot for all your effort. I am sure a lot of us will put this to good use.

Re: How to place objects in blender?

Posted: Fri Aug 30, 2013 9:20 pm
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:

Re: How to place objects in blender?

Posted: Wed Sep 11, 2013 5:31 pm
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.

Re: How to place objects in blender?

Posted: Wed Sep 11, 2013 8:47 pm
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.