[project1dev] Re: Scale

  • From: Chris Riccobono <crysalim@xxxxxxxxx>
  • To: project1dev@xxxxxxxxxxxxx
  • Date: Sat, 27 Jun 2009 22:01:57 -0700

Yeah, the texture optimization you mentioned makes a lot of sense, but
the vertex one is where it gets really amazing.  Being able to notice
in code when you can take out edges is really cool.. and yeah, all of
those effects like putting fog in the distance so you can't notice
those low poly models, I remember the n64 having to do that so many
times :P

I wonder if it possible to scale a model up the closer it is?  Like
when you get too close to an object that doesn't have enough verts to
fill itself in short range?

On Sat, Jun 27, 2009 at 9:57 PM, Alan Wolfe<alan.wolfe@xxxxxxxxx> wrote:
> Techniques like this are also used at runtime and are called "LODing" where
> LOD stands for "level of detail".
>
> For instance in games when objects are far away they sometimes use lower
> poly models since its really hard to tell the difference.
>
> Or also a lot of times in outdoor scenes in video games where there's a lot
> of mountains and ground you can see at once, distance land uses less verts
> since you can't tell anyhow.
>
> As you run around you might notice little bumps appear and disapear and
> that's called "popping" and is something every LOD technique can potentially
> have a problem with, but there are also techniques for minimizing popping
> such as instead of removing a vert in one frame, you move the vert over time
> to where it's in line with how the model would look without the vert, then
> you remove the vert so it has a smooth transition which is harder to see
> than a visible pop.
>
> man there is so much crap that goes into makin video games!  this is just
> the tip of the ice berg of one topic of hundreds :P
>
> On Sat, Jun 27, 2009 at 9:52 PM, Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote:
>>
>> there's algorithms for things like this.
>>
>> for textures you can calculate at various distances how many texture
>> pixels there are per screen pixels (also taking into account the object's
>> scale) and try to make it 1 to 1.
>>
>> For instance if something has a super high resolution texture or is scaled
>> way down, you might have 8 texture pixels per screen pixel which is a lot.
>> You could then make the texture 1/8th as large and have it so 1 texture
>> pixel equals 1 on screen pixel.
>>
>> That's the ideal most of the time.
>>
>> similarly for models, you can take a look at each vertex and if you remove
>> the vertex see how many pixels on screen would "pop" and anything which was
>> within the reasonable tolerance, it would get rid of, but keep from removing
>> vertices that make a huge impact.
>>
>> Like for instance if you had a cone shaped nose for a character you
>> wouldn't remove the tip of the nose cause that would make the nose go flat
>> which is really noticeable, but you might remove some of the vertices on the
>> base of the nose since doing that is going to make it less round, but that
>> doesnt really affect how the model looks.
>>
>> these are just 2 ways but theres all sorts of algorithms to do this stuff
>>
>> On Sat, Jun 27, 2009 at 9:47 PM, Chris Riccobono <crysalim@xxxxxxxxx>
>> wrote:
>>>
>>> Wow, that really is impressive.  That gives artists and builders so
>>> much more freedom it's crazy.  I don't even know how one would go
>>> about creating that system!
>>>
>>> On Sat, Jun 27, 2009 at 9:42 PM, Alan Wolfe<alan.wolfe@xxxxxxxxx> wrote:
>>> > Oh and something really interesting to note!
>>> >
>>> > The geniouses at ID software (carmack etc) have their current engine
>>> > working
>>> > where artists submit huge high resolution textures and way high
>>> > polycount
>>> > models, and the engine scales each down to only what is needed and
>>> > automatically gets rid of the waste.
>>> >
>>> > it's a neat system, but ID software is like the best of the best so
>>> > it's no
>>> > surprise :P
>>> >
>>> > On Sat, Jun 27, 2009 at 9:32 PM, Alan Wolfe <alan.wolfe@xxxxxxxxx>
>>> > wrote:
>>> >>
>>> >> Well the scaling issues should all but disapear because the artists
>>> >> are
>>> >> going to make models to scale and building won't require making things
>>> >> the
>>> >> right size for the most part.   This is important too because an
>>> >> artist
>>> >> makes a model to be a specific size.  If a builder make it bigger than
>>> >> that,
>>> >> it's going to look bad like you saw with the stretched textures.
>>> >>
>>> >> The solution to the problem you hit is just to have the artists make
>>> >> objects the right size and have the builders not have to worry about
>>> >> it.
>>> >>
>>> >> the idea of being able to place a bunch of models down in specific
>>> >> intervals is a good idea, its probably something we'll need a lot.
>>> >> This can
>>> >> be done via some script magic currently but i'll put it on the list as
>>> >> a
>>> >> wish item for later (:
>>> >>
>>> >> something you might like, is if you type "clone" in the console when
>>> >> you
>>> >> have something selected, it will clone your selection so that when you
>>> >> click, it will place an object rotated and scaled the exact same place
>>> >> where
>>> >> you click.  that should help with this point you bring up too.
>>> >>
>>> >> In general we want to only use as many verts and texture resolution as
>>> >> we
>>> >> need.
>>> >>
>>> >> It's true that if we give a higher res texture to an object and extra
>>> >> verts then we can scale it up and it will still look good, but with
>>> >> the
>>> >> artists making objects of the right size for the game, we won't ever
>>> >> be
>>> >> scaling things past where they should be so i think the artists should
>>> >> keep
>>> >> on doin like they have, just use the lowest res texture needed to make
>>> >> an
>>> >> object look good at the scale they want it.
>>> >>
>>> >> make sense?
>>> >>
>>> >> On Sat, Jun 27, 2009 at 9:17 PM, Chris Riccobono <crysalim@xxxxxxxxx>
>>> >> wrote:
>>> >>>
>>> >>> Not to keep begging for more editor features....
>>> >>>
>>> >>> But if we have setscale combined with being able to see exact
>>> >>> dimensions of a model when you click on it, then we could have
>>> >>> setsize
>>> >>> and keep placing models to that exact dimension set.  And then
>>> >>> combined with the snapto command, we could actually keep placing
>>> >>> models every set amount of space, and they would be exactly aligned.
>>> >>>
>>> >>> I don't know if this makes full sense but it did when I was typing it
>>> >>> :x
>>> >>>
>>> >>> On Sat, Jun 27, 2009 at 9:15 PM, Chris Riccobono<crysalim@xxxxxxxxx>
>>> >>> wrote:
>>> >>> > When I was building I found it easier when a model had a good, high
>>> >>> > res texture.  They can't be too big cuz of cost, of course, but if
>>> >>> > the
>>> >>> > texture is unrepeating and pretty, you can almost scale the model
>>> >>> > any
>>> >>> > way you want and not have to worry.
>>> >>> >
>>> >>> > When making floors, walls, and ceilings, it seems better to have
>>> >>> > lower
>>> >>> > res and lower size models.  This helps when tiling and aligning
>>> >>> > things.  For example, the first version of the voidmap had some
>>> >>> > issues
>>> >>> > because the main asteroid was very large and oddly shaped.  I had
>>> >>> > to
>>> >>> > almost scale it to a pancake on the Z axis because of that, and
>>> >>> > even
>>> >>> > then there were still problems with being able to walk under and
>>> >>> > around things placed on it.
>>> >>> >
>>> >>> > Oddly shaped models are very pretty as decoration though, like the
>>> >>> > fortune teller tent props, the rock piles in cavemap, and the new
>>> >>> > trees in voidmap.
>>> >>> >
>>> >>> > Hey Alan, maybe we can get around the iffyness of scaling in the
>>> >>> > editor by being able to set a value of default scale in the
>>> >>> > console.
>>> >>> > Maybe something like "setscale 0.5 0.5 0.5", so then everything you
>>> >>> > place will already have a scale of that value.
>>> >>> >
>>> >>> >
>>> >>> >
>>> >>> > On Sat, Jun 27, 2009 at 10:46 AM, Alan Wolfe<alan.wolfe@xxxxxxxxx>
>>> >>> > wrote:
>>> >>> >> Yeah, just to re-iterate, scaling in the editor is just like what
>>> >>> >> happens in
>>> >>> >> real life if you stretch an object.
>>> >>> >>
>>> >>> >> the texture stretches too and will look distorted if you stretch
>>> >>> >> it
>>> >>> >> too
>>> >>> >> much, or stretch it too far on one axis vs the others
>>> >>> >>
>>> >>> >> the idea is that when we make models we want to make it so 10
>>> >>> >> units =
>>> >>> >> 1
>>> >>> >> meter so that when a builder places an object in the level that
>>> >>> >> they
>>> >>> >> dont
>>> >>> >> have to scale it, since the artist has an idea of how big the
>>> >>> >> object
>>> >>> >> should
>>> >>> >> be in the world, and scaling takes extra time when building.
>>> >>> >>
>>> >>> >> thats the ideal, but of course it may take us quite a few
>>> >>> >> iterations
>>> >>> >> before
>>> >>> >> we are all on the same page about how to make that happen (:
>>> >>> >>
>>> >>> >> On Sat, Jun 27, 2009 at 9:43 AM, Nick Klotz
>>> >>> >> <roracsenshi@xxxxxxxxx>
>>> >>> >> wrote:
>>> >>> >>>
>>> >>> >>> Textures get stretched and compressed at the same ratio you
>>> >>> >>> scale.
>>> >>> >>>
>>> >>> >>>
>>> >>> >>> On Sat, Jun 27, 2009 at 9:45 AM, katie cook <ktmcook@xxxxxxxxx>
>>> >>> >>> wrote:
>>> >>> >>>>
>>> >>> >>>> Hey Guys,
>>> >>> >>>>
>>> >>> >>>> When you scale a model in the level editor, does it scale the
>>> >>> >>>> textures
>>> >>> >>>> proportionately? OR does it stretch them as you scale?
>>> >>> >>>>
>>> >>> >>>
>>> >>> >>
>>> >>> >>
>>> >>> >
>>> >>>
>>> >>
>>> >
>>> >
>>>
>>
>
>

Other related posts: