Omnimaga

Omnimaga => News => Topic started by: Xeda112358 on December 01, 2012, 08:27:39 am

Title: solidFRAME v1.0b released
Post by: Xeda112358 on December 01, 2012, 08:27:39 am
A few days ago, tr1p1ea (you know, the guy that created xLIB) released solidFrame-- a 3D model viewer. It can take Wavefront OBJ files (converted, of course) and allow you to rotate and explore objects. And these aren't simple wireframe models, either, but instead these are textured models. Here are a few pieces of candy for your enjoyment:

(http://img.removedfromgame.com/imgs/scr_3.gif) (http://img.removedfromgame.com/imgs/scr_2.gif)
(http://img.removedfromgame.com/imgs/polytest32.gif)

Go ahead and give it a try! (A 15MHz calculator is suggested, by the way, but it will work on a 6MHz calc)

Discussion Topic (http://ourl.ca/17648)
Download (http://www.ticalc.org/archives/files/fileinfo/450/45097.html)
Title: Re: solidFRAME v1.0b released
Post by: Augs on December 01, 2012, 09:45:07 am
Awesome work!

I am wondering if it would be possible to have models played real-time in games if it were to be ported to nspire, but I doubt it
Title: Re: solidFRAME v1.0b released
Post by: DJ Omnimaga on December 01, 2012, 01:50:29 pm
That is really great. I was amazed at how many details there was in that Zelda and Mario model actually. As for the Nspire, if that engine was ported to it without adding any extra details, I think it would definitively be useable in games if maps were not made of blocks like in nCraft but rather like nDoom or something. There would definitively need to be some sort of limit about how far you can view stuff, though, to avoid major slowdowns.
Title: Re: solidFRAME v1.0b released
Post by: Sorunome on December 01, 2012, 02:47:22 pm
wow, this is pretty awesome! :D
Title: Re: solidFRAME v1.0b released
Post by: Mercolify on December 01, 2012, 04:33:21 pm
wow that's cool!
Title: Re: solidFRAME v1.0b released
Post by: Spenceboy98 on December 02, 2012, 12:39:23 am
I'm trying to make a model, but I don't know how to change the number of vertices and faces. Does anyone know how?
Title: Re: solidFRAME v1.0b released
Post by: Xeda112358 on December 02, 2012, 07:38:31 am
I'm trying to make a model, but I don't know how to change the number of vertices and faces. Does anyone know how?
I've no clue, are you using a computer utility or is it on calc?
Title: Re: solidFRAME v1.0b released
Post by: Spenceboy98 on December 02, 2012, 03:08:10 pm
I'm trying to make a model, but I don't know how to change the number of vertices and faces. Does anyone know how?
I've no clue, are you using a computer utility or is it on calc?

I'm using Blender on the computer.
Title: Re: solidFRAME v1.0b released
Post by: Rhombicuboctahedron on December 02, 2012, 03:14:41 pm
Do you mean something as simple as the subdivision surface modifier?
Title: Re: solidFRAME v1.0b released
Post by: lkj on December 02, 2012, 03:38:42 pm
Subdivide or extrude in edit mode.
Title: Re: solidFRAME v1.0b released
Post by: Ranman on December 02, 2012, 08:24:11 pm
Pure sweetness!

Nice job tr1p1ea!  :thumbsup:
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 02, 2012, 10:56:34 pm
Thanks guys :).

Spenceboy98: Do you need help making some stuff in Blender? Are you trying to add or subtract vertices/faces?

You can use the 'Decimate' modifier to reduce faces/vertices of a mesh?
Title: Re: solidFRAME v1.0b released
Post by: DJ Omnimaga on December 02, 2012, 11:06:13 pm
Tr1p1ea, have you tried to create a moderate-sized map (such as a small village)to see how fast it renders?
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 02, 2012, 11:12:50 pm
Not as yet, i have my sights on finishing the polygon clipping code before attempting that. Technically i have a demo with 9 cubes in 3D space where you can fly around and such (at around 17-20fps) which almost fits the part. They are a reasonable distance apart however so the speed comes from LOD techniques. Ill see what i can do in the short-term.
Title: Re: solidFRAME v1.0b released
Post by: DJ Omnimaga on December 03, 2012, 12:33:49 am
Oh I see, there's no clipping yet (assuming that's what you mean by finishing?).
Title: Re: solidFRAME v1.0b released
Post by: Xeda112358 on December 03, 2012, 06:57:56 am
That sounds really cool, tr1p1ea o.o
Title: Re: solidFRAME v1.0b released
Post by: Spenceboy98 on December 03, 2012, 08:29:15 pm
Thanks guys :).

Spenceboy98: Do you need help making some stuff in Blender? Are you trying to add or subtract vertices/faces?

You can use the 'Decimate' modifier to reduce faces/vertices of a mesh?

I'm getting this error now: (http://img.removedfromgame.com/imgs/Error.png)
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 03, 2012, 08:32:09 pm
What syntax are you using? Does your model have less than 256 vertices AND less than 256 faces?

Are you able to send me a copy of the model to test?
Title: Re: solidFRAME v1.0b released
Post by: Spenceboy98 on December 03, 2012, 08:48:29 pm
I changed it and it gives the same with this prompt error:
Code: [Select]
Unhandled Exception: System.FormatException: Input string was not in a correct f
ormat.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffe
r& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo in
fo)
   at objConv.Program.Main(String[] args)
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 03, 2012, 08:55:43 pm
What exactly are you typing when running it?

The utility doesnt have much in the way of error checking so you have to be careful how you use it.
Title: Re: solidFRAME v1.0b released
Post by: Spenceboy98 on December 03, 2012, 09:02:47 pm
What exactly are you typing when running it?

The utility doesnt have much in the way of error checking so you have to be careful how you use it.

I'm typing
Code: [Select]
objconv.exe -x Hand2.obj HAND.8xp
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 03, 2012, 09:50:39 pm
Your OBJ file needed to be scaled and the materials needed to be reoganised. I have converted it by hand since i dont have blender but you lost all of your materials in this test.

You can get the .8xp from here: http://www.tr1p1ea.net/files/downloads/

That being said at 254 polygons, its going to be slow! (maybe ... MAYBE 3fps). You should be able to recreate this model with a small fraction of the polygons.
Title: Re: solidFRAME v1.0b released
Post by: Xeda112358 on December 04, 2012, 09:07:52 am
Ooh, but can we get a screenie? Since that is pushing the program about to the limit, it would be interesting to see what it looks like.
Title: Re: solidFRAME v1.0b released
Post by: Matrefeytontias on December 04, 2012, 12:59:03 pm
+1 for Xeda, that's quite interesting :D
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 04, 2012, 03:45:08 pm
Well im afraid there isnt a whole lot to see at the moment, i had to reset the materials in the model. Here is a screenie which doesnt show much really:

(http://img.removedfromgame.com/imgs/polytest37.gif)

Note that this has more than both the Mario and Dark Link head models combined, The details for this model are mostly made up of redundant triangles.

In most cases the same model can be made with a LOT less polygons than normal without affecting the on-calc quality.
Title: Re: solidFRAME v1.0b released
Post by: Xeda112358 on December 04, 2012, 03:49:01 pm
Ah, I see. But still, knowing that there are around one or two bazillion triangles, that is a decent speed. I imagine 40 to 100 triangles would give the hand decent detail on that scale, too. Would 40 triangles render at about 12 to 16 frames per second?
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 04, 2012, 04:21:50 pm
Yeah it should range between 12-16 fps with around 40 triangles, depending on how many vertices there are also (if there are lots of shared vertices then the speed should be better).

Here is an xwing test model that is 34 triangles and runs at ~18.5fps:

(http://img.removedfromgame.com/imgs/polytest36.gif)
Title: Re: solidFRAME v1.0b released
Post by: Xeda112358 on December 04, 2012, 04:31:03 pm
haha, really cool o.o Is this going to have documentation for using this as an engine at some point? It would be cool to have a program that contains a larger number of vertices and edges that it can basically feed portions of to this. I think we might be able to get some decent 3D RPGs this way. About how much memory does it take up to define 256 triangles?
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 04, 2012, 04:40:49 pm
Sure thing! I had plans on turning the engine into a lib that can be accessed by other programs so that people can make use of the 3D routines. (xLIB3D anyone? lolol just kidding :))

This will have to happen after i have at least fixed the back-face culling and implemented polygon clipping (which will unfortunately be a little speed hit :S).

This is a demo with 9 cubes (12 polygons each, so 108 triangles for the 'world') all translated into 16-bit space, running at around 17fps with free movement. I have a basic 'level-of-detail' system running where the number of polygons processed for any particular 'model' is dependent on its distance from the camera. This gives a bit of a speed boost and should allow for more complex scenes:

(http://img.removedfromgame.com/imgs/polytest20.gif)
Title: Re: solidFRAME v1.0b released
Post by: Xeda112358 on December 04, 2012, 04:46:58 pm
Sure thing! I had plans on turning the engine into a lib that can be accessed by other programs so that people can make use of the 3D routines. (xLIB3D anyone? lolol just kidding :))
I think you should do this :D My thoughts were to make just a simple tilemap, but have each tile be a 3D object. (I spent almost all of last night thinking of how awesome this would be with an RPG). Basically, this would help make RPGs that can have different vantage points that can be moved from birds-eye to some other angle (like ground view :D) I think you could totally make an xLIB 3D and have a command for a 3D tilemap !

EDIT: Regardless, I might try to come up with some way to let BASIC programs use this.
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 04, 2012, 04:59:46 pm
The only issue i would have with that is probably the fact that there is no texture mapping so to speak, so you cant really have 3D tiles other than tiles filled with a pattern? This would still be pretty cool imo :).

Also to answer your other question, its 5 bytes per face/triangle. But 3 of those bytes are a vertex index, which are another 3 bytes each. Vertices are often reused in a 3D model which means that the size is not fixed, but related to how 'reusable' the vertex list is ... if that makes sense lol.
Title: Re: solidFRAME v1.0b released
Post by: Xeda112358 on December 04, 2012, 05:10:51 pm
Yeah, that makes sense. Also, I realise that the grayscale aspect would be tough to do in a BASIC program, but simple textures are all that would be needed for a calculator. I am thinking that each tile represents a drawing, then you can load the drawing at the given coordinates. The drawings couldn't be too complicated, but even attaining 1 to 3 FPS to render a map would be awesome.
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 04, 2012, 05:21:15 pm
So will this be for a realtime scene? Or to render a tilemap from a given perspective and then do stuff, like a battle or something?

Though i do have a mode7 engine lying around that might do the trick? It would have to be amended to take out some of the accuracy shortcuts (that were used for speed):

(http://img.removedfromgame.com/imgs/m7_2.gif)
Title: Re: solidFRAME v1.0b released
Post by: Xeda112358 on December 04, 2012, 05:23:13 pm
I wasn't thinking of doing anything realtime. Just render and walk around, battle or whatever. Probably the battle engine would have some more realtime graphics, though.
Title: Re: solidFRAME v1.0b released
Post by: TIfanx1999 on December 05, 2012, 07:04:10 am
Hmmm, you guys know what I am thinking? tr1p1ea + Xeda teamup== epic win. :D
Title: Re: solidFRAME v1.0b released
Post by: Xeda112358 on December 05, 2012, 07:26:01 am
XD I think we would both need a decent amount of free time. However, if I finish up an RPG someday, it could definitely act as a model/mockup and put us almost half way there :) Then we would only need to worry about graphics and optimising.
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 05, 2012, 04:01:49 pm
lol yeah i always have a hard time finishing stuff. When i get free time ill see what i can do about a proof-of-concept to see if something is even possible at all.
Title: Re: solidFRAME v1.0b released
Post by: Xeda112358 on December 05, 2012, 05:03:23 pm
Yeah, I have the same problem with finishing things. The only things I ever actually finish are tiny projects or simple projects. I'm pretty bad at finishing games unless I can do it all in one sitting.
Title: Re: solidFRAME v1.0b released
Post by: Spenceboy98 on December 05, 2012, 05:43:47 pm
Here is a shape that I found online and converted:
(http://img.removedfromgame.com/imgs/Shape.gif)

Another shape I converted(a man):
(http://img.removedfromgame.com/imgs/Man.gif)
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 05, 2012, 06:44:17 pm
Cool, the man looks good. Do you know how many polygons those are?

Also can i get a copy of the 1st model, there seems to be something funny going on with it?
Title: Re: solidFRAME v1.0b released
Post by: Sorunome on December 05, 2012, 07:53:46 pm
wow, that is looking pretty cool!
CalcGL, here i come :P
Title: Re: solidFRAME v1.0b released
Post by: Spenceboy98 on December 05, 2012, 08:33:25 pm
Cool, the man looks good. Do you know how many polygons those are?

Also can i get a copy of the 1st model, there seems to be something funny going on with it?

I don't know how many faces/vertices there are, but I attached the files.
Title: Re: solidFRAME v1.0b released
Post by: Xeda112358 on December 05, 2012, 08:36:46 pm
Cool, thanks for making some examples for us to look at :3
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 06, 2012, 07:33:00 pm
I implemented the better sorting technique and gained over 1fps for the dark link model, about a 14% increase which is pretty good imo :). (also fixed some bfc issues too).
Title: Re: solidFRAME v1.0b released
Post by: Spenceboy98 on December 06, 2012, 07:36:03 pm
I implemented the better sorting technique and gained over 1fps for the dark link model, which is pretty good imo :). (also fixed some bfc issues too).

You gonna upload the new version, or are you gonna wait until you make a bigger update?
Title: Re: solidFRAME v1.0b released
Post by: tr1p1ea on December 06, 2012, 08:02:45 pm
I might fix a few other things first then ill release an update.

I was also thinking about hosting a model repository if anyone thinks that is a good idea?

Changelog so far:
- fixed polygon tearing issue
- added polygon clipping
- sped up sorting
- sped up transform operations
- updated obj converter to allow for 'double-sided' polygons

Ive also messed with the engine a little, here is a test of 9 x-wings (14 faces, 18 vertices) floating around in 'space'.

(http://img.removedfromgame.com/imgs/0-polytest41.gif)