Quantcast

Jump to content

» «
Photo

CodeWalker 3D Map Viewer for GTAV

V Released V WIP
210 replies to this topic
BlackScout
  • BlackScout

    A Ninja

  • Members
  • Joined: 08 Sep 2013
  • None

#61

Posted 06 May 2017 - 01:21 AM Edited by BlackScout, 06 May 2017 - 01:21 AM.

Timecycle/weather colours editor is on the to-do list, I'll get to it eventually...

 

I don't know much about the game's dithering, except that there are multiple different uses of it (eg for LOD crossfade, in grass, in the sky, etc). I believe CP has done some work on removing it with VisualV mod.

Damn, you're awesome!  :lol:

_

 

Yeah, I was the one who actually found the stipple texture for grass (he didn't credit me but OK). I was trying to find a way to get rid of this monstrosity.

  • Mega likes this

crypter
  • crypter

    cryptokeys and gobblegums

  • Members
  • Joined: 17 Jan 2011
  • Antarctica

#62

Posted 06 May 2017 - 01:06 PM Edited by crypter, 06 May 2017 - 01:07 PM.

Is there any reason this is still not open source? There's the classical open source mantra that is "release early, release often" - nobody cares that code is messy or unfinished, most open source projects I see on GitHub are like this: dumps of whatever person has been working on, often without documentation; decent developer still can get goldmine of information (or reuse) of such public release - this mantra mainly relies on 'if you say "later", it might be "never"' in our-mine interpretation.

 

Also I read in post earlier in topic that you made bunch of changes to Neodymium's RageLib - perhaps it'd be sensible to have community fork of RageLib, that uses .NET Standard (project fork used internally uses this), so that we don't all have to reinvent wheel. :/

 

I am asking this, I-we need to automatically generate screenshots of map segments for project, reimplementing these shaders seems like bullsh*t idea if other project has shaders that work already - duplicate effort for not much reason.


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#63

Posted 12 May 2017 - 02:27 AM

Is there any reason this is still not open source? There's the classical open source mantra that is "release early, release often" - nobody cares that code is messy or unfinished, most open source projects I see on GitHub are like this: dumps of whatever person has been working on, often without documentation; decent developer still can get goldmine of information (or reuse) of such public release - this mantra mainly relies on 'if you say "later", it might be "never"' in our-mine interpretation.

 

The repository was a bit of a mess and it wasn't really simple for me to do a source release. I cleaned it up now, and I can make source releases fairly quickly. Since the app download is still small, and the source .zip is also small, I'll try to just include the source with each app version release going forward. I do understand it's not ideal for collaborative work, but at the very least it gets people access to the code.

 

 

Also I read in post earlier in topic that you made bunch of changes to Neodymium's RageLib - perhaps it'd be sensible to have community fork of RageLib, that uses .NET Standard (project fork used internally uses this), so that we don't all have to reinvent wheel. :/

 

The changes I made were for performance reasons, focused on reading the files only. In most cases these changes broke the way the saving files code works, so I'm not sure it's really a good basis for a community fork. Also the namespaces and class names were changed to make things more readable in the object property viewers.

Perhaps it could serve as a basis for a new version of the RageLib, with improved capabilities, but a lot of work would need to be done to restore the full capability of the original version.

 

 

I am asking this, I-we need to automatically generate screenshots of map segments for project, reimplementing these shaders seems like bullsh*t idea if other project has shaders that work already - duplicate effort for not much reason.

 

This was actually one of the main reasons I started the project in the first place. I wanted to build a tool that was capable of generating hi-res map tiles for GTAV. This is still a goal for the project, and now finally after all this work, the world can be rendered accurately. I've started already on the final step of this goal, with orthographic camera mode... But some more work is still necessary to generate tiles nicely - all the highest detail entities need to be shown for the given view, and it needs to render the view to a texture, and then finally write that texture to a file.

Most of those pieces are there now though, so it won't be too much more work to get that final part done. Probably not for the next release though.


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#64

Posted 13 May 2017 - 05:14 PM

CodeWalker v.20 is now available at 5-mods: https://www.gta5-mod...eractive-3d-map
New in this version:

- Fixed cloth rendering problems

- Fixed some YFTs (eg. traffic lights)

- Fixed water foam rendering issue

- Entity transform widget

- Project window enhancement

- Full source code included in download


 

  • _CP_, Chipsman, Tomasak and 4 others like this

Mr.Arrow
  • Mr.Arrow

    God Save the Penis

  • Members
  • Joined: 08 Nov 2011
  • United-Kingdom

#65

Posted 13 May 2017 - 06:43 PM

Nice, at some point your tool will support ped paths too? Nodes and navmesh are something that we desperately needed since no one wants to play an empty map.....

dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#66

Posted 13 May 2017 - 06:53 PM

Well at least some of the YND paths that are already displayed are for peds (eg the stairs and ped crossings). I haven't looked into navmesh stuff yet though.
I'm thinking at least to start with I might look at editing YNDs, or at the very least allow nodes and their links to be selected and inspected, to gain a better understanding of what the unknown values mean. Perhaps also the same for navmesh stuff (I have to parse those files first though).

This stuff is high on my priority list anyway ;)

  • Mr.Arrow and BlackScout like this

BlackScout
  • BlackScout

    A Ninja

  • Members
  • Joined: 08 Sep 2013
  • None

#67

Posted 14 May 2017 - 12:07 AM

By the way...

 

f1LeCYv.png

?

  • Mega likes this

dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#68

Posted 14 May 2017 - 01:00 AM

Ah thanks for reminding me of that BlackScout... There are some issues which still need to be resolved to make higher LODs load in at such distances. I should really disable that slider until those issues are sorted out...

  • BlackScout likes this

Mr.Arrow
  • Mr.Arrow

    God Save the Penis

  • Members
  • Joined: 08 Nov 2011
  • United-Kingdom

#69

Posted 14 May 2017 - 06:16 AM Edited by Mr.Arrow, 14 May 2017 - 06:19 AM.

Pretty neat that we can change the rotation and the scale of it, the result was expected .....(there is no collision though)

P8oWS8W.jpg

  • dexyfex likes this

dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#70

Posted 14 May 2017 - 01:02 PM

I think the props with embedded bounds should have collisions when placed, but many things won't, because a lot of the collisions are in the separate YBN files. YBN editor is also on the todo list.... It's a fairly long list at this stage... And every new feature I add at the moment seems to add 10 new things to do :p


P2FX
  • P2FX

    I ain't no hipster.

  • Members
  • Joined: 10 Jan 2009
  • None

#71

Posted 14 May 2017 - 02:28 PM

So we can add new objects into the map now or we can only edit existing objects?

I want to place some lampposts on the golf course how can I do that?


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#72

Posted 14 May 2017 - 03:29 PM

So we can add new objects into the map now or we can only edit existing objects?

I want to place some lampposts on the golf course how can I do that?

 

Entities can now be added to new or existing ymap files, with some limitations, using the Project window. It is still a work in progress, so it is not ready for a full tutorial just yet, and is recommended for experienced map modders only.
If you want some further details, see my recent comments on the mod's page where I have explained a little bit how to use the project window.

  • P2FX and BlackScout like this

.Alex.
  • .Alex.

    Crackhead

  • Members
  • Joined: 19 Sep 2014
  • None

#73

Posted 14 May 2017 - 10:13 PM Edited by .Alex., 14 May 2017 - 10:17 PM.

Loving the .ymap editing function

 

VLUgznD.jpg

 

Also,the tool doesn't seem to be able to spawn these two props(it says hash not found)

prop_tree_olive_cr2
prop_tree_eng_oak_cr2
  • Tomasak, BlackScout and dexyfex like this

dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#74

Posted 14 May 2017 - 10:50 PM

Good to hear you had some success with the ymap editing! :)

Not sure why it wouldn't find those props... Do you know what .ytyp they are defined in? Or if they are in updates/dlc?


Neos7
  • Neos7

    mammamia,pizza,pasta,maccheroni

  • Members
  • Joined: 02 Jul 2009
  • Italy

#75

Posted 15 May 2017 - 08:06 AM Edited by Neos7, 15 May 2017 - 08:08 AM.

Can you add a feature to load custom gta5.meta from projects? I mean a whole new map to replace V one and work on it with custom .ityp
Also could allow to add multiple ymaps at once?


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#76

Posted 15 May 2017 - 11:49 AM

Can you add a feature to load custom gta5.meta from projects? I mean a whole new map to replace V one and work on it with custom .ityp
Also could allow to add multiple ymaps at once?

 

The gta5.meta is currently not used by CodeWalker. But it is possible to hide the GTAV map and work on a completely new map, by using the Project window (see the Project tab). In the Project window, new .ymap files can also be created from scratch and will be shown in the main window. Existing .ymap files can be manually added into the project as well.

For using custom ytyp and ydr files, if you have these already, put them into a new .RPF archive and place that RPF file in the main GTAV folder. Restart CodeWalker and it should be able to use your custom archetypes (manifest etc are not necessary for this).

  • Neos7 likes this

P2FX
  • P2FX

    I ain't no hipster.

  • Members
  • Joined: 10 Jan 2009
  • None

#77

Posted 15 May 2017 - 01:23 PM

Do you know how to make the game load a custom ymap file?
I'm making a ymap that adds more props into the map.
Back in GTASA days I could just add a line in gta.dat to load a custom IPL file, Is there anything similar that can be done with GTAV?


.Alex.
  • .Alex.

    Crackhead

  • Members
  • Joined: 19 Sep 2014
  • None

#78

Posted 15 May 2017 - 01:26 PM Edited by .Alex., 15 May 2017 - 01:46 PM.

Good to hear you had some success with the ymap editing! :)
Not sure why it wouldn't find those props... Do you know what .ytyp they are defined in? Or if they are in updates/dlc?

 
Both are in patchday1ng and patchday2ng
This is the patchday2ng path: update/x64/dlcpacks/patchday2ng/dlc.rpf/x64/levels/gta5/props/v_ng_proppatch_01.rpf
This is the .ytyp(used by both): v_ng_proppatch_01.ytyp
 
P2FX,you can do it in this way
Create a dlc.rpf and put it inside a folder with your map name
 
Save this as content.xml

Spoiler

 

Save this as setup2.xml

Spoiler

 

Copy these two files inside the dlc.rpf
Create these subfolders(inside the dlc.rpf)
x64/levels/gta5/yourmapname
Inside the "yourmapname" folder,create a new .rpf named "yourmapname_metadata" and copy inside your .ymap(s)
Edit the .ymap(s) content
Spoiler
 
Add your map name to the dlclist.xml (update/update.rpf/common/data)
Almost forgot:once you're done,copy the folder with the dlc.rpf in update/x64/dlcpacks
Done
  • P2FX likes this

dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#79

Posted 15 May 2017 - 02:32 PM

This is the patchday2ng path: update/x64/dlcpacks/patchday2ng/dlc.rpf/x64/levels/gta5/props/v_ng_proppatch_01.rpf

This is the .ytyp(used by both): v_ng_proppatch_01.ytyp


Both are in patchday1ng and patchday2ng

 

Ah, I thought it was loading archetypes from all RPFs, but I just checked and it's not using update/DLC archetypes at the moment, which is why it's not loading that ytyp. I'm looking further into handling those updates properly at the moment, so hopefully I can sort this out for the next version...


Neos7
  • Neos7

    mammamia,pizza,pasta,maccheroni

  • Members
  • Joined: 02 Jul 2009
  • Italy

#80

Posted 15 May 2017 - 03:13 PM

 

Can you add a feature to load custom gta5.meta from projects? I mean a whole new map to replace V one and work on it with custom .ityp
Also could allow to add multiple ymaps at once?

 

The gta5.meta is currently not used by CodeWalker. But it is possible to hide the GTAV map and work on a completely new map, by using the Project window (see the Project tab). In the Project window, new .ymap files can also be created from scratch and will be shown in the main window. Existing .ymap files can be manually added into the project as well.

For using custom ytyp and ydr files, if you have these already, put them into a new .RPF archive and place that RPF file in the main GTAV folder. Restart CodeWalker and it should be able to use your custom archetypes (manifest etc are not necessary for this).

 

it works but loading saved projects loses pointers to ymaps...


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#81

Posted 15 May 2017 - 03:25 PM

it works but loading saved projects loses pointers to ymaps...

 

I think there is a bug in the project saving when the ymaps are in a different folder to the project file (I noticed it's not saving the path properly in the project file). However it should be able to find the ymaps if they are in the same folder.


Neos7
  • Neos7

    mammamia,pizza,pasta,maccheroni

  • Members
  • Joined: 02 Jul 2009
  • Italy

#82

Posted 15 May 2017 - 03:54 PM

 

it works but loading saved projects loses pointers to ymaps...

 

I think there is a bug in the project saving when the ymaps are in a different folder to the project file (I noticed it's not saving the path properly in the project file). However it should be able to find the ymaps if they are in the same folder.

 

Yes thought that and it works, anyway could you also allow to disable all the ybn from vanilla map and show only those from a specified rpf?


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#83

Posted 15 May 2017 - 04:18 PM

 

anyway could you also allow to disable all the ybn from vanilla map and show only those from a specified rpf?

 

 

That's a good idea, I think perhaps the best way to go about that is to allow ybn files to be added to the project... I'll have to think about it a bit more. I guess eventually it would be great to have those ybn's editable too...


Neos7
  • Neos7

    mammamia,pizza,pasta,maccheroni

  • Members
  • Joined: 02 Jul 2009
  • Italy

#84

Posted 15 May 2017 - 04:28 PM

 

 

anyway could you also allow to disable all the ybn from vanilla map and show only those from a specified rpf?

 

 

That's a good idea, I think perhaps the best way to go about that is to allow ybn files to be added to the project... I'll have to think about it a bit more. I guess eventually it would be great to have those ybn's editable too...

 

yes, also multiple ymap import for projects, cause doing it 1by1 can be really slow


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#85

Posted 15 May 2017 - 05:19 PM

yes, also multiple ymap import for projects, cause doing it 1by1 can be really slow

 

Yeah I think the open file option needs to be upgraded to allow multiple selections. Until then, perhaps the easiest way to add a lot of ymaps to a project is to edit the project file with xml editor. Note, big projects might also get performance issues at the moment when rendering, that still needs some more work.


Neos7
  • Neos7

    mammamia,pizza,pasta,maccheroni

  • Members
  • Joined: 02 Jul 2009
  • Italy

#86

Posted 15 May 2017 - 06:40 PM

btw wouldn't be better to put the src on github instead of embedding it in the download zip?


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#87

Posted 15 May 2017 - 06:51 PM

I've never really been a fan of github, but i'll think about using it in the future for this.


Hans-Hermann Hoppe
  • Hans-Hermann Hoppe

    Physical Removal Expert

  • Members
  • Joined: 08 Feb 2014
  • Micronesia

#88

Posted 16 May 2017 - 07:14 AM

I've never really been a fan of github, but i'll think about using it in the future for this.

It's also really slow for downloads for me for some reason.


Neos7
  • Neos7

    mammamia,pizza,pasta,maccheroni

  • Members
  • Joined: 02 Jul 2009
  • Italy

#89

Posted 18 May 2017 - 05:03 PM Edited by Neos7, 18 May 2017 - 05:10 PM.

I think the CalcYmapExtents() could be more accurate this way:

Quaternion Rot = new Quaternion(ent.Rotation);
Vector3 position = new Vector3(ent.Position);
Vector3 aabbmax = Vector3.Transform(ent.aabbmax, Rot);
Vector3 aabbmin = Vector3.Transform(ent.aabbmin, Rot);
Vector3 centroid = Vector3.Transform(ent.centroid, Rot);

emax= Math.Max(emax,position + aabbmax + centroid);
emin = Math.Min(emin,position + aabbmin + centroid);

Using only the position you assume that the entity pivot is inside its bound. The pivot could be also far from the bound, I think you should atleast add the centroid to the position and then add the radius (or bbmax/min which i think is more accurate) and also take in consideration its rotation (if the pivot is inside the bound or better, almost in the center, then the drawable rotates on its own, but in the other cases different rotation also give different bound position in world space)
What do you think? (code just as example, not matching your sources)

a sh*tty quality example http://imgur.com/a/V72Xj


 


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#90

Posted 18 May 2017 - 09:06 PM

Yeah it's just using the radius at the moment for the extents calculation instead of the box. I will change it to the box at some point but the calculation has to be more complex. Unfortunately just rotating the AABB min/max is not enough (think of the case where it's rotated 45 deg - min/max could lie along the same axis), I think rotating all 8 corners of the AABB is necessary, and then calculate the new min/max from those. It's a few more lines of code, but as you pointed out, it should give a tighter bound on the entities (especially on the Z axis).





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users