vertices:
1.186841 1.184794 -0.958061 1.186841 1.184794 -0.964472 1.186841 1.175432 -0.964472 1.207944
and lines
1 2 1 5 4 6 1 4 4 7
but It has got alot of lines say 10,000
Offline
also I tried doing it with a cube once and it worked and now it doesn't???
it does the exact same thing with just a dot in the middle.
I'm suprised you can't load it as for me it just takes along time
Offline
thanks going to try it now
Offline
It works thanks
but how would you make it bigger it is quite small
Offline
That's cool it works, Like I wrote on your project, compare with my '3d desk' project. There's a zoom control there.
Actually, I think the '3d desk' drawer is a bit more stable than the Suzanne one. The hiding controls never worked quite right. The depth shading with Suzanne is neat, but could have been written better. But other then those points, they're the same.
Offline
I found a way to make a 3D "wheel" to control rotation. its i little better tha nscratch's sliders
Offline
I am having problems Addzero, I added a pen to draw, but I don`t know what to do next.
[blocks]<say[ help ]for( 10 )secs>[/blocks]
:-(
[blocks]<hide>[/blocks]
Offline
I needed to mention this here:
RHY3756547 wrote an excellent ".OBJ Reader" project, this could greatly simplify importing 3d models into scratch.
http://scratch.mit.edu/projects/RHY3756547/770414
hi jellytelly, sorry for the slow response. the next step is 3d projection- translating your 3d data (x, y, z) into your 2d screen (x, y). another RHY3756547 project tried to explain how it works: http://scratch.mit.edu/projects/RHY3756547/799909
Offline
reopened by request of owner
Offline
My goodness I somehow missed this before! This is very exciting! I was going to offer to make an online php parser to turn the blender system into one Scratch can read. What does the file look like if you export the entire shape, not just the wireframe? It might be an idea to get the parser to optionally filter out everything but the wireframe which would make exporting from Blender faster?
I would also suggest putting both values into one file rather than two with a separator character on one line such as '%' Only one .txt file will then need importing and the Scratch project can take a moment when the project starts to seperate the file into two lists if it's not done it yet.
I've seen a wireframe drawing of a computer desk, monitor and chair - oh, it's yours Well I guess you know that the flash player allows more complex wireframes then
Offline
Sparks - This is the default cube.
With faces:
# Blender v2.58 (sub 0) OBJ File: '' # www.blender.org o Cube v 1.000000 -1.000000 -1.000000 v 1.000000 -1.000000 1.000000 v -1.000000 -1.000000 1.000000 v -1.000000 -1.000000 -1.000000 v 1.000000 1.000000 -0.999999 v 0.999999 1.000000 1.000001 v -1.000000 1.000000 1.000000 v -1.000000 1.000000 -1.000000 f 1 2 3 4 f 5 8 7 6 f 1 5 6 2 f 2 6 7 3 f 3 7 8 4 f 5 1 4 8
Without faces:
# Blender v2.58 (sub 0) OBJ File: '' # www.blender.org o Cube v 1.000000 -1.000000 -1.000000 v 1.000000 -1.000000 1.000000 v -1.000000 -1.000000 1.000000 v -1.000000 -1.000000 -1.000000 v 1.000000 1.000000 -0.999999 v 0.999999 1.000000 1.000001 v -1.000000 1.000000 1.000000 v -1.000000 1.000000 -1.000000 f 1 2 f 1 4 f 1 5 f 2 3 f 2 6 f 3 4 f 3 7 f 4 8 f 5 6 f 5 8 f 6 7 f 7 8
As you can see, the one with faces has more numbers after each 'f' this is because if you had a straight line for example, it would only require 2 points (start and end) to define it, whereas with faces, it requires four points (in this case the faces are quads, if they were tris they would have 3 numbers.
Each number tells us which vertex (the numbers with a 'v' before them) it starts at and then where the other points are. So "f 1 2" would mean a line (2 points) that starts at vertex 1 (1.000000 -1.000000 -1.000000) and ends at vertex 2 (1.000000 -1.000000 1.000000).
A thing to note: the vertices' coordinates are in the order x y z (I think Z is up but please correct me if I'm wrong Actually maybe it is Y, honestly I'm not sure ).
Final Edit: I would like to thank addzero/jtxt for introducing me to blender all those years ago, I love it!
Last edited by RUMCHEERYPOOPOO (2011-07-26 05:53:46)
Offline
sparks wrote:
So is it worth me putting together a php parser for this? It shouldn't take long.
EDIT: I should really get blender...
To be able to change it into a scratch friendly format?
If you want.
Offline
Paddle2See wrote:
As promised, here is a script in Python that will parse vertex and line files from your blender files. I'm a bit of a newbie in Python so don't make fun of it...there's probably a way to do it in two lines, if you know what you're doing. But, it should work and that's what counts. Adjust the file paths to fit your environment.
Code:
# Define file paths as a raw string and every kind of catalog well work, else some catalog with sensitive characters won't work. Infile = "c:\users\owner\desktop\Blender Data File.txt" Outfile1 ="c:\users\owner\desktop\Vertices.txt" Outfile2 ="c:\users\owner\desktop\Lines.txt" # Open files vertices = open(Outfile1,'w') lines = open(Outfile2,'w') inp = open(Infile,'r') # Process the input file, one line at a time for input_line in inp: field = input_line.split() # Split line into fields on whitespace if field[0].startswith('v'): # Lines that start with "v" vertices.write(field[1]+'\r\n') # Adding Return and Newline chars vertices.write(field[2]+'\r\n') vertices.write(field[3]+'\r\n') if field[0].startswith('f'): # Lines that start with "f" lines.write(field[1]+'\r\n') lines.write(field[2]+'\r\n') # Close all the files vertices.close() lines.close() inp.close()
The catalog wouldn't work so well if you don't add a 'r' at the front to make it raw string. And what is '\s', all i know is that it makes the outputs returns not work, it looks good at first but then if you try to import it in to scratch then the problem will show, every line's return is glitched out. if you go back to the file and save it, every return will reveal it's glitch so i have change it in to a right return with '\n'.
a better version with the catalog bug fixed would be
# Define file paths Infile = r"c:\your own catalog" Outfile1 =r"c:\your own catalog2" Outfile2 =r"c:\your own catalog3" # Open files vertices = open(Outfile1,'w') lines = open(Outfile2,'w') inp = open(Infile,'r') # Process the input file, one line at a time for input_line in inp: field = input_line.split() # Split line into fields on whitespace if field[0].startswith('v'): # Lines that start with "v" vertices.write(field[1]+'\n') # Adding Return and Newline chars vertices.write(field[2]+'\n') vertices.write(field[3]+'\n') if field[0].startswith('f'): # Lines that start with "f" lines.write(field[1]+'\n') lines.write(field[2]+'\n') # Close all the files vertices.close() lines.close() inp.close()
Last edited by loolo78 (2011-08-11 14:12:09)
Offline
This is a very cool idea. I spent a few weekends working on making it possible to edit 3D models in scratch. Currently I have a program that can import and export .obj files and a native list archive format, edit lines and delete vertices, and, with some extra data per line, cull lines facing away from the camera.
There is still a lot of work to do, though.
I hope the program will make it easier to port 3D models for use in 3D games.
http://scratch.mit.edu/projects/Jamohyperturbopro/2419116
You can test out the Import function on the project's page
Last edited by Jamohyperturbopro (2012-03-26 06:19:30)
Offline
when i tryed doing it, it just made crazy lines
i think it is because your lines file looks like this
3
5
7
7
8
9
5
3...
but mine:
3n4
5n2
5n8
8n3...
please tell me how to fix this!
Offline
Are you using Blender?
Offline
lol I was to lazy to do all the file splitting and I was in Windows 7, so I restarted my computer and booted into Ubuntu
Offline
newnewfew wrote:
I think I'm necroposting but your projects are 1.3.
Yeah you kinda were but you're not the first one if that gives you any consolation
And not the last...
Offline