My first ship...
Moderators: winston, another_commander, Cody
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
oops, sorry DH, i hadn't read the thread properly, i was lolling at the cargo pod bigger than the ship bit but didn't twig it was because the ship was already converted.
yes, i think there was copy of the script.js still accidentally left in the thargoids oxp, just copy that into your oxps config folder, edit it and change the role = bit so it matches your ships role in your oxp's shipdata.plist
yes, i think there was copy of the script.js still accidentally left in the thargoids oxp, just copy that into your oxps config folder, edit it and change the role = bit so it matches your ships role in your oxp's shipdata.plist
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
OK, so thanks to Griff, Tycho 8 is in game.
But - lighting seems to be very odd - I've checked in AC3D and all the normals appear to be facing outwards and at the angles I'd expect them to be but this doesn't appear to be true for the model in-game (note the cylindrical spikes on the end of the wing tips - uniformly lit)
On the other side its even worse - two surfaces appear to be completely missing around where the wings enter the body of the ship, but again in the original .ac model they appear and the normals appear to be facing outwards.
Have I done something wrong - or is this a potential conversion issue from AC3Ds conversion of native .ac to .obj file and subsequent conversion to a .dat?
Final (semi-related) question regarding lighting - is there a way to get Oolite to smooth the shading between facets?
But - lighting seems to be very odd - I've checked in AC3D and all the normals appear to be facing outwards and at the angles I'd expect them to be but this doesn't appear to be true for the model in-game (note the cylindrical spikes on the end of the wing tips - uniformly lit)
On the other side its even worse - two surfaces appear to be completely missing around where the wings enter the body of the ship, but again in the original .ac model they appear and the normals appear to be facing outwards.
Have I done something wrong - or is this a potential conversion issue from AC3Ds conversion of native .ac to .obj file and subsequent conversion to a .dat?
Final (semi-related) question regarding lighting - is there a way to get Oolite to smooth the shading between facets?
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Hmmm, the more I look, the more facets seem to be missing...
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
There are several possible reasons. Gimmeh file!DaddyHoggy wrote:But - lighting seems to be very odd - I've checked in AC3D and all the normals appear to be facing outwards and at the angles I'd expect them to be but this doesn't appear to be true for the model in-game (note the cylindrical spikes on the end of the wing tips - uniformly lit)
(BTW, you can show normals in Oolite using the debug console: console.debugFlags = 0x100, or in 1.74 console.debugFlags = console.DEBUG_DRAW_NORMALS.)
In short, yes. In long, even more yes.DaddyHoggy wrote:Final (semi-related) question regarding lighting - is there a way to get Oolite to smooth the shading between facets?
Setting smooth to true in shipdata.plist will do this, but for all edges (or rather, all vertices). There is no threshold value.
To work around this, you’ll need to use smooth groups to define sharp edges. The impression I get is that AC3D is rather unsophisticated in this respect, but you can make use of those five materials you have. Open the OBJ file in a text editor, find each “usemtl” line, and define a smooth group with an “s <number>” line, like this:
Code: Select all
usemtl acmat_0
s 1
f 1/2/3 4/5/6 7/8/9
...
E-mail: [email protected]
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
I may have lied about all the normals facing outwards (on the missing surfaces) having *really* checked the normals in AC3D, I will re-export and have another go.
Do you still want the .dat file to investigate why there's no shading on the cylindrical wing tips? (these normals definitely radiate outwards as you'd expect/hope - I've triple checked).
With regards the nose tip - early on I combined all the little surfaces to a single vertex to get rid of them - and its not a reversible process (I've also discovered - never use the merge function in AC3D - this is also a one-way trip )
I don't use the debug console (this is an oxp yes?) - as I used to mainly play Oolite on my Ubuntu machine and I never got it to work. But if I'm going to start building OXPs this is obviously going to have to change...
Re: smoothing - the last time I exported the model I baselined it back to plain white (default) - so all those extra materials disappeared (and now it's merged I can't reapply this on the individual groups because they don't exist any more).
I think - now I know how to use AC3D (enough to teach my students how to use it) my next ship will be in Wings3D...
Do you still want the .dat file to investigate why there's no shading on the cylindrical wing tips? (these normals definitely radiate outwards as you'd expect/hope - I've triple checked).
With regards the nose tip - early on I combined all the little surfaces to a single vertex to get rid of them - and its not a reversible process (I've also discovered - never use the merge function in AC3D - this is also a one-way trip )
I don't use the debug console (this is an oxp yes?) - as I used to mainly play Oolite on my Ubuntu machine and I never got it to work. But if I'm going to start building OXPs this is obviously going to have to change...
Re: smoothing - the last time I exported the model I baselined it back to plain white (default) - so all those extra materials disappeared (and now it's merged I can't reapply this on the individual groups because they don't exist any more).
I think - now I know how to use AC3D (enough to teach my students how to use it) my next ship will be in Wings3D...
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
smooth = "true"; in shipdata.plist
doesn't do much for the ship's main hull and has made a difference to the nacelles and wing tips...
(haven't re-exported so some faces still missing)
doesn't do much for the ship's main hull and has made a difference to the nacelles and wing tips...
(haven't re-exported so some faces still missing)
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
OBJ file would be more useful.DaddyHoggy wrote:Do you still want the .dat file to investigate why there's no shading on the cylindrical wing tips?
E-mail: [email protected]
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
I'm not familiar with this Smooth element in the shipdata .plist. How exactly is it scripted? And is there a particular point in the plist it should go, eg after the Model or Material data? Could you possibly give an example please?Ahruman wrote:In short, yes. In long, even more yes.DaddyHoggy wrote:Final (semi-related) question regarding lighting - is there a way to get Oolite to smooth the shading between facets?
Setting smooth to true in shipdata.plist will do this, but for all edges (or rather, all vertices). There is no threshold value.
Commander Smivs, the friendliest Gourd this side of Riedquat.
The keys within a ships entry in shipdata.plist can be in any order you like. It depends on writing style, some people do lists in alphabetical order, some grouped by function (weapons keys together etc) and some just haphazardly. It doesn't matter at all, the game parses the plist just the same.
As for the smooth entry itself, details are here (now we have a wiki of sorts back).
As for the smooth entry itself, details are here (now we have a wiki of sorts back).
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
OK, problem is that's in XML and I tend to use Open Step. Should it be something like:-Thargoid wrote:
As for the smooth entry itself, details are here (now we have a wiki of sorts back).
Code: Select all
smooth = yes;
Commander Smivs, the friendliest Gourd this side of Riedquat.
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
smooth = "true";
Will do the job.
Will do the job.
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
Either will do.
The trunk shipdata.plist itself uses =yes, except for the ball turret which uses ="yes" (presumably by mistake). =1 should also work I think.
The trunk shipdata.plist itself uses =yes, except for the ball turret which uses ="yes" (presumably by mistake). =1 should also work I think.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Facet normals corrected:
smooth = "true";
smooth = "false";
Nacelles and wing spikes only lit "properly" when smooth is set to true.
Ahruman - if I can get to my box account I'll put obj file there share the link - standby...
smooth = "true";
smooth = "false";
Nacelles and wing spikes only lit "properly" when smooth is set to true.
Ahruman - if I can get to my box account I'll put obj file there share the link - standby...
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
I tried
and that does work too. It makes quite a difference as you can see from these two very similar shots of my Clipper. The top one is 'normal' the bottom smoothed.
Funny thing is I can't decide which is best!
Code: Select all
smooth = yes;
Funny thing is I can't decide which is best!
Commander Smivs, the friendliest Gourd this side of Riedquat.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Without shadow of a doubt the top one. Indiscriminately applying smoothing to a model with sharp corners may look nice from certain angles, but from others it will look awful. (For instance, if it’s heading towards the sun there will be a gradient from the front to the back in a way that makes no sense at all for a flat surface.) Just Say No.Smivs wrote:Funny thing is I can't decide which is best!
E-mail: [email protected]