lewa-j / Unity-Source-Tools

Plugin to import resources from the Source engine in Unity3D.
GNU General Public License v2.0
109 stars 23 forks source link

For some of the models the script looks in the wrong place for the .vmf file and adds some numbers to the .vmf that it is looking for. #4

Closed MrBruz closed 5 years ago

MrBruz commented 5 years ago

texturehelp1

texturehelp2

These are the pictures of the list of files it is lookings for and where they acutaly are. The second image is my settings to make sure everything is configures correctly.

Looking forward to your help. :+1:

StamatisP commented 5 years ago

This is done because of how Source handles cubemaps for reflections, I believe. It's a pain, but what I did was copy/paste the original file, and rename it to fit.

lewa-j commented 5 years ago

These files are in a zip inside the bsp file. You should unpack them with GCFScape.

MrBruz commented 5 years ago

Thank you. Got it working but some of the models are still missing and the clock is mis placed. texturehelp4

StamatisP commented 5 years ago

You still haven't filled out all of the materials in the WorldManager. That's the cause of the source argument error. Try that out.

MrBruz commented 5 years ago

What materials are that? Where are they on the world manager menu?

MrBruz commented 5 years ago

List of models the are visible: Bed Walls Doors Center of Button Cube dropper

Non visible or not there: Auto portal frame mini stone table check board radio button holder/outer circuit line from button to door all parts of the elevator

Objects you can walk through: Doors "Glass" if it is there is has no refraction effect so it is invisible

Glitchy stuff: Countdown clock is on the wrong wall and misaligned.

MrBruz commented 5 years ago

Fixed some of the problems by setting the transparent cut out. What do I set the vertex lit material to?

lewa-j commented 5 years ago

Diffuse

atrblizzard commented 5 years ago

These files are in a zip inside the bsp file. You should unpack them with GCFScape.

I've commited a pull request to fix this issue, removing this step altogether.

lewa-j commented 5 years ago

5

This is just a workaround. As a result, we lose all the information about cubemaps. The right solution to the problem is to make loading materials from the zip archive from bsp.

MrBruz commented 5 years ago

Fixxed almost all of the problems now!!

  1. The test chamber sign is improperly displayed

  2. The clock holder is misaligned

  3. When I click stop play it removes the map. How can I stop this so I can edit it such as adding physics to objects etc?

How can I fix these?

Picture one is bad sign and misaligned clock texturehelp6

Picture two is configuration and debug console texturehelp7

MrBruz commented 5 years ago

Extra problem: I can still walk through most 3d models such as the doors and elevator.

lewa-j commented 5 years ago
  1. Testchamber Signs are complex (https://developer.valvesoftware.com/wiki/Custom_Testchamber_Signs)
  2. MDL loader is unfinished. Can on some files fail root bone rotation.
  3. Script creates all meshes and objects in runtime and stores them only in RAM. For editing, they must first be exported. Started writing collada exporter, but doesn't finish.
  4. Same to 2nd, mdl loader doesn't load collision files.
MrBruz commented 5 years ago

How much of the exporter is done and how long do you think it will take? I would like to be able to use it by Christmas.

lewa-j commented 5 years ago

Done only vertices and UVs, without materials and objects.

how long do you think it will take

Well, forever. It was abandoned almost two years ago.

MrBruz commented 5 years ago

Well damn. Is there a way you could edit the script loader so it adds the objects as permanent objects? Like loading the materials and models into a permanent folder(PortalProject/Objects). Or what if I got you like 10 professions to assist you with finishing the exporter?

StamatisP commented 5 years ago

Throwing people at it would certainly help (provided they're paid well), but it's not really worth it. I suggest recreating it in probuilder, because the way Source does maps is really wonky compared to Unity.

MrBruz commented 5 years ago

Check this out. https://www.reddit.com/r/Unity3D/comments/a0dy17/can_we_get_some_people_to_help_with_a_project/?

Also what do you think of my first recommendation?

StamatisP commented 5 years ago

Those aren't really experts, I doubt someone in their spare time would work on a project like this without any monetary incentive. I'm sorry, but your best choice is to rebuild the map completely. Otherwise, shadows and such are broken.

MrBruz commented 5 years ago

Damn. Tbh I don't really care if shadows are broken.

MrBruz commented 5 years ago

Update. I can easily fix the non existent colliers by just clicking add mesh collier(It even automatically picks the mesh to use!) Also just saying its probably easier to just change the code so it loads the materials and props to a permanent location than finishing the export script.

lewa-j commented 5 years ago

it's not really worth it. I suggest recreating it in probuilder, because the way Source does maps is really wonky compared to Unity.

Kevin43 is right.

StamatisP commented 5 years ago

I wish there was a way to do that Footsie, but I don't think it's very possible. Correct me if I'm wrong lewaj, but the objects created with this script were never meant to be permanent, right? They work in really weird ways(all transforms are at 0) that I don't fully understand.

lewa-j commented 5 years ago

This was intended as a script that loads the entire level in runtime from the original files from Source. So editing in Unity would not be necessary. That is, everything was done only through the code, almost without an editor.

MrBruz commented 5 years ago

Well damn. Im sad. https://www.youtube.com/watch?v=6e9JhE9miOg I believe someone used to plugin to partly make what my project is. Except I want to convert all of the portal maps. Any idea how he might have done it?

lewa-j commented 5 years ago

I think he used Crafty http://nemesis.thewavelength.net/index.php?p=45 Also, did you know that the portal is already ported to android by Nvidia?

StamatisP commented 5 years ago

I've tested with Crafty before, but it didn't work well in my case. Porting the entire map as a model is really unperformant for me.

MrBruz commented 5 years ago

Crafty cannot export portal maps as all of the objects are rotated 90deg the wrong way and the textures are misaligned even when I rotate them.

MrBruz commented 5 years ago

here screenshot: crafty

atrblizzard commented 5 years ago

@Footsiefat, you may try something like VMFLoader to import VMFs and then convert them into ProBuilder brushes.

Looks like there is an issue with loading materials and models when using mods, hence the missing content. I'll see what I can do about it, along with the regex string.

MrBruz commented 5 years ago

I tried to use that importer but once I copied the files I could not find where to go to import the map.

MrBruz commented 5 years ago

Where did you go to import the map?