Thread: Plan Shape Mesh Constructor and Texturizer

Results 1 to 7 of 7
  1. #1
    Registered User ToTac's Avatar
    Join Date
    Nov 2016
    Location
    Germanistan
    Posts
    2

    Smile Plan Shape Mesh Constructor and Texturizer

    Hey there guys!

    I am very happy I can finally show this to the Goldsource mapping community. For the past 8 months (since May 2017) I was working on a C++ project I am calling "PlanShape", which is a generator (or whatever you would call it) for circular bodies (cylinder, arch, tori and sphere) which also completely texturizes the objects during the process.
    The basic principle for the mesh generation is inspired by this tutorial. For those who don't know it yet, you start with a PI circle made of 12 vertices, rotate it by 15 degree and then snap it to a larger grid. The resulting circle is some kind of mathmatical miracle, because objects you can create of it will have planar faces, which is a major advantage of course (no triangles & clean coordinates at best). The circle can also be divided into higher resolutions, without loosing these advantages.

    There are some downsides, too, of course, the biggest one being floating point coordinates.
    While 12 is the minimum resolution, it can be theoretically doubled endlessly, but the higher it goes, the higher the chance for floating point coordinates will be. Hammer can't import those, not even with vluzacns floating point patch installed. You can minimize this effect by using low resolutions and/or large radiuses for the objects.
    If you can't avoid having FPCs in the object, the program will enlarge it automatically until the coordinate becomes integer. E.G.: 64.75 * 2 = 129.5 * 2 = 259. The scale factor for Hammer would then be added to the map file and can be seen in the maps properties menu, so you can regain its original size again.
    Modern editors like Sledge and JACK should be able to load FPCs without these issues, but stince I still prefer Hammer over everything, this was an important feature to me.

    No GUI! One more downside is, that there's no GUI yet, and probably never will be, so the process is not very practical, but still very helpful for huge high res objects, that also need to be textured.
    Not Circular! The resulting object will also not be completely circular in terms of PI. This isn't a problem, unless you're planning to let it rotate very fast. Otherwise nobody can tell the difference.

    Long story short, I've created a site for the tool and added a few download mirrors and a documentation.

    Latest version download mirrors:


    Potential Future Updates:

    • Hollow Sphere
    • the missing texture region
    • optimized brush structure
    • RMF export


    Everything else there is to say I either added to the Readme file or the (online) documentation.
    I would be really thankful for any feedback and bug reports! The last can be send to my email adress (totac@web.de), including the correspondent files and a desciption of the problem.
    I look forward to your feedback. Let me know what you think of it and if it helped you in one of your projects!

    P.S.: I also added some outdated preview images...
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	PSmedia_cylinder_s.jpg 
Views:	53 
Size:	157.0 KB 
ID:	17974   Click image for larger version. 

Name:	PSmedia_arch_s.jpg 
Views:	48 
Size:	254.5 KB 
ID:	17975   Click image for larger version. 

Name:	PSmedia_htorus_s.jpg 
Views:	56 
Size:	255.9 KB 
ID:	17976   Click image for larger version. 

Name:	PlanShape_HTorus_BaseShift.png 
Views:	67 
Size:	384.3 KB 
ID:	17970  

  2. #2
    trigger_delay & func_lazy TrEmPlEr's Avatar  
    Artist
    Join Date
    Jul 2002
    Location
    Valve Hammer Editor 3.5 beta
    Posts
    2,276

    Re: Plan Shape Mesh Constructor and Texturizer

    Awesome tool !

    here
    Modstatus: Unknown

  3. #3
    Advanced Leveldesigner SourceSkyBoxer's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    785

    Re: Plan Shape Mesh Constructor and Texturizer

    Great job PS: Trempler Do you remember "ToTac"? From TheWall!!

    Sorry I write German:
    Mein Computer Windows 10 Pro x64 verweigert weil deine Datei "Thread" = Virus gefunden wurde. Ich benutze Windows 10 Pro x64 leider zweingt Windows Defender echt. Ich gebe dir dass die Datei ohne Virus erhalten soll. Danke!
    Last edited by SourceSkyBoxer; 19-01-2018 at 07:16 AM.
    Hello guys, Svencoop. I am sorry Please respect me! I am deaf. Thanks, Sven-Coop Forum!

    Please do not share to shit dropbox! Please share only Mega.nz!
    Muhahaha, Facebook crashed!

  4. #4
    Super moderator Hezus's Avatar
    Join Date
    Aug 2001
    Location
    The Netherlands
    Posts
    8,999

    Re: Plan Shape Mesh Constructor and Texturizer

    That is quite cool!

    Moving this to the 'resources' forum since this is clearly a useful tool!

  5. #5
    Still learning wolf-3d's Avatar  
    Tester
    Join Date
    Jan 2011
    Location
    Somewhere Warm.
    Posts
    1,445

    Re: Plan Shape Mesh Constructor and Texturizer

    Wow - Missed this Thread for some reason.

    If you can't avoid having FPCs in the object,
    , If the "created object" is external to Hammer, JACK etc. How does it know the FPC should be rounded up ?
    PS: I use Both depending on what I want to achieve for a particular test situation or map.

    Request: I have never seriously tried to create "Torus" (simply due to the problems you have described, such as missing faces, mis-aligned textures, etc.).
    Would it be possible for you to post some .rmf or .bsp as examples?

    Idea, work and effort are Impressive. - THANK You.
    Regards
    Wolf-3D

  6. #6
    Registered User ToTac's Avatar
    Join Date
    Nov 2016
    Location
    Germanistan
    Posts
    2

    Re: Plan Shape Mesh Constructor and Texturizer

    Quote Originally Posted by Hezus View Post
    That is quite cool!

    Moving this to the 'resources' forum since this is clearly a useful tool!
    Thanks for relocating this Hezus! I was about to ask for that.

    Quote Originally Posted by wolf-3d View Post
    If the "created object" is external to Hammer, JACK etc. How does it know the FPC should be rounded up ?
    PS: I use Both depending on what I want to achieve for a particular test situation or map.
    The tool itself detects the floating point numbers within the generated vertex coordinates right after it generated the object and will then enlarge it automatically IF you activated this option in a template file by adding "autoscale 1". If you're using the command console, then it will tell you that there were FPCs found, so you can choose to enlarge it by using the autoscale function (a).

    But in the end the tool doesn't know anything ofc. Only the guy importing a map-file into Hammer has to know about the fact, that Hammer only properly imports vertex coordinates that are made of integer numbers, while JACK or Sledge can import anything (I've not really tested that again recently though!).

    Sorry if I've read your question wrong, please feel free to ask again

    Quote Originally Posted by wolf-3d View Post
    Request: I have never seriously tried to create "Torus" (simply due to the problems you have described, such as missing faces, mis-aligned textures, etc.).
    Would it be possible for you to post some .rmf or .bsp as examples?
    I have created an example showing a hollow torus and added the RMF, BSP and template file.
    Download the Zip here.

    Click image for larger version. 

Name:	HTorus_Example_Raw.jpg 
Views:	89 
Size:	302.5 KB 
ID:	17983Click image for larger version. 

Name:	HTorus_Example.jpg 
Views:	48 
Size:	242.9 KB 
ID:	17985

    It uses the following template settings:

    Code:
    exmap        1
    nomenu        1
    autoscale    1
    shape        htorus
    res        12
    res2        24
    1_tex        +0C3A1_NRC1
    2_tex        +1C3A1_NRC1
    3_tex        C3A1_GEAR1B
    1_shifty    17
    1_scalesrc    1
    1_rot        90
    1_facealign    1
    1_v_wrap    1
    1_v_seamless    1
    1_v_wrapam    4
    1_h_wrap    1
    2_shifty    -10
    2_scalesrc    1
    2_rot        90
    2_facealign    1
    2_v_wrap    1
    2_v_seamless    1
    2_h_wrap    1
    2_h_rangesrc    2
    3_sizex        64
    3_sizey        64
    3_rot        90
    3_facealign    1
    3_v_wrap    1
    3_v_seamless    1
    3_h_wrap    1
    3_h_seamless    1
    By the way, there are also some simple example files coming with the tool itself.
    Last edited by ToTac; 31-01-2018 at 09:41 PM.

  7. #7
    Still learning wolf-3d's Avatar  
    Tester
    Join Date
    Jan 2011
    Location
    Somewhere Warm.
    Posts
    1,445

    Re: Plan Shape Mesh Constructor and Texturizer

    Thanks a lot for the additional explanation (I will test PlanShape in Both Hammer [rounded] and in JACK [FPC] when I get the chance) and of course Thank You for the sample files and the configuration settings used to build the torus.
    Regards
    Wolf-3D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •