Page 9 of 15

Posted: Mon Feb 02, 2009 10:17 pm
by DaddyHoggy
:shock: 8) Fantastic!

I expect the reverse normal to be used lots by fellow Ooliters! Fantastic trick. Bravo.

Posted: Mon Feb 02, 2009 10:29 pm
by JensAyton
Scarecrow wrote:
Unless... some of my OBJs had variables in that were supposed to be integers (or at least the Python script is expecting them to be integers) but were in fact assigned the value 'off' - this caused the script to have a paddy and strop off.
This is actually a bug in the script. I reported it a few years ago, but it didn’t matter then because everyone was using Wings3D. :-)

Specifically, in obj files the statement “s off” is equivalent to “s 0”, but the script only accepts the second form.

Edit: There is now a fixed version of Obj2DatTex.py at http://svn.berlios.de/svnroot/repos/ool ... onverters/.

Posted: Mon Feb 02, 2009 11:05 pm
by Scarecrow
Thanks, Ahruman.

Well, that's done! The Galcop Viper is now replaced by the Seraphim, including repositioned flashing lights and correct thruster and weapon positioning (except for the missile. I didn't realise it had a missile - so that launches from the Radar - I doubt you'd ever notice ingame anyway).

Image

Now for the shaders...!

Posted: Mon Feb 02, 2009 11:46 pm
by gogz69
I never cease to be amazed by the work all of you guys are capable of, this model is stunning!

Great job Crow!

Posted: Tue Feb 03, 2009 11:03 am
by Scarecrow
In the spirit of the intended blog-like nature of this thread, I should point out that I had problems creating the OXP.

I read the Wiki and discovered that all I need to make the ship work is a folder with the naming convention xxx.oxp - where xxx is the name of my oxp.

In that folder I needed a models folder with my new DAT models in. A textures folder with my new PNG file in and a config file with a shipdata.plist in.

The shipdata.plist only needed to include the data fior my new ship.

Okay, so far so good.

I copied the viper data for the galcop viper and added my subobjects using the commands listed in the wiki shipdata.plist page and nothing happened.

For some reason, even though I held down shift while it started up to clear the cache, Oolite seemed to completely ignore my oxp :(

After some minor hair-tearing I decide I was doing too much too soon. So I deleted the viper data and copied the buoy data exactly and simply edited the model data entry so that it used my seraphim_main model instead.

BINGO! It worked.

So then I added a subobject that included the canopy.

BINGO! That worked.

So then I added the rest of the subobjects.

Huzzah! That all worked properly.

I realised at some point that I'd had some semi-colons missing in my subobject commands and so the plist simply wasn't working.

Once I'd gotten the buoy to be replaced, I went back and redid the viper data, making sure all the semicolons were present and it worked fine.

I then positioned the weapon, afterburner and flashing lights based on the existing variables in the plist.

Crow

Posted: Tue Feb 03, 2009 11:15 am
by Thargoid
In situations like that where things don't appear that you are expecting, it's always worth looking in the logs. In those you normally get errors and warnings reported which let you know quite what it choked on and where you need to sort things.

Not always, but much more often than not, and definitely worth a look in solving such mysteries...

Posted: Tue Feb 03, 2009 11:34 am
by Commander McLane
My suggestion is the same as Thargoid's: Before having a nervous breakdown, or frantically yelling for help :wink: , just look in the logfile.

Actually strike that and replace with: Always look in the logfile. On my computer I have the logfile open in a window next to my Oolite window all the time. This way I don't only immediatly see all errors I have made, but also can inform other OXPers about the errors they made when the wrote their OXPs without consulting the log.

Sometimes even better than the log file is the JS-console. If you're on a Mac, it is integrated in Debug.oxp. Once you've started working with Debug.oxp and the console you won't know anymore how you ever could live and script without it. Seriously. Just one example: To what a hassle you went just to make your ship appear. And then it doesn't even appear as a ship, but as a buoy. With Debug.oxp it's a piece of cake: You just launch and choose 'Create Ship...' from the new drop-down menu named 'Debug'. A small box opens and asks you to type the role of the ship you want to create. Do it, and the ship appears immediately within 10 km of your current position, in all its beauty. And if you want another one, just choose 'Create Ship...' again, as often as you want.

And the console is the place where you (a) find debugging information, error messages, and the like, with valuable extra information compared to the log, and (b) can type all JavaScript-commands with immediate effect, so you can manipulate the Ooniverse and anything around you on the fly. In-val-u-a-ble! :!:

If you have (and know how to use) these instruments, OXP-understanding and OXP-creating immediatly becomes twice as easy. :wink:

EDIT: fixed stoopid typo

Posted: Tue Feb 03, 2009 11:38 am
by another_commander
Commander McLane wrote:
My suggestion is the same as Thargoid's: Before having a nervous breakdown, or frantically yelling for help :wink: , just look in the logfile.

Actually strike that and replace with: Always look in the logfile. On my computer I have the logfile open in a window next to my Oolite window all the time. This way I don't only immediatly see all errors I have made, but also can inform other OXPers about the errors they made when the wrote their OXPs without consulting the log.

Sometimes even better than the log file is the JS-console. If you're on a Mac, it is integrated in Debug.oxp. Once you've started working with Debug.oxp and the console you won't know anymore how you ever could live and script without it. Seriously. Just one example: To what a hassle you went just to make your ship appear. And then it doesn't even appear as a ship, but as a buoy. With Debug.oxp it's a piece of cake: You just launch and choose 'Create Ship...' from the new drop-down menu named 'Debug'. A small box opens and asks you to type the role of the ship you want to create. Do it, and the ship appears immediately within 10 km of your current position, in all its beauty. And if you want another one, just choose 'Create Ship...' again, as often as you want.

And the console is the place where you (a) find debugging information, error messages, and the like, with valuable extra information compared to the log, and (b) can type all JavaScript-commands with immediate effect, so you can manipulate the Ooniverse and anything around you on the fly. In-val-u-a-ble! :!:

If you have (and know hat to use) these instruments, OXP-understanding and OXP-creating immediatly becomes twice as easy. :wink:
Quote for emphasis. The debug console is truly an invaluable tool no OXPer should be without, regardless of the platform they are working on.

Posted: Tue Feb 03, 2009 4:37 pm
by JensAyton
Commander McLane wrote:
Just one example: To what a hassle you went just to make your ship appear. And then it doesn't even appear as a ship, but as a buoy. With Debug.oxp it's a piece of cake: You just launch and choose 'Create Ship...' from the new drop-down menu named 'Debug'. A small box opens and asks you to type the role of the ship you want to create. Do it, and the ship appears immediately within 10 km of your current position, in all its beauty. And if you want another one, just choose 'Create Ship...' again, as often as you want.
Just so non-Mac OXPers don’t feel left out: many of the Debug menu commands just issue JavaScript commands. For instance, Create Ship… uses: system.legacy_addShipsWithinRadius('whatever-role-you-specified', 1, 'abs', player.ship.position, 10000), which works fine in the cross-platform JS console. If you want to use it a lot, you can create a macro, like this:

Code: Select all

> :setM create system.legacy_addShipsWithinRadius(PARAM, 1, 'abs', player.ship.position, 10000)
> :create my-role

Posted: Wed Feb 04, 2009 1:44 pm
by Pangloss
I downloaded Debug, just for kicks & giggles. I can generate buoys by typing "buoy". How would I generate a Mall-Wart Griff Con Store? 8)

Posted: Wed Feb 04, 2009 2:03 pm
by Thargoid
Pangloss wrote:
I downloaded Debug, just for kicks & giggles. I can generate buoys by typing "buoy". How would I generate a Mall-Wart Griff Con Store? 8)
"buoy" is (one of) the role(s) of the buoy entity (look in shipdata.plist in the resources/config folder to see). So to generate a con-store, you'll need to look in the shipdata.plist file for the OXP with it in, find out what the role is for the con-store entity, and then :create constorerole, replacing constorerole with whatever the role is defined as.

The :create command macro above uses the role given as its parameter to spawn a ship with that role (so if you :create trader you'll get a random ship with the role trader as trader is a role shared between many entities, or if you :create oolite-thargoid you'll get a trunk thargoid warship as that role is unique to that entity)

With the small caveat that if there are any conditions etc also set up in the shipdata.plist, these will also need to be fulfilled before the store will appear.

Posted: Wed Feb 04, 2009 4:44 pm
by Pangloss
constore

constore

constore

CONSTORES EVERYWHERE!

Posted: Fri Mar 13, 2009 3:10 am
by aceshigh
the polycount mentioned in the beginning of this thread is for FACES or TRIANGLES?

When I export my ship from Sketchup, I get 191 faces and 464 triangles.

Posted: Tue Mar 02, 2010 2:52 pm
by Scarecrow
The value was in triangles. Often referred to as polys - though poly can mean a face with any number of sides.

Aaaaaanyway, it's been a very, very long time but my mind has flitted, butterfly-like once again over to this unfinished Seraphim oxp.

I got quite far into the project, indeed, I actually had a workable OXP but I gave up in a huff when it came time to look at shaders. I just don't even know where to start with them. I've looked at Griff's examples and the various tutorials and wiki entries. I've looked at them several times now and it's just row upon row of incomprehensible maths.

I'm used to Material editors in 3D programs that give me slots. All I need to do is tell it which diffuse texture to use, which normal map texture to use, which specular texture (or value) to use. Sadly, it doesn't seem that simple in Oolite. Maybe if I can figure it out I can write a total newbs tutorial.

But, before I can do anything, I find that after all this time, Oolite is no longer functioning! I installed version 1.73.4 and all I get is this:

Image

Anyone got any ideas what's going on?

In the mean time, I'll try updating my drivers but I'm not convinced that that's the problem.

Crow

Posted: Tue Mar 02, 2010 3:01 pm
by Griff
Hi Scarecrow, great to see you back, we're all still gagging to get our hands on your oxp!
Have a look here regarding your graphics problem
https://bb.oolite.space/viewtopic.php?t= ... c&start=20

A_C's fix of adding the -nosplash switch to your oolite shortcut fixes it though, so maybe no need to update your drivers