Do you model in code?

Blitz3D Forums/Blitz3D Programming/Do you model in code?

BlackD(Posted 2004) [#1]
For a few weeks now I've been working on a simple 3D modeller that exports to Blitz3D sourcecode. At the moment I'm wondering - how many people here create models in code regularly? I know I do.. but I'm only one. :) Even if I'm the only person who uses this, I'm happy - but I'm just curious how many other folk would find this useful.

Basically, you draw surfaces, then manipulate textures on the surfaces, then export plain old Blitz3D source code for the model as you see it. No bones or anything - you won't be using it to animate characters. :) However, it's great for houses, bridges, trees, walls, etc.

Yeah, i realise theres lots of other simple modellers out there, but this one is simply for a niche market - those people who use Blitz3D to model, or who want to churn out simple model very quickly. Maybe I'll include B3D export sometime down the track but I don't see much use for that considering who would be using it.

Anyhow, if you model in Blitz3D (usually using addsurface, addvertex, add triangle, etc) commands, then you'll likely find this program making it a lot easier. Its still a few weeks out (though I'm sure it'll be out before HalfLife 2 ;)) but want to gauge interest.

+BlackD


Damien Sturdy(Posted 2004) [#2]
id be interested, VERY interested. ive written my own obj exporter before (no, not the standard obj. I then redesigned to 3do, then discovered that existed too. d'oh!)... id love the export bit!

IM always creating stuff automatically in code- Quad2 has a random track generator that does some pretty neat tracks. it would be nice to have them externally saved so that any "rnd" inconsistencies can be sorted, for example


CodeD(Posted 2004) [#3]
You could call it B(3D)Save.
heh...nobody got that...
;)


BlackD(Posted 2004) [#4]
yeah.. all us old QB'ers did. ;)

Actually, I was going to call it Quick'N'Easy 3D. The most cheesy name ever! :) The reason I like "QNE 3D" as a name, is cause it reminds me of "QME 3D" - The old (and very basic) Quake Model Editor.

+BlackD


BlackD(Posted 2004) [#5]
id be interested, VERY interested. ive written my own obj exporter before (no, not the standard obj. I then redesigned to 3do, then discovered that existed too. d'oh!)... id love the export bit!

mm.. it exports FROM the modelling program to Blitz3D sourecode. Ie - it generates the sourcecode for the model. What you're looking for is code to save a mesh to data. I think there's a few examples around for that.

+BlackD


Damien Sturdy(Posted 2004) [#6]
nope, i got my mesh saving code done- I just went off on a tangent- Id like the source code part for different reasons- my main use would prolly be for saving loaded meshes into sourcecode as includes.(my stuffs usually tiny).. and exporting created meshes to blitz code so i dont have to keep running create commands :/

And yup, We Qbasic Progers would get that Bsave, CodeD... I use qbasic bsave data in Den Bros 3- I wanted to use the original media :D


Stevie G(Posted 2004) [#7]
I do just about all my modelling in code and use simple load and save functions to keep things tidy. Some day I'll get round to using one of the free modellers available. But as far as I'm concerned you don't need great models to make a good 3d game. I'm more into gameplay than photo realism!

@BlackD ... I'd be interested to see what you've made here :)


Damien Sturdy(Posted 2004) [#8]
Precisely, Stevie... i cant model, but i DO focus on gameplay. Something thatl get them playing it in the first place!


Craig H. Nisbet(Posted 2004) [#9]
There should be a contest for blitz to make a game were all the content created is the coded(no packed resourses). And entire procedurely generated game.


Stevie G(Posted 2004) [#10]
That is definately a good idea!! ..... here's hoping :)


puki(Posted 2004) [#11]
I've just started to model my own cubes and pyramids in code - I think I should be able to comfortably win this one.

Bring it on you light-weights.

"Uncle puke" is ready to large.


REDi(Posted 2004) [#12]


I wrote this about a month ago, not fully tested but I think its okay.

It creates an include file from an existing mesh, you can then create the mesh by calling the function in your code.

EDIT - just realized that it uses a pb function to shorten the filename to a function name, i have commented it out so you might want to write your own "getfilepart" function or just change the function name manually.


Koriolis(Posted 2004) [#13]
There should be a contest for blitz to make a game were all the content created is the coded(no packed resourses). And entire procedurely generated game
I like the idea, a lot. It will be hard to define what's "packed resource" though. As soon as you create something procedurely it *is* packed resources. Somewhat more manual yes, but still. We'd have to find some clear and undisputable definition. Any idea?


REDi(Posted 2004) [#14]

As soon as you create something procedurely it *is* packed resources



Code is code, is it not? :)


puki(Posted 2004) [#15]
Can we not just do this with surface (AddVertex/AddTriangle stuff) commands or, at least allow that stuff to enter?


REDi(Posted 2004) [#16]
Sorry I should have read a bit more of this thread before I posted that, I didn't realize you wanted to do a coding compo.

But if you want to include models as code then that will do the job for you.

BTW the function above uses data statements to store vertex and triangle stuff, so it'll be clear who's cheated in a compo.


puki(Posted 2004) [#17]
Where's this compo then?

I am going to constuct a battleship out of code and slaughter all who face me with one foul swoop of my Large.


Ricky Smith(Posted 2004) [#18]
I think its an interesting idea and theres no reason you can't write bones as well - they're just additional nodes.
Where it would really come in useful is if you want an exe without media - especially if you could do some procedural texturing ! However I imagine the source generated would be HUGE !


BlackD(Posted 2004) [#19]
lol - there is no competition YET. Maybe there should be, but that isn't what this thread is about.

@PAPA - Yeah, mesh2code is nice, but you've got to already have the model (or have to have already created the mesh in code, in which case its redundant :)). Some people have a lot of trouble creating models in current modelling software, this program simply makes that process simpler.

@KORIOLIS - Anything created in code is not considered a packed resource. If you append a texture.png to an exe - that's a packed resource. If you CreateTexture() then draw everything to it in code, that wouldn't be a packed resource.

+BlackD


Andy(Posted 2004) [#20]
>Do you model in code?

Yep, I couldn't model to save my life using a specific program. But the more I work on making the models in code, the better I get... I still need paper for the general proportions, but when I first get to the keyboard, I can pretty much make it in one go.

Andy


REDi(Posted 2004) [#21]
@BlackD Sorry m8 I was responding to Cygnus post
id love the export bit!

My bad


BlackD(Posted 2004) [#22]
Speaking of a competition for games without packed resources, check this out:

http://www.scene.org/file.php?file=/demos/groups/sanction/snc_omni.zip&fileinfo

Now, the music IS packed, but the textures/mesh/sprites are all generated in code. The entire EXE is only 4KB. Literally the best 4K demo I have EVER seen. Whats more, its DOS (though works in Windows) which means its not DirectX.. the 3D engine is also in the 4KB.

100% Recommend everyone download this and be amazed. :)


Koriolis(Posted 2004) [#23]
Code is code, is it not? :)
Nope. Once compiled everything is just data. I guess a bunch of DrawPixels is eligible as plain code too? What if I generate a huge function that outputs every single pixel of a given image? Isn't that a packed resource? Isn't that also plain code (though it completly defeats the purpose)?You see the problem?
I guess the best solution is to simply limit the final exe size, like for the above demo. I don't see any critaeria that would be more objective.


Stevie G(Posted 2004) [#24]
How do we go about kicking off this comp? Personally I'm not really that interested in prizes so how about something similar to the model comp that seems to be going on in the Art Showcase .. but with a longer ( 2 week ? )deadline?


puki(Posted 2004) [#25]
Yeh, I want to enter this (with a real entry).