Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
Team: Reddit Space Invaders
Rank: Director
Main: Charlie
Level: 5004

Joined: Mon Jan 30, 2012 9:43 pm
Posts: 55
Post Remodel of the escape pod, 688 polygons only
Lately I've been working on a little project where I go over some of the games models as well as reskin them for educational purposes. Im not a professional modder (not very talented either), and Im not sure how to assign materials in the sonata engine.


This is however my take on the escape pod.
Image

A little more effort than is visible lies behind this. I went off the original model, touching it up, removing holes, connecting vertices, made it a little more smooth, and ran it back and forth between maya and mudbox a few times. The result is a pod that looks more like a raft. A look that Im happy with. All with a low poly count (688).

I made use of the glow feature, and gave it 2 large tinted windshields. I dont know how to assign materials to the engine however, or how the materials are defined in the shaders, so its a bit lackluster. It would be awesome (!) to have a list or overview of the different materials specified in the shader and available for modelling, and also how to apply them, maybe for another time.


To change your pod to like this: download this (updated, triangulated and with normals)
Attachment:
escape_pod_custom.zip


zip archive attached to the post. Then, with the 3 files inside, place in your sonata folder like this:


the 2 jpg files need to be put in:
(sonata folder)...\Star Sonata 2\Content\Default\Textures\Ships

and the .obj file (the 3model rework with reskin coordinates) in:
(sonata folder)...\Star Sonata 2\Content\Default\Models\Ships


If you did all that correctly, you should be seeing this pod whenever you die ingame:
Image



PS: this is just a fun project for me, trying to learn a little more about 3d modelling and texturing, from a programming perspective. If any of the mods/devs want to use anything that I post here, feel free. Only thing better than making something, would be to get it seen :)

pps: the texture could be better and be more interesting than just green/black with a glowing windshield. That is not to say however, that it looks bad. Either way, this is the uv_snapshot for it, if anyone is interested in messing around with:


You do not have the required permissions to view the files attached to this post.


Last edited by Charliem on Wed Mar 30, 2016 7:58 am, edited 2 times in total.

Wed Mar 30, 2016 1:52 am
Profile
User avatar
Team: Eminence Front
Rank: Soldier
Main: The Crazy Game Master
Level: 3234

Joined: Wed Feb 11, 2009 3:15 am
Posts: 3652
Location: TARDIS, Time Vortex, Main Universe, Reality, Big Bang 2, Multiverse 1
Post Re: Remodel of the escape pod, 688 polygons only
The SS engine doesn't even know what a material is. You've got textures, normals, and glow. That's it.

_________________
Star Sonata is not ready for a release on Steam. See this topic for what we think should be done about it.
viewtopic.php?f=107&t=59132


Wed Mar 30, 2016 2:02 am
Profile
Team: Reddit Space Invaders
Rank: Director
Main: Charlie
Level: 5004

Joined: Mon Jan 30, 2012 9:43 pm
Posts: 55
Post Re: Remodel of the escape pod, 688 polygons only
then why does it have a texture ingame? the faces should be smooth, but they come out flakey looking. Maybe its an older solution to not having poly limits.


Are you sure the shaders dont have material presets? im certain neither the prawn or the absentis, or the isvasa have these flakey faces


Wed Mar 30, 2016 2:11 am
Profile
User avatar
Main: GodSteel
Level: 3170

Joined: Mon Oct 18, 2010 9:23 am
Posts: 272
Post Re: Remodel of the escape pod, 688 polygons only
Charliem wrote:
then why does it have a texture ingame? the faces should be smooth, but they come out flakey looking. Maybe its an older solution to not having poly limits.


Are you sure the shaders dont have material presets? im certain neither the prawn or the absentis, or the isvasa have these flakey faces

What you are talking about is smooth shading and it can be enabled/disabled in ship's mesh file.
Source: https://en.wikipedia.org/wiki/Wavefront ... _materials

Material files determine light reflecting properties of a surface (ambient color, diffuse color and specular color) and they are not used in SS at all. Instead, diffuse and specular are the same for all ships, but they differ based on suns and light sources in galaxy and ambient color is based on your ambient color slider in options. It's always in grey scale though.


Wed Mar 30, 2016 2:33 am
Profile
Team: Reddit Space Invaders
Rank: Director
Main: Charlie
Level: 5004

Joined: Mon Jan 30, 2012 9:43 pm
Posts: 55
Post Re: Remodel of the escape pod, 688 polygons only
Godsteel wrote:
What you are talking about is smooth shading and it can be enabled/disabled in ship's mesh file.
Source: https://en.wikipedia.org/wiki/Wavefront ... _materials

Material files determine light reflecting properties of a surface (ambient color, diffuse color and specular color) and they are not used in SS at all. Instead, diffuse and specular are the same for all ships, but they differ based on suns and light sources in galaxy and ambient color is based on your ambient color slider in options. It's always in grey scale though.



Interesting, I see the prawn has this info

"s 1" and "s off"


Like im writing my own shader for opengl on the side (a basic object loader) and ive had to design my own fileloader to do it. I wonder exactly how the s 1 and s 0ff influence the model. Hm I guess I should redo the windshields, make them smooth. How to locate them in the obj file tho lmao, I guess I need to make the parts seperate and manually combine them.

Is this why the newer ships come in seperate parts? To keep track of what parts to smooth or not?


edit: tweaking these values doesnt change anything tho. the faces will come out discolored either way (if you want to call it that).

How would you turn it off? in the obj file, to get the faces smooth looking, or not randomly discolored


Wed Mar 30, 2016 3:42 am
Profile
User avatar
Main: GodSteel
Level: 3170

Joined: Mon Oct 18, 2010 9:23 am
Posts: 272
Post Re: Remodel of the escape pod, 688 polygons only
Charliem wrote:
Is this why the newer ships come in seperate parts? To keep track of what parts to smooth or not?

Probably not, ships are usually divided if they have animated parts. From what I've seen in one of wattage.obj, the syntax for smooth faces is like that:
s 1
<list of smooth faces>
s off
<list of flat faces>


Wed Mar 30, 2016 4:12 am
Profile
Team: Reddit Space Invaders
Rank: Director
Main: Charlie
Level: 5004

Joined: Mon Jan 30, 2012 9:43 pm
Posts: 55
Post Re: Remodel of the escape pod, 688 polygons only
Godsteel wrote:
s 1
<list of smooth faces>
s off
<list of flat faces>


I found this in the prawn, and tried changing them for the escape pod. It didnt change anything however. Hm, maybe I made a mistake.

let me try again.


edit: I just realized, the obj file for the escape pod only has 2 values for each face. Im guessing vertice location and UV coordinate. Does the original escape pod not have vertice normals in the obj file? The prawn has 3 (like it should?)

Hm I dont think the escape pod even has specular shading.. can that be right? They optimized it out or something?


Last edited by Charliem on Wed Mar 30, 2016 4:32 am, edited 1 time in total.

Wed Mar 30, 2016 4:17 am
Profile
User avatar
Main: GodSteel
Level: 3170

Joined: Mon Oct 18, 2010 9:23 am
Posts: 272
Post Re: Remodel of the escape pod, 688 polygons only
Charliem wrote:
Godsteel wrote:
s 1
<list of smooth faces>
s off
<list of flat faces>


I found this in the prawn, and tried changing them for the escape pod. It didnt change anything however. Hm, maybe I made a mistake.

let me try again.

Blender exports smooth faces data iirc, so there should be no need to change anything manually. Idk if game does something with this data though :D


Wed Mar 30, 2016 4:32 am
Profile
Team: Reddit Space Invaders
Rank: Director
Main: Charlie
Level: 5004

Joined: Mon Jan 30, 2012 9:43 pm
Posts: 55
Post Re: Remodel of the escape pod, 688 polygons only
Godsteel wrote:
Blender exports smooth faces data iirc, so there should be no need to change anything manually. Idk if game does something with this data though :D



this is the thing

Charlie wrote:
I just realized, the obj file for the escape pod only has 2 values for each face. Im guessing vertice location and UV coordinate. Does the original escape pod not have vertice normals in the obj file? The prawn has 3 (like it should?)

Hm I dont think the escape pod even has specular shading.. can that be right? They optimized it out or something?


It seems the escape pod is different in that it doesnt provide vertice normals. How then can the engine calculate the shading from lightsources? When I input 3 values per face, it somehow gives out discolored textures, that just happen to look neat. I dont think this is smooth or non-smooth at all


Wed Mar 30, 2016 4:33 am
Profile
User avatar
Main: GodSteel
Level: 3170

Joined: Mon Oct 18, 2010 9:23 am
Posts: 272
Post Re: Remodel of the escape pod, 688 polygons only
Charliem wrote:
Godsteel wrote:
Blender exports smooth faces data iirc, so there should be no need to change anything manually. Idk if game does something with this data though :D



this is the thing

Charlie wrote:
I just realized, the obj file for the escape pod only has 2 values for each face. Im guessing vertice location and UV coordinate. Does the original escape pod not have vertice normals in the obj file? The prawn has 3 (like it should?)

Hm I dont think the escape pod even has specular shading.. can that be right? They optimized it out or something?


It seems the escape pod is different in that it doesnt provide vertice normals. How then can the engine calculate the shading from lightsources? When I input 3 values per face, it somehow gives out discolored textures, that just happen to look neat. I dont think this is smooth or non-smooth at all


If the normal vector for face is not explicitly given, it's calculated from order of vertices.
Say we have a triangle built on vertexes v0,v1,v2.
Attachment:
triangle.jpg


If you ask GPU to draw triangle and pass vertexes in clockwise order 0,1,2, then the normal will be pointed downward. If you pass them in counterclockwise order - 0,2,1 - normal will be pointed upward. Obj format always write vertices in counterclockwise order so there's no need to specify normals.

As for shaders in SS, I've spent plenty of hours modifying them and let me tell you one thing.
SS is complete mess. Generally there are 3 shaders used for rendering ships (for medium,high and vhigh setting), but some ships are rendered without using shaders at all. Some multipart ships are using shaders only for selected parts. Some stuff have completely messed up normals (like user bases). Just check out how ugly they are:
https://drive.google.com/file/d/0B9biyU ... sp=sharing

I just confirmed that pods are using shaders, so you must have messed up something.


You do not have the required permissions to view the files attached to this post.


Wed Mar 30, 2016 5:09 am
Profile
over 9000!
User avatar
Main: enkelin
Level: 5600

Joined: Wed Aug 01, 2007 12:28 pm
Posts: 11109
Post Re: Remodel of the escape pod, 688 polygons only
Cool, looks nice and probably no dev was ever going to redo the escape pod since it's so small. I hope they put your work in game.

_________________
Hi, I'm Anil, a long-time player turned developer. I am Star Sonata's lead content developer, which means that I run weekly dev meetings and make sure that any proposed changes to the game receive proper review before going live.

http://www.starsonata.com/features


Wed Mar 30, 2016 5:32 am
Profile
Team: Reddit Space Invaders
Rank: Director
Main: Charlie
Level: 5004

Joined: Mon Jan 30, 2012 9:43 pm
Posts: 55
Post Re: Remodel of the escape pod, 688 polygons only
So this is what ive learned, the vertex normal (vn), is a value that points 90 degrees out from the centre of 3 values, making up the polygon. Its just a value, like any other value, but it can be passed to the shader, along with the vertice locations, and thereby help the gpu with some calculations, if wanted. In opengl (idk how it is with microsoft) the polygon (face) wont draw the backside, to save memory I guess. The thing is, the vertice normal isnt there to tell the shader which side is up/forward, but to make it easier to calculate the reflection.

http://stackoverflow.com/questions/3557 ... not-jagged

Im just now reading about this, and I asked a related question on stackoverflow, around a month ago. Or, not directly related, but its about shading and how to make use of vertice normals.


I still cant wrap my head around all this, and I dont even have other things to worry about! But I know that the vertice normal is required to calculate specular shading, or light bouncing off a surface. Unless its calculated somewhere else ofc.

Like, does the shader for the escape pod, bounce light from sources at all? Because I dont think it does, ofc it draws the object on screen, but I dont know how it would do so without the vn info, info that is not in the original escape pod obj.


I bet you could have the draw method used by the pods class, apply a shader that another class uses.


Ofc the pod is using a shader, otherwise the gpu wouldnt know what to do. I bet you tho, that either the cpu is forced to calculate the vertice normal for each polygon (face) or the game just doesnt bounce light off the escape pod. Not that it matters much, every other obj ive seen has a vn value.


Is there a way to have the escape pod shader used with a larger ship (to see if it bounces light) or my updated escape pod (with vn included) with a larger ships shader.


Man, even talking about all this is making my head spin :cry: I cant imagine doing this for a living :cry:


Ill focus on another hull next time, and make sure It uses the information I input.


Last edited by Charliem on Wed Mar 30, 2016 5:59 am, edited 1 time in total.

Wed Mar 30, 2016 5:54 am
Profile
over 9000!
User avatar
Main: enkelin
Level: 5600

Joined: Wed Aug 01, 2007 12:28 pm
Posts: 11109
Post Re: Remodel of the escape pod, 688 polygons only
Can't you zoom in real close and fly next to a light source to see if the pod reflects any of it?

_________________
Hi, I'm Anil, a long-time player turned developer. I am Star Sonata's lead content developer, which means that I run weekly dev meetings and make sure that any proposed changes to the game receive proper review before going live.

http://www.starsonata.com/features


Wed Mar 30, 2016 5:58 am
Profile
Team: Reddit Space Invaders
Rank: Director
Main: Charlie
Level: 5004

Joined: Mon Jan 30, 2012 9:43 pm
Posts: 55
Post Re: Remodel of the escape pod, 688 polygons only
anilv wrote:
Can't you zoom in real close and fly next to a light source to see if the pod reflects any of it?


It does. The game must calculate its normals after the object is loaded somehow. Maybe the loader does it for objects without a vn value?

Like, I know you have normals to avoid this. I guess the loader doesnt mind doing a little extra work? 8)


It still doesnt explain why my model gets a slight discoloration tho :?:


Wed Mar 30, 2016 6:00 am
Profile
User avatar
Main: GodSteel
Level: 3170

Joined: Mon Oct 18, 2010 9:23 am
Posts: 272
Post Re: Remodel of the escape pod, 688 polygons only
Sorry, I don't really like writing in some1 else quotes but it's easier this way.

Charliem wrote:
So this is what ive learned, the vertex normal (vn), is a value that points 90 degrees out from the centre of 3 values, making up the polygon.
Normal vector is vector that is perpendicular to the plane basically.
Its just a value, like any other value, but it can be passed to the shader, along with the vertice locations, and thereby help the gpu with some calculations, if wanted. In opengl (idk how it is with microsoft) the polygon (face) wont draw the backside, to save memory I guess. The thing is, the vertice normal isnt there to tell the shader which side is up/forward, but to make it easier to calculate the reflection.
It would be impossible to calculate reflection without normal vector actually

http://stackoverflow.com/questions/3557 ... not-jagged

Im just now reading about this, and I asked a related question on stackoverflow, around a month ago. Or, not directly related, but its about shading and how to make use of vertice normals.


I still cant wrap my head around all this, and I dont even have other things to worry about! But I know that the vertice normal is required to calculate specular shading, or light bouncing off a surface. Unless its calculated somewhere else ofc.
True.

Like, does the shader for the escape pod, bounce light from sources at all? Because I dont think it does, ofc it draws the object on screen, but I dont know how it would do so without the vn info, info that is not in the original escape pod obj.
Normal vector can be easily calculated if you have 3 vertices.
change origin of second and third vertices to the first one and calculate cross product. In other words Vn = (v1-v0)x(v2-v0). Its that easy. It's done automagically if you don't specify normal vectors in .obj file


I bet you could have the draw method used by the pods class, apply a shader that another class uses.


Ofc the pod is using a shader, otherwise the gpu wouldnt know what to do.
Shaders are programmed pipleine, if shader isn't turned on while drawing mesh, it's drawn using fixed pipeline. Everything on low graphic settings is rendered in fixed pipeline.
I bet you tho, that either the cpu is forced to calculate the vertice normal for each polygon (face) or the game just doesnt bounce light off the escape pod. Not that it matters much, every other obj ive seen has a vn value.


Is there a way to have the escape pod shader used with a larger ship (to see if it bounces light) or my updated escape pod (with vn included) with a larger ships shader.
No idea what do you mean, all ships, drones and bases use one shader.

Man, even talking about all this is making my head spin :cry: I cant imagine doing this for a living :cry:


Ill focus on another hull next time, and make sure It uses the information I input.


Wed Mar 30, 2016 6:20 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © phpBB Group.