• Welcome to SC4 Devotion Forum Archives.

High Definition Props and Textures - Discussion thread

Started by mightygoose, March 28, 2009, 01:38:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RippleJet

Just a wild thought... $%Grinno$%

I don't suppose the game engine would realize there is a zoom 6 render, if this render which was done with a doubled model size, would be added into the SC4Model file as extra S3D (after the division by 2) and FSH files, with a "5" (instead of a "4") in the third digit (from the right)?

SimFox

I'm not sure i follow you...
what do you mean? To ADD the zoom6 to already existing 5 zom? of just replace zoom5 (with number 4) by Zoom 6 with number 5??

RippleJet

Quote from: SimFox on April 03, 2009, 10:13:26 AM
I'm not sure i follow you...
what do you mean? To ADD the zoom6 to already existing 5 zom? of just replace zoom5 (with number 4) by Zoom 6 with number 5??

Keep the old, normally rendered model with zooms 1-5 (numbers 0-4).

Then double the size of the model and re-render it.
Take the newly rendered zoom 5 and divide the S3D vertices by 2.
Then change the 4 to 5 in all S3D and FSH files, and correct the material addresses accordingly.

Change all Group ID 's to the same as in the normally rendered model.
Then import these files into that first SC4Model file.

Since the other zooms (1-5) are recognized by the zoom digit (0-4),
just maybe the game would also recognize zoom 6 from the digit being 5.

SimFox

OK here are the results:

Zoom 5:



and...


Zoom 6:



everything seem to work fine. Including transparencies and proper shadowing from transparencies.

As you can see even at zoom5 all the details are pretty decently preserved and at some way it is even better than traditional Zoom5. Particularly at the ground level. The traditional seesaw we are quite familiar and bored with is virtually gone. So displaying only 1/4 of the actual pixels may be a good idea with source does have enough info in it.
My initial concern was about how one should model than in this age of HD. Should One look for best picture at zoom5 level (like frames, lattice etc) or should those be geared to New Zoom6. Of course the discussion will only commence when this script become public, but I sort of think we should stay with conventions of Zoom5, as long as those weren't exaggerated - like 30cm thick frames,  keep them at 15 max 20 cm and those will be great for both z6 and z5.

PS
the file size , just as I've predicted (for only Zoom6 HD) twice the normal (186Kb for HD vs 97Kb for SD version)

PS
Ripple I'll try if that will work...


buddybud

#225
wow...so we just add a new set of rotations alocated to 0x-----5--? Thats quite awsome and makes things a lot easier....Another thing i gotta try! I'll check to see if you can add a rep to a network model first to do the same sort of thing!....Ok i tried to add a 5th rep to the network model and a 5th s3d with a unique texture. The game didn't crash but it didn't use the the model or texture. But it was just a quick test. :thumbsdown:

Bud

Edit fixed thanks to below.....just so i don't confuse others !!! THanx

RippleJet


SimFox

Hold your horses!!!

What is shown here:



is a proper zoom6 masquerading as zoom5. Meaning that model is sliced into 128x128 pixels slabs rather then 256x256 pixel slabs. While the FSHs are 256x256 pixels. In picture above (Zoom6) you see the entire FSH texture pixel per pixel.


When on the other hand same 256x256pix FSHs are mapped onto LOD slabs at zoom 5 they are effectively halved in resolution e.g. you see only 1/4 of the all pixels available in the texture and you get this:



So at this stage there are only 5 Zooms in the SC4Modle File. But this model has been created without ANY manual work! With No single extra mouse move or click as compared to the normal SD model with new modified BAT scripts (in this case for both GMAX and MAX). This is a huge plus of this solution. It doesn't require any additional effort or special experience by users - anyone who can bat could star making HD models right away.

The idea to include one more zoom level - unique Zoom6 level just came up few minutes ago... And at this time it is unclear if that could be done at all, meaning if game would accept extra code. Even if it will automatic creation of such models would demand very serious re-writing, not mere editing of the BAT Scripts. So even if this will prove to be working theory the practical tool would take some time, as I don't have much time to dive head down into scripting...

RippleJet

#228
I quite agree. ;)
If zoom 5, based on zoom 6, looks better than a traditional zoom 5, then there's no need to keep the traditional zoom 5 at all.

In other words, we'd get the same result that Cogeo accomplished with his bus sign, but directly through the BAT script.

It needs to be optional though, and not set as default.
Otherwise, we'd get skyscrapers rendered for zoom 6 as well... $%Grinno$%


EDIT:
Quote from: buddybud on April 03, 2009, 10:40:24 AM
Ok i tried to add a 5th rep to the network model and a 5th s3d with a unique texture. The game didn't crash but it didn't use the the model or texture. But it was just a quick test. :thumbsdown:

Thanks for checking that out, Bud! :thumbsup:
At least we know that won't be possible now.

SimFox

Quote from: RippleJet on April 03, 2009, 11:10:02 AM

Otherwise, we'd get skyscrapers rendered for zoom 6 as well... $%Grinno$%

and what would be harm in that?   ::)

RippleJet


debutterfly

#231
Got it fixed thanks Allan.

-Larry (debutterfly)

Edit:
Here's Some more action

cogeo

Quote from: SimFox on April 03, 2009, 10:57:29 AM



Excellent model SimFox!  &apls

I have some questions:
- So this is now done by the script! Does this mean that the (same) model can be exported in either HD or normal mode (no prob if this requires manually replacing a script file, this is not an issue at all).
- Have you considered applying HD export for zoom level 4 (0x----03##) as well?
- Which script (filename pls?) have you changed? (don't want to see the changes, or tell me what the changes are, just take at look at the original). I didn't know that we had access to this part of BAT, I always thought this was a Maxis (?) "black box", with very few, if any, things that can be changed. It might be possible to improve more things then, eg the way alphas are made, the background colour etc.
- I see you have set the transparency too. Was this done in the script as well? Then I should rather consider stop working on my utility (its functions would be resizing of models, and set/remove transparency). In such a case you should make three scripts though, so that all combinations of HD and transparency become available.
- And (a little off-topic, sorry), as far as I can see the model has no problems with the shadows or "grille" lines on the platforms. Was some special technique employed here, or this is just a result a carefull application of standard techniques (a single-piece model, maybe some 0.05 or 0.10m above ground, and the platform being at least 0.45m tall)? Just curious! Did rendering in HD improved this too? Would it be too much to ask you send it to me to take a deeper look? (my email is public).

Congrats again!

Orange_o_

I am really very impressed Simfox, you are able to making very big things.  :o


I have ridiculous with my small bush, but I post it all the same



Normal export :
It's a normal export ;D

HD :
I have enlarges the first model to 200, reLOD and export.
With the Reader I have save the 4 FSH (30400,30410,30420,30430)
Then I imported this 4 FSH in the "normal export" to replace 4 initial
Only the FSH I don't understand why you import the S3D ???

HD+reFiSHing :
I have enlarges the first model to 200, make preview N,S,W,E,
Capture screen colour and the Alpha ;)
Reworking with photoshop and create the FSH
Then I imported this 4 FSH in the "normal export" to replace 4 initial


Orange




   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °  


jeronij

Shall we guess that once the new script is distributed,  we can simply re-render our old models to get the new HD ones ???.  Usually I use high res textures for all my models, so this would be a real "speedway" to update existing content  ::)
I am currently not active - Please, contact Tarkus for any site related matter. Thanks for enjoying SC4D :D


Autism Awareness;  A Father Shares
Mallorca My Mayor Diary


mattb325

Quote from: jeronij on April 03, 2009, 02:51:01 PM
Shall we guess that once the new script is distributed,  we can simply re-render our old models to get the new HD ones ???.  Usually I use high res textures for all my models, so this would be a real "speedway" to update existing content  ::)

This is my hope too. I still have almost all my model files (a couple are corrupt) but if this script works for gmax and simply enables a re-render of existing Bats without serious lag on the computer, then wow!  &apls

Yoder7652


SimFox

#237
Cogeo:

- yes this is all done by script, and currently switching between HD and normal export will require switching of two versions of script and a restart of MAX/GMAX. But that option/switch could be brought into the UI as well and I'll look into it when I'll get more time to continue work on new export script that would be compatible with MR3.6+

- yes it could also be easily accomplished, but I don't think be of any benefit at anyone. Ideally we always should see maximum information – eg have 1:1 ration between data in the texture and data displayed on screen. This HD export remedies situation of Zoom6 that isn't a real zoom – more like a digital zoom on pocket cameras or phones – just taking existing picture and blowing it up. And it comes at some cost to the Zoom5 since you see a reduced image. But doing it for other zooms would mean quadrupling size of the texture and file size and seeing only one quarter of it, I see no logic in it although I know some may find it more appealing cause it may appear "sharper". But I if it would be possible would still prefer the solution we were discussing with RippleJet – each Zoom level (including 5  and 6) having its own per pixel accurate textures. I couldn't check this possibility tonight but I'll try tomorrow morning.

- which script... well, more on this with an explanation how it works and why later... As far as alphas go... they are anyway made anyway at most efficient, best and as far as I can say only practical way – by alpha splitting TGA. Background color could be set via UI in Max so I see no point to do it in script, just as I'm very much against creation of new buttons and pull down menus that simply duplicate Max basic features. I think people should lean the tool they are using rather than rely on bells and whistles... But if you want to do same to GMAX it may be more complicated. GMAX export by default doesn't necessarily create alpha, but rather rely on black background to be an alpha of sorts. I haven't been with a fine comb through GMAX scripts, but I have a feeling that choice (as for background, alpha and so on) are in as you called it Maxis Black box.

- transparency wasn't set by the script. You'll see how simple the "scripting" was later on. It was done manually in iLive Reader. I don't think that thing like that could be accomplished with Max script since manipulation of data outside of Max is required. So, if you are making some sort of utility that would automate these sort of things that would be great! What are you writing it in?

- nope, no problem with grill... No special technique either. Just regular modeling to the real world sizes. I do follow overall rule of 1,3 vertical dimensions, but never scale my models. Instead I simply take that coefficient into account when modeling. I also don't apply it to everything, only major and meaningful elements. For instance for windows, but not to window frames.
This particular model is a single piece prop. The thickness of the platform is 30cm (which is about the real world size (about 20cm at least here in Helsinki) *1,3 give or take couple of cm... Anywhat at zoom 5 1 pixel is equal to 20,25 cm in vertical and 14,5 in other dimensions. But that doesn't mean that you can't make things smaller than that, at least in Max just need goo AA applied.
But, of course, the grill is caused by game internal workings. LODs just can't be too thin I guess. In this respect I wonder how Puzzle pieces work...
As far as this "HD" rendering concerned, I can't say yet if it does improve or otherwise something... there isn't yet enough evidence to make such a speculation. I can say one thing though... that degradation I saw on my subway entrance That I shown on my manually HD-d model wasn't there when export was done with a script... but then a rather nasty seesaw appeared... so...

Do you want to get this GLR model? In what format? SC4Modle or max?


Ok and now a little description and explanation on how this script works.

I got the idea on how to realize desired effect – effectively doubling texture size and, if necessary, cutting additional slabs only at zoom5 without any need to do manual work in Reader, while I was arguing with Warrior about similarities/differences between Puzzle piece models and BAT models. Idea evolved around 3 sets of measurements/coordinate systems we have there.
- Real and absolute with infinite resolution– size of the 3d model. After all 1 meter is 1 meter no matter how close you zoom on it, or out of it dimensions are represented by floats.
- Real but relative – bitmaps, textures, FSHs and abstract, relative and constant – UV space.

Properties of UV space mean that we don't need to bother with it. But other two need some consideration.
Scaling model 200% would give us our desired 2x resolution in textures. But it would also make a model twice the size. And we would need to go and manually reduce coordinates of s3d vertecies in reader –not a most pleasant task... and, most importantly absolutely pointless.
What we need is bigger textures without any increase in model size. So, whatever we do must be relative, not absolute. After arriving to this simple conclusion it was obvious what have to be done – we have to zoom into the model. This wouldn't make it bigger, it will make it appear bigger, make it bigger not absolutely, but relatively. This would also take care of any needed slab cutting, since it's also done not in absolute units (meters) but relative – pixels at given resolution/zoom level.

After that, it was a mere technicality, and since I've spent fare bit of time with scripts while making preview for Max, and later truNite exporter and Bat4Max 2.5 I just knew where to look to...

As a result altering only 3(!) characters had enabled HD export.
It's that simple!

For those who only use GMAX you would need this:
Ziped script file (Updated April 5th)
(replace with it one in your GMAX BAT script folder)

Those who use 3ds Max would also need this:
Ziped script file (Updated April 5th)
Also replace with it one that you currently have in your Bat4Max Scripts folder.

In order to revert to the original export just restore original scripts, or change 292 to 146 in array of values for zoomSizes in stViewportCameraRig Struct (you'll find it on line 63)

Preview:
In GMAX as long as you use modified script your zoom5 preview will be, in fact, zoom6 preview.
In Max to get Zoom6 preview you would need do same alteration as described above in ShortBatPreview03.ms, but naturally in reverse order.

For those who have problem with accessing files on Rapidshare they are attached to this message.
CameraRig.zip  is a file for GMAX
CPCameraRig.zip is for Max

Remember, if you use MAX you'll need BOTH!

mattb325

The Gmax script file certainly does what it says it does.

Attached to this post is a re-rendered prop of a deodara tree which I released in the W2W prop pack. the original is on the left; the HD on the right. The difference is remarkable.

The size of the tree is basically 17mx17mx37m. The old SC4.model file was 79KB - this new one is 206KB; more than double...but I never thought I would ever see such clarity from gmax  :)


jeronij

Outstanding render Matt :thumbsup:  (<-- you readed my mind about trees ;D)
I am currently not active - Please, contact Tarkus for any site related matter. Thanks for enjoying SC4D :D


Autism Awareness;  A Father Shares
Mallorca My Mayor Diary