blender phyton script

Post about creating and skinning models here
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

blender phyton script

Post by mace-x »

i might look like an idiot.

1- open blender 2.5 alpha2
2- import my object as an obj wit unwrap coordenades and all that.
3- object mode/ select my object
4- go to text window
4- open jm_export.py
6- run script
7- open statues file in notepad++ and... whaat?

Image

yeeeh :(

script crashes

at least im trying and once done i´ll stop asking for this all around :oops:
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
DJ99X
Posts: 15524
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: blender phyton script

Post by DJ99X »

Blender 2.5 runs python 3. The jm script was made for python 2. Roll back to Blender 2.49 in the mean time. Most of the necessary features are the same
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: blender phyton script

Post by mace-x »

thanks a lot dj, i´ll be testing right now :)
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: blender phyton script

Post by mace-x »

worked, but my object is on the floor, how can i modify it?
http://img715.imageshack.us/img715/2295/63894210.jpg
i´ve rotated and reescaled it in blender, ran the python scrip again to get my reja.jm and remplaced the actual one and nothing happened :(
help please :(
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
mxbiker
Posts: 1289
Joined: Mon Nov 10, 2008 5:38 pm
Team: FSK
Location: the netherlands

Re: blender phyton script

Post by mxbiker »

that happend to me too, the thing is when you rescale it and rotate it you must save the model, then delete the model,
then open it again, and then run the python script, i dont know why this is but its the only way i know.

this problem took me alot of time to figure out :P
Proud MXS member since 2008
Still a MXS 125CC rider!
2011 SMA nationals championships leader
5th at the GP replica series 2011
3th overall with team Holland at the MXSON 2010
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: blender phyton script

Post by mace-x »

no :(
the only way i could modify it is rotating in the red axis by 90 degrees in max :(
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: blender phyton script

Post by mace-x »

sorry 4 double post :S
i´ve resized it, erased it, open new scene, load reja.blend, ran phyton script, remplaced the old reja.jm with the new one and nothing has changed :(

also the object is on the red line but the pink dot(that would be where the floor is, true?) is at the middle so mi object now is into the ground :oops: crap! :(


Image
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: blender phyton script

Post by mace-x »

ok, here´s how to fix all.

1-import your object in blender.
2-select your object.
3- go to edit mode
4- rotate your object in the red axis in 90 degrees.
5- scale it as you wish, make sure that the pink dot is on the part of the object that should be on the floor.
6-open text window.
7- open python scrypt "jm_export"
8- run script
9- name it ex:"reja"
10- copy your "whatevername", (mine´s named reja).jm to your track personal folder.
11-open statues file with notepad++ and add:
[1200 0 800] 0 @hillside\reja.jm @hillside\reja.png null
being:
[1200 0 800] /////position of the object
0 //////rotation
@hillside\reja.jm //////@"trackfoldername"\"yourobjectname".jm
@hillside\reja.png /////@"trackfoldername"\"yourskinname".png

now test it ingame! :)


ps:
if is offscale, go back to blender, go to edit mode, scale it as you wish, make sure about the pink dot being on the floor, run python script, and remplace your old obtect.jm with the new one.

hope that someone find it usefull :)
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
DJ99X
Posts: 15524
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: blender phyton script

Post by DJ99X »

In object mode, you have to apply scale/rotation for it to appear up the right way. You have to do that whenever you scale or rotate in object mode.

The barricade looks really good. How many polies?
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: blender phyton script

Post by mace-x »

DJ wrote:In object mode, you have to apply scale/rotation for it to appear up the right way. You have to do that whenever you scale or rotate in object mode.

The barricade looks really good. How many polies?
no, i wasnt able to rotate and resize in object mode, so i had to go to edit mode and worked :)

if i dont miss 26 poly´s for the barrier and 12 :? for the pole... weird.
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
DJ99X
Posts: 15524
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: blender phyton script

Post by DJ99X »

Can you show me the barrier in blender. Just a print screen with the wireframe showing will be good
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: blender phyton script

Post by mace-x »

Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
DJ99X
Posts: 15524
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: blender phyton script

Post by DJ99X »

Yeah, looks good. Have you baked a normal map for it?

In object mode, add the edgesplit modifier. The standard angle should be good enough, if not, just adjust it until it looks good. Apply the modifier and export.

Oh, and you could probably delete the bottom face of the barrier legs, as they are underground
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: blender phyton script

Post by mace-x »

DJ wrote:Yeah, looks good. Have you baked a normal map for it?

In object mode, add the edgesplit modifier. The standard angle should be good enough, if not, just adjust it until it looks good. Apply the modifier and export.

Oh, and you could probably delete the bottom face of the barrier legs, as they are underground
ok, done the edgesplit modifier, it´s like a smooth?
also deleted the face from below.
and no, i didnt baked a normal map, i maked a normal from texture in crazybump.
but, now they´re huge again :(
no matters if i resize them in object or edit mode i get the same giant size :?
any suggestion?
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
DJ99X
Posts: 15524
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: blender phyton script

Post by DJ99X »

Its probably because you applied scale and rotation. Just resize it in edit mode now.
Post Reply