Jump to content
Sign In to follow this  
autoVino

autoVino's bat projects

1,009 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    001-2.jpg

    wrote a handy dandy little plugin that will paste the render time of a render at the bottom of the render screen.  Works in 3ds max 9+, should work in 8 and 7, not so sure about earlier versions.

    here an update:

    009.jpg

    renderTime.zip

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Incredible. Very impressive. I've noticed an absence of cooling towers though?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    Originally posted by: ngeeves Incredible. Very impressive. I've noticed an absence of cooling towers though?quote>
     

    nope, you can't miss them! 2.gif

    render020copy.jpg

    render021copy.jpg

    batting has come to a complete stop and now it's uvw unwrapping 4.gif.  I've also started working on a bat4max preview option:

    code:

    --function does a render preview, corpped correctly
    --precondition: int zoom (1 to 5, represents the zoom level); int rotation (rotation is 1 = south
    --2 = east...)
    --postcondition: outputs a rneder window with the correct bitmap
    fn fnDoRenderPreview zoom rotation = --zoom is the zoom 1,2,3,4, or 5, rotation is 1 = south
                                    --2 = east...
    (
        --creates a new lod shell that will the basis of the camera location
        local tmpLODShell = FnCreateSceneBoundingBox name:"temp-sceneShell"--we give it a name in
                            --case later on cleanup is impossible. this way it is easy to find
       
        --we want the shell to be slightly larger than the scene itself, for deadspace in the
        --rnederoutput, this is eyecandy only
    tmpLODShell.length += 2; tmpLODShell.width += 2; tmpLODShell.height += 2; move tmpLODShell [0,   0, -1]
        hide tmpLODShell    --we don't want the box to be renderable
       
        --the following code builds a camera that resembles the z5 camera (by location)
    local tmpCam = Targetcamera pos:[51.324, -124.161, 134.35] target15.gifTargetobject transform15.gifmatrix3 [1,0,0]

    [0,1,0] [0,0,1] tmpLODShell.center))

        local tmpCamHandle = Dummy()    --the camera is built, but it must be rotated into the correct
                                    --location (ie nerth, west, south, or east)
        tmpCam.parent = tmpCamHandle    --a dummy is created and set as the parent of the tmp camera
        tmpCamHandle.rotation = $TB2CameraHandle.rotation   --the dummy and camera is rotated so that
                                                        --the camera matches the zoom rotation
        tmpCam.orthoProjection = true   --since the game is "ortho-metric", we also need the camera to be
                                    --similar
        tmpCam.name = "tempCam"     --incase later one deleting is not possible, we create a name
                                        --that is easy to find
        tmpCamHandle.name = "tempCam Handler"   --we do the same for the camera handle
       
        --the following block of code calculates the variable needed to get a perfectly cropped zoom   
        ---------------------------------------------------------------------------------------
        --Some stats about camera location:                                         ---
        --Camera    distance    negY angle      FOV         output      angle of elevation ---
        --z5        190.160m    22.459 deg      33.294 deg 793px       49.6694 deg         ---
        --z4        190.160m    22.459 deg      62.096 deg 797px       49.3394 deg         ---
        --z3        190.004m    22.4618 deg     105.854 deg 769px       45.0943 deg         ---
        --z2        190.004m    22.4642 deg     147.0 deg   974px       40.4894 deg         ---
        --z1        190.004m    22.4661 deg     156.0 deg   700px       35.8516 deg         ---
        ---------------------------------------------------------------------------------------
        --note that this little script is made for z5 and z4; z3,2,&1 will requier slightly different
        --calculations b/c they have different locations
       
        if mod rotation 2 == 1 then (
            local width = tmpLODShell.width     --the width in meters of the object
            local height = tmpLODShell.height   --the height in meters of the object
            local length = tmpLODShell.length   --the length in meters of the object
        ) else (
            local width = tmpLODShell.length        --the width in meters of the object
            local height = tmpLODShell.height   --the height in meters of the object
            local length = tmpLODShell.width    --the length in meters of the object
        )
       
        --for zooms 4 and 5
        if zoom >= 4 then (
            local theta = 22.459    --the angle between the negative y axis and the camera, lookint from
                                --top view (strickly top view, z5 is 22.459 deg.)
            local camLength = 190.16    --the distance away that the large zoom camera is from its target
                                    --(z5 is 190.16 meters)
           
            --for zoom five
            if zoom == 5 then (
                local camFOV = 33.294   --the FOV for the large zoom camera (z5 is 33.294 deg.)
                local pxRatio = 793     --the normal output width for the screen (z5 is 795 px)
                local hRatio = 4.98661      --this number could be found mathmaticaly, but it's
                                --easier to do experimentaly. (5.06792 for z5, 2.49331 for z4)
            ) else (    --for zoom 4
                local camFOV = 62.096  
                local pxRatio = 797    
                local hRatio = 2.49331     
            )   --end zoom dependant clause
           
            local screenH = height + length/cos(theta) + (width - length * tan(theta)) * sin(theta) --
        --the height of the object in the z5 render in meters
           
        ) else (    --if the zoom is not 5, slightly different calculations are requiered.
            local camLength = 190.004
            local theta = 22.4642  
           
            if zoom == 3 then
            (
    quote>

    seems that posts can't be posted longer than this.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    experimenting with textures and unwrap uvw maodifier:

    render022-1.jpg

    render023-1.jpg

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Looks good so far...2.gif


    Gsig.jpg

    "With a purposeful grimace and a terrible sound he pulls the spitting high-tension wires down..."

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    ^Agreed, darker would be nice. Depending on the "age" and "Function" of this building (which is entirely up to you), I would love to see the top of the stack a uncleaned, black, crud caked mess tapering down to a respectable new looking condition down at the bottom. But thats just me!

    Also the first one is a lil too pink for me, 2nd one looks more like brick though.

    Amazing work so far, I am looking forward to seeing it finished!

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    The sceond picture is a more accurate representation of the brick.

    it will be darkened up when I finsh buidling a uvw map that I like, but not too much since this building is ment to be fairly modern with a touch of earlier industrial style. 

    and it owuld be funny to see the top of the stacks black because they emit steam (water) 3.gif

    now the furnaces will definatly be more of crud caked mess.  The cooling towers won't be a perfect clean though... industrial generally requiers some mess with it.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Originally posted by: autoVino

    wrote a handy dandy little plugin that will paste the render time of a render at the bottom of the render screen.  Works in 3ds max 9+, should work in 8 and 7, not so sure about earlier versions.quote>

    NIFTY!1  I've been searching for a way to do that like Vray can do "time stamps" but I guess you created it.  If you don't mind I might fiddle with it so that you can also add your own string to it like: "By Ian Paschal  |  Copyright 2008"

    Also, as for the UVW Unwrap, one thing that I have found is really handy when I make my maps is to have several walls on 1 map.  Then I can put a plane UV map on a wall first, and set the tile coordinates to = (width of single wall in px) / (width of whole map in px).  This gets the proportions correct when I apply my UVW Unwrap mod I merely have to select all vertices and move them around to the right part of the map, but the arrangement is already perfect.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    thanks for the uvw tip 2.gif

    as for the script, I have found some problems with it after extensive testing 25.gif

    1. making the render width too small creates problems with the script, avoid it

    2. sometimes the script will close the render window on its own.  I think I know why b/c I deleted the bitmap instance that I work with when the script is done... this was because (on my computer) the script would overload 3ds max and crash it after a few hundred render tests 20.gif.

    Another problem with adding your own text is that it is a little bit more involved than just typing in your name into the script, you have to create it in photoshop.

    I used a font size that's no bigger than 14 px high (I think 10, but I'm not sure)

    Make the font white, and make the background black.  This is important!  I would save it as a png, because psd sometimes creates error with the compression (to 3ds max script) program I made (png and jpeg and bmp work fine.  Keep in mind that the rgb and alpha channel for the image in the compression script will all be the same, meaning that white color is alpha = 1.0 and black is alpha = 0 and grey is somewhere inbetween.

    here is the script:

    (

     b=selectbitmap() -- open image file browser

     bname="bitmap_"+(getfilenamefile b.filename) -- build name from filename

     

     w=b.width -- get properties of bitmap

     h=b.height

     

     format "----------\nfn % renderImage x y= (\n" bname -- start defining function

     --format "local %=bitmap % %\n" bname w h -- create bitmap in function

     -- write out a function that unpacks an integer into a pixel color

     --format "fn unpack val = for p in val collect color p p p p\n"

     --^only need once outside the function created

     

     for r=2 to h-4 do -- for each row in the bitmap

     -- have function write the column of pixels to the bitmap

     (

      format "mixColor renderImage x (y + %) % (unpack #(" r w

      pixels=getpixels b [0,r] w -- read in the column of pixels

      for c=1 to w do -- loop through each pixel

      (

       p=pixels[c] -- get the pixel

       -- pack the pixel into an integer and write it out

       format "%" ((p.value) as integer)

       if c != w then -- if not at end of data

        format ", " -- write a comma

       else

        format "))\n" -- else close out the line

      2.gif

     2.gif

     

     format "return %\n" w    -- function returns the bitmap width

     format ")\n----------\n" -- finish off function definition

    )

    run the script, choose the bitmap (you will have to play with the bitmap you made so that it fits right once "rendered" into maxscript format.. you will need the top few (2) and bottom few pixels blank (4 bottom))

    you will need to place the output function into the script that goes into the startup directory, this is important if you want the script to work properly!

    You will also need to place it at the end of all the bitmap functions, this too is important!

    How to make it display shouldn't be too hard though.

    The reason you use this method is because I couldn't find an effective way to convert a string to a bitmap... it is kind of tricky and I don't know how to. 3.gif

    hope that all that makes sense up there...  if not just ask I'll try to explain better since I'm rushed right now.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    *back from the dead?*

    nope just labor day weekend 3.gif!

    this is what I was able to cough up in the last hour after researching this building extensively:

    baseview001fu3.th.jpg

    now what could it be? 

    a floorplan layout.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    close, it's asian.  It's the Mahaavir Heritage (I think it's in construction right now, but I"m not sure).  I was able to get my hands on a large array of floor plans for it so that really boosted my enthusiasm for creating a cg representation of the building.

    clubhouse001jr6.jpg

    here's some detailings on the third floor clubhouse.  In front of it will be a swimming pool and theater.  To the sides will be some game-courts.

    I still need to give it it's roof access (essentially stairs and a large glassy box), some railings, and plants (the doors though are out of proportion)

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Planning on a busy busy senior year as well? XD

    This looks interesting, I hope we can see it out on the STEX soon.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    oh yeah, it's hell-ish so far, as I'm turning on to some hard-core biology classes.

    completely redid the 2nd floor club house.

    clubhouse-003.jpg

    clubhouse-005.jpg

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    I pretty much completed the base, except for the grounda nd first floor texturing and cars, and some minute details on the second floor (i.e. a badmitton court).

    I have also added a fairly detailed garden (with a few million poly's) as an external refrense, and believe me if that doesn't add signigicant render time then I don't know what does.  It turns out that 4gb of virtual memory and 700mb (I'm not letting 3ds max use any more than 700mb because then it wil interfere with other processes, so I'm saving 300mb for other things) of ram isn't enough.

    So no render as of yet.  I'm going to spend the next few days trying to optimize my garden and to lower the amount of memory it takes to render (which is the biggest problem).  This will probably a next weekend's project though.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Autovino you are one crazy dude lol. That's some amazing detail, says a lot about your skill and passion to put those details even in places that will be hidden in SC4. Just fantastic44.gif

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I really hope you'll release this one! It just looks gorgeous and would be perfect for a Bourgeois-residential area xD

    Keep it up 2.gif


    KINGDOM OF SAVOY

    COMING BACK, HOPEFULLY SOON?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    keep in mind that it will also include 7 22 story towers where the blue blocks are loacted 4.gif

    Click to enlarge

    the render is bigger, but I downsized it to fit the forum rules.  Click to view in full resolution.

    The base still requiers a little bit of texturing detail, but the buidling is going to be a bright white color (I'll try to match the maxis style on some of their more modern creations)

    Also there is a detailed garden (which I have the design plans downloaded for) on the second floor (the plaza) and a large array of cars (which are drawn on the ground floor plan but not on the first and second floors).

    Also some people models should also be included.

    Finally, the blue blocks that are a rude representation of the tower's bases are in an approximate position (I eyeballed them off of the few available renderings, I will use the floor plans later, but they don't exactly 100% match, e.g. the ground floor plan, 1st and second's base drawings don't match the shafts of the towers' exactly).  I will get them more precise when actually placing the towers.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Wow that is looking nice. Is it possible to release a version without towers? It could make a good looking public building of some sort.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    Without towers?  What function would it serve then?  it would be a massive parking structure with a garden on top and a swimming pool?  I mean I could do it no problem, but it would turn out to be just a bunch of useless concrete. 33.gif

    Anyway I've been experimenting with creating low-poly trees from higher poly models (using some techniques that older games used for low poly flora) -- that is making a stem and then 8 planes with a type of radial symmetry.  The only problem is that transparency isn't 100% perfect with mental ray, I have to experiment on that some more.

    Thinking about it, I may also try to do what the professional renders of this buidling do, just after-photoshop the flora in, except a tad bit different.  Why have a full 3-d model when you can just have a simple plane with an image on it facing the camera at all times?  Just have a plane that follows the camera or is linked to a helper object that will rotate accordingly and you can have a simple tree with 2-polygons.  (shadows probably won't be 100% accurate here, but upping to 4 polygons might help, if they are orthogonal to each other).

    Here are some renders:

    Zoom five north and south

    lightingtest001oj7.th.jpg lightingtest001oj7.th.jpg

    Zoom four west and east

    lightingtest003yl6.jpglightingtest004wx1.jpg

    The purpose of these renders is just to get an idea of what lighting will look like throughout the model; also to get an idea of how much the towers would obstruct from the center.  I'm thinking it turns out pretty good.  The A,B, and C towers are accurate, while D is completely off shape, and E, F, and G towers are the wrong shape.  Every floor (odd/even) is also a different shape so the towers won't look exactly like that, but the general shape is right.  The base shape is off as well.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    it really turns out very nice!

    I think you were very wise by starting model with the base. It is easy to jupt to towers and then loose the steam whne it comes to base faced with all the little issues that may accumulate while making towers.

    I see you have changed you rig! no more cyan cast.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections