• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

False Lighting of New Models

Hi
No idea <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" /> , I've been trying for months.

What have you been putting for the texture path in the vrml export options.....where the texture is in Maya or the game? which should it be?

But one thing Chris Roupe said, was that the model I asked him to look at had no texture coordinates.
But in Maya the texture was correctly positioned on the model.

damski.
 
I tried a few, but then realised that TOOL uses another syntax (VRML 2 ?) than the export filter in Maya 5 (VRML 1 ?)
So i changed it via a text editor:

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>#VRML V2.0 utf8
Shape
{
appearance Appearance
{
material DEF initialShadingGroup
Material{diffuseColor 1.0 1.0 1.0}
texture ImageTexture{url "boat.tga"}
}
geometry IndexedFaceSet
...</div>
Thats what TOOL produces, so i changed the output of Maya into that style. (The <b>texture ImageTexture</b> part is
the important one.)
But to no avail! When i import it again, i get that stupid MissingTexture.tga, and an all brown boat.
The texture path in TOOL is set to the directory othe boat.gm is, as i use that for imtermediate storage of the tga file.

Do i need to include the boat.tga.tx file as well?


greetings, sbremer
 
As far as I know, the models that use "TextureMissing.tga" do work ingame. Only, since sbremer found out the texture doesn't show on the model in the GM Viewer, the ingame model probably is missing that texture too. As a workaround, how about you HEX-Edit the GM file and change "TextureMissing.tga" into "YourOwnTexture.tga" and rename the texture it should use to that?
 
Tried to rename, but you need to adjust the overall text length stored in the file, and then there are offsets used in the gm
file you need to adjust to the changed string area, or you get a complete mess.

Or you rename the texture, so it got the same amount of characters in its name.

Edit: I just think TOOL can't import VRML 1 files from Maya 5 properly.

greetings, sbremer
 
Indeed you do need to have the same amount of characters in the name, but like you point out, changing the texture's name would solve that. And 15 characters allows you quite a lot of possibilities for the texture name that can be used, so that wouldn't be too much of a problem, would it? <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Of course, not. But it is somewhat annoying.

But i have to test how it works, when using 3DS Max.

greetings, sbremer
 
<!--quoteo(post=256878:date=May 13 2008, 01:56 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ May 13 2008, 01:56 PM) <a href="index.php?act=findpost&pid=256878"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->As far as I know, the models that use "TextureMissing.tga" do work ingame. Only, since sbremer found out the texture doesn't show on the model in the GM Viewer, the ingame model probably is missing that texture too. As a workaround, how about you HEX-Edit the GM file and change "TextureMissing.tga" into "YourOwnTexture.tga" and rename the texture it should use to that?<!--QuoteEnd--></div><!--QuoteEEnd-->


I don't think that works.... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> I agree with SBremer above, in that TOOL does the "TextureMissing.tga" assignment if the texture isn't assigned to the model in a way that it registers with TOOL. I think there's some reference to this in the "Help" document in TOOL.

Assigning textures in Blender appears to work pretty well with TOOL, as the models I've been working on recently have textures showing up before and after the importing into TOOL process. ( with the wierd lighting results... <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" /> ) Assigning a texture in Blender is a little confusing, especially when you are trying to assign two textures to one model, but I know it works cause I've done it.
 
<!--quoteo(post=256936:date=May 14 2008, 08:16 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ May 14 2008, 08:16 AM) <a href="index.php?act=findpost&pid=256936"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It might indeed not work, but it's worth a try, isn't it?<!--QuoteEnd--></div><!--QuoteEEnd-->

I'm sorry Pieter, <img src="style_emoticons/<#EMO_DIR#>/blush.gif" style="vertical-align:middle" emoid=":eek:ops" border="0" alt="blush.gif" />2 you're right, it is worth a try, and I left out that I already tried it.

It's a little more complicated than changing the line in the hex editor because the modeling program assigns the texture to points in the "unwrapped" mesh, and if the texture isn't assigned so that TOOL recognizes it, then TOOL, by default, applies Missing Texture for the model's material.

Your point, however, is still very valid because trying things with the various tools we have is the only way we actually learn how to use them. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />

Tell you what, meet me at the Douwesan Waterfall, I have a keg of Ol' snakebite that I borrowed from Skull that I want you to help me hide the evidence. <img src="style_emoticons/<#EMO_DIR#>/beer2.gif" style="vertical-align:middle" emoid=":beer" border="0" alt="beer2.gif" />
 
I did try 3DS Max, i used it before, so i am not completly new to that program. But it had a lot of problems,
trying to smooth a models vertex normals.

The TOOL does not export normals into the VRML file! And Max automatically uses facet normals and wont let me smooth normals at all.
When importing the .obj file into Max (Yes, indeed, gm viewer messes that up), there are normals and i can smooth them as i like.

Max does something more, i don't like. When importing the vrml file, it "explodes" the mesh in such a way, that for every polygon there are
three independant vertices. If there are 10,000 triangles, it creates 30,000 points, though maybe 12,000 vertices would suffice.
(Whenever there is smooth shading, meaning there are averaged vertex normals, these vertices are equal and can be shared between
the faces.)

Whenever i try to use the smooth modifier, it actually does nothing!
Does someone know, what i am missing at this point, the vrml file got no normals and the messed up obj file can be repaired and smoothed
without problem.

When exporting x files, normals are written, so i presume, that there are normals in the .gm files at all.

greetings, sbremer
 
You can merge vertexes that are very close together back into one in 3DS MAX. I also observed the problem you experienced, but doing this would solve it. There should be some sort of "collapse vertexes" option. It's been a long time since I did any 3D modeling though, so I don't quite remember where to find that option.
 
Yes, thank you. That actually works. But i find it difficult to select the vertices which should be melted and leave those,
i like to be separate, so i can get smoothed parts and hard edges, alike
All that work is allready done. And you need to redo it.
Well, might make no difference, you may be i need to correct those parts of the mesh, anyway.

greetings, sbremer
 
You can just merge <i>all</i> vertices that are close to each other. You can get hard edges by assigning one vertex to one smoothing group and the other vertex to another smoothing group and make sure they're not assigned to the same smoothing group. No need having several vertexes at the same spot for that.
 
Hmm... interesting. As soon as I'm able, I'll look into this solution. And, yeah, MAX does detach shared vertexes, so that every poly has its own set of vertexes, but as far as I know, every program does that - it seems to be the trait of vrml itself, I think.
 
To be able to show the model in flat shaing mode, it is neccessary to have independend points for all faces.
You then need to weld them back again, the get the smoothed look, but i don't know whether Max does this
or the vrml export of The TOOL. They are not stored that way in the gm file.
And i don't know why i have to re-weld them to be able to smooth the normals, there is no need for this.

I actually managed to get the boat into Max, rearranged the normals, smoothed some and kept some hard edges.
Then reimported the model into the game again.
The changed normals do appear ok in the game, so i assume they were correct in the first place, there is no
big difference though. The model is still not correctly lit.

Looks ok, when it's day, but is definitly to bright as soon as it gets darker. All other models and ships seem to be correctly
lit by a darker light source from above, but the boat looks like it is lit by some other light source directly in front or the
center of the boat, and it does not change when the day time changes.

There seems to be another issue with the lighting, i haven't figured out yet.

I think i should look deeper into the gm file, to find out wheter there is something wrong with it.

greetings, sbremer
 
Thanks a lot for working on this. It would be awesome if we could finally figure this one out.
I think it's fair to add you to our modders user group. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />
 
Thanks, i appreciate that.

I really like the build mod, so i think it is neccessary to fix this.
After a closer look at the TOOL, i think there might be a problem with it writing the imported
model to a gm file.
It seems, the programer did not know any details of the file structure, i will try to figure out
wether there are same flags or something else causing this lighting issue.

And i am thinking about a solution to the .col files for locations.

greetings, sbremer
 
Cool! I hope you figure it out, so that we get a better version of the tool. We also need something to generate shadowfiles, that is why some models are a bit out of place.
 
I thought these were the .col files, am i right?

Islands and locations got them. There are files for day, evening, morning and night.
When i'm right, they are just addidtional colour values for every vertex. They had been calculated
with some kind of ambient occlusion algorithm, thus containing shadows and lights and general
colours for Walls, houses and the like.

When we are finding an easy way to produce them, every added location should look perfect.

greetings, sbremer
 
Back
Top