View Full Version : New tool: in-browser 3D model / camo viewer
Just posted the first version of my camo/model viewer:
http://ps2hq.com/model-viewer
It uses the game's own 3D models and textures, and renders them in the browser using WebGL.
Performs best in Chrome. Works in Firefox, and in Opera as well if you enable WebGL (it's disabled by default in Opera)
Some features I plan on adding: Add any missing camos, and if it isn't a huge amount of work, add vehicle attachments (eg. armor, bumpers and whatnot)
Let me know what you think!
PeterDen
2013-01-31, 08:06 PM
Its not accurate... Look at the girafe design, its missing some yellow!!!
Neutral Calypso
2013-01-31, 08:13 PM
:mad:
Did somebody say giraffe???
*exorcises the wielder of the unholy giraffe!*
Rolfski
2013-02-01, 02:09 AM
Awesome mate! SOE, please give this guy some Station Cash for a job you should have done in the first place.
Roy Awesome
2013-02-01, 02:32 AM
Holy crap you made this fast.
You asked me how to get the 3d models like the other night. Good work
Lonehunter
2013-02-01, 02:56 AM
Awesome!
Happytrail
2013-02-01, 03:47 AM
really nice.
but giraffe is black and white in the viewer (for me atleast) and digital dosent load. everything else seems to work.
Sturmhardt
2013-02-01, 03:55 AM
Nice work, but whenever I try to change the camo the whole model just turns black...
.sent via phone.
Jaged
2013-02-01, 04:02 AM
Is there any way to do infantry?
Thanks all!
Nice work, but whenever I try to change the camo the whole model just turns black...
.sent via phone.
Which browser are you using? Does this happen for all vehicles using any of the camos?
Is there any way to do infantry?
I should be able to add infantry to this. Just need to extract the models and textures.
really nice.
but giraffe is black and white in the viewer (for me atleast) and digital dosent load. everything else seems to work.
Yeah I'm not sure how to calculate the color hue for the camos. If anyone can help me figure out how that's calculated off the textures, that would be great.
This is how they work as far as I know, example with prowler:
The main texture for the Prowler looks like this:
http://ps2hq.com/static/textures/Vehicle_TR_Prowler_Base_Chassis_C.jpg
Then, we have a texture which is split into multiple channels for different data:
http://ps2hq.com/static/textures/Vehicle_TR_Prowler_Base_Chassis_N.jpg
- Alpha channel: Used for bump mapping (as far as I know)
- Blue channel: Used as the mask for camos
- Red channel: ???
- Green channel: ???
This would be the primary candidate for the one containing the hues I think, however I haven't got a clue how to extract the info.
You may notice it's a jpeg and I just said alpha channel. This is converted from a DDS which has an alpha, and the alpha channel for this file is in a separate jpeg here:
http://ps2hq.com/static/textures/Vehicle_TR_Prowler_Base_Chassis_B.jpg
So that one is the bump map.
This is the specular map, it's applied directly as far as I know:
http://ps2hq.com/static/textures/Vehicle_TR_Prowler_Base_Chassis_S.jpg
Then we have this weird one, which I initially thought was the camo mask, but it isn't. No clue what it does.
http://ps2hq.com/static/textures/Vehicle_TR_Prowler_Base_Chassis_DS.jpg
Best guess: DS = Depth Stencil
The color hue might also be calculated from the base texture's colors in some fashion. No idea how though.
Lastly, here's a model you can open in 3D Studio Max if you want to test the assumptions:
http://planetside2hq.com:8080/model-viewer/Vehicle_TR_Prowler_Base_Chassis_LOD0.obj
And this is the giraffe camo file: http://ps2hq.com/static/camos/Giraffe_TC.jpg
Heretik helped a lot in figuring these out so props to him
Sonny
2013-02-01, 09:06 AM
This is awesome zomg, thanks a lot!
Sturmhardt
2013-02-01, 09:30 AM
I am getting the black models with chrome... But it's my PC at work, so I don't know what other shit the it guys installed here that prevents me from seeing it correctly :p
.sent via phone.
I am getting the black models with chrome... But it's my PC at work, so I don't know what other shit the it guys installed here that prevents me from seeing it correctly :p
.sent via phone.
Ok, could be it's some issue with the setup there or the network or whatever.
It might be useful if you can check the Chrome Developer Tools for any errors... Click the menu icon on the tab bar, then Tools, then Developer Tools, then go to the Console tab and copy any errors from there.
Just to make sure it isn't an issue with my code :)
Sturmhardt
2013-02-01, 11:28 AM
Ok, could be it's some issue with the setup there or the network or whatever.
It might be useful if you can check the Chrome Developer Tools for any errors... Click the menu icon on the tab bar, then Tools, then Developer Tools, then go to the Console tab and copy any errors from there.
Just to make sure it isn't an issue with my code :)
I will do that on monday if I don't forget it :>
It's working on my home PC with Chrome though, that's enough for me.
GrmlZ
2013-02-01, 11:34 AM
Good job!
Holy crap you made this fast.
You asked me how to get the 3d models like the other night. Good work
How do you get the 3d models?
MrBloodworth
2013-02-01, 11:38 AM
Fancy.
How do you get the 3d models?
I used a tool called ps2ls to extract them from the game's data files
GrmlZ
2013-02-01, 07:29 PM
Good to know, might be useful for future videos. :)
Just updated it with infantry models + other improvements!
http://ps2hq.com/model-viewer
(Some infantry camos are applied slightly incorrectly. Work-in-progress)
DarkMesa
2013-02-01, 11:10 PM
You work fast my friend.
HiroshiChugi
2013-02-01, 11:15 PM
Maybe make a tablet-friendly viewer? :D
RSphil
2013-02-01, 11:39 PM
cool. and it shows the Reaver isn't covered enough in camo. the other ESF get more coverage and look better with the camo on.
cool wee web page though. i can play for a while now lol
Ghoest9
2013-02-01, 11:53 PM
NA LA showed a prowler.
NA LA showed a prowler.
You may have been too hasty and clicked on that button before the Prowler model finished loading :D
I need to make it so it doesn't let you change models while it's working to prevent problems like that.
thegreekboy
2013-02-02, 01:20 AM
This is awesome and I love you for it
musefrog
2013-02-02, 10:16 AM
Having a chance to look over the models without them leaping about and shooting me (or being shown for a couple of seconds on the killscreen) has given me a new appreciation for the beautiful and functional design and modelling in PS2.
This was one clear advantage of moving to a classes model vs PS1 that I hadn't realised till now - they seem to have taken a leaf out of TF2's book, and made each class' silhouette distinctive, aiding identification and appropriate response on the battlefield.
Apart from the clearly different MAX and infiltrator, we have the Heavy's bulky armour and shoulder pads, the LA's prominent jumppack (visible over the shoulders from the front for VS & TR), the medic's big white backpack and helmet (okay, not strictly a silhouette!), and the Engie's large backpack and high collar (although it's a smaller backpack and chunky straps for the VS).
I also like the way that the empire differences are expressed in the design differences between the implementation of the class designs. You can really see the rough, boxy, mechanical nature of the NC, the VS's disconcertingly-shaped high-tech, and TR's slick, smooth military efficiency. :love:
New update with some improvements and fixes:
- Improved camo selector
- Background bright/dark toggle
- Digital camo works, but it renders in wrong color (still need to sort out the shaders, but they are completely foreign to me)
- Option to move camera up/down
- Bunch of other small stuff
Known issues:
- Certain camos show up black and white. This is because the camos are shared between factions, but are rendered ingame using a faction specific color scheme that isn't stored in the camo file itself. Working on a fix.
- The camos are sometimes not rendered correctly (eg. the pattern is wrong). This is due to the way they are currently applied on the texture, but I'm working on a fix for this as well.
If anyone speaks GLSL I could use assistance in writing a shader to fix the rendering issues with camos and such.
New version out with the additional camos added in the patch. Also includes correct camo tinting, so no more black and white camos!
Known issues:
- Camos are in the wrong position. This is because of lack of UV2 coordinates from the model (issue with ps2ls exporter, looking into it)
http://ps2hq.com/model-viewer
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.