SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH4 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=219)
-   -   [REL] S3D - Silent 3ditor (https://www.subsim.com/radioroom/showthread.php?t=119571)

Silverwolf 07-04-09 09:31 AM

I have a suggestion, why don't you take the material from the Dutchman and export it as a raw chunk. Then import it with the mod you want and see if that works. I don't know what the folder for the Dutchman is called though but I'm sure tweaking the already made material could produce the effect you want.

(edit)
Found it, the folder is NFD.

DarkFish 07-04-09 10:20 AM

Yep I already tried that, using the exact same texture the FD uses. But instead of a ghostly green I get a colorful rainbow:damn:

Silverwolf 07-04-09 11:45 AM

Hmm, just messed around with the texture and I can't get anything better than you can. I too would like to know how to get this to work cause I have a sub that's gonna need clear pieces for two parts.

Nisgeis 07-04-09 03:18 PM

Quote:

Originally Posted by DarkFish (Post 1128681)
I've got a problem myself too, when using (semi-)transparent textures. In S3D everything looks as it should, but in game the colors get all messed up:
http://i525.photobucket.com/albums/c...2/badcol-1.jpg
the texture used by this model is just a plain texture, RGB 167;167;255, alpha 128, but depending on the models orientation the color changes.
It should be possible to have semi-transparent textures, look at the flying dutchman for example, that one hasn't got any rainbow effect.

Anyone have any ideas how to get it working?

It's yet another 'feature' of SH4. Depth charges have the same property. the first time you start a game, then depth charges have a rainbow effect on them when they are created for launch from Y throwers, very similar to the effect you posted. If you can, start the game, start a campaign / single mission, quit out of it and then restart the mission and you should see the colours properly. Why on Earth the game does this, I have no idea. Just another bug I guess.

EDIT: It should be noted that ships in game don't have this effect, but generated objects do (like depth charges) so there may be some controller affecting the behaviour. Either way, there's no excuse for things to behave differently after restarting a mission.

Madox58 07-04-09 04:12 PM

Take a look at how the Glass is handled in the Aircraft.
Perhaps that will help?

DarkFish 07-04-09 05:26 PM

I tried restarting the mission, but it doesn't work.
Looking at the aircraft glass didn't get me further either, it's not too different from some other transparent examples in game (FD, trees)
Judging from these it must be somehow possible to eliminate the rainbow effect, but I just can't figure out how:damn:

In the meantime I did find out that there doesn't have to be an alpha channel in the texture, just enabling alpha+disabling z-buffer write in S3D is enough to get this strange effect.:hmmm:

Madox58 07-04-09 05:42 PM

You don't have the unifiedrender controller active do you?
I notice the Glass does not use that controller.

DarkFish 07-04-09 05:51 PM

I didn't, I just set up a test mission with the model using a UnifiedRender controller and IT WORKS:DL

Apparently models need this controller to counter the rainbow effect

all thx for your help:salute:

Madox58 07-04-09 05:56 PM

Very cool.
:up:

Maybe the Glass stuff has a hard coded controller then.
:hmmm:

Anyway,
Glad you got it sorted.
:yep:

skwasjer 07-04-09 07:30 PM

Quote:

Originally Posted by keltos01 (Post 1126500)
tried... gave the same screen...

first time ever this happened to me !

keltos

I've already replied to Keltos in pm a week ago, but the game is limited to 65K (65536) uv indices per model. Depending on how good the uv-map can be compressed, this equates to a similar amount or more number of texture coordinates, but there's no rule here.

The solution is to break up the model into two or more parts... This is recommended anyway, because the bigger a model, the more CPU/GPU power is needed to be rendered, as opposed to having the same model in 10 submodels. Clipping a model, computing a bounding box, lighting computations, hitzone/intersect calculations, running it through a shader, etc, all can usually be done faster on several smaller models...

Madox58 07-04-09 07:42 PM

Good information.

Also,
It's easy to get a bit carried away with doing 3D models.

I studied some tutorials on low poly modeling.
And that helped alot.

skwasjer 07-04-09 07:58 PM

Very true. This is actually the hardest part of modelling, making a high poly model look good at half or even less the number of polygons (as far as 10x smaller) from the original.

I forgot to add, any modern game uses a form of lazy loading, meaning it won't load an object unless is has to (S3D does so too partially). Translate this to a huge single model vs 10 smaller ones, anyone can understand why breaking up models is faster. If sections of the model are not in view, it shouldn't need to load them. It saves precious system memory, doesn't need to access your disk, doesn't need to upload the model from system mem to GPU mem, and so on...

The opposite is true for materials/textures, 4 1024x1024 textures is usually worse than one 2048x2048, but it depends a bit on the situation.

Madox58 07-04-09 08:03 PM

Do you think or know that the models in SH series are broken up because of this?
As an example,
detaching some faces even though a part of a single obj file?

skwasjer 07-04-09 08:24 PM

Detaching objects in 3D program as you've indicated in the past is usefull for making unique vertices (with different normals) for a plane, allowing for hard edges. But if you import it as a single object, it's still one object, just with a little bit more (duplicate) vertices. So in context of what I wrote above it won't make alot difference as far as performance is concerned.

But if you import the subobjects from an OBJ-file into seperate 3D chunks, then they are considered seperate objects that can each be loaded (or unloaded for that matter) whenever needed. When an object is loaded into system mem but can be clipped because it's outside of the view frustrum, then it won't pass through the entire render phase, leading to better FPS. Big objects that are only visible for 10% still need to pass through the render phase completely, which hurts performance, especially when you run low on GPU mem...

So yea, in some way the developers definately considered this, although it's not apparent (or not needed) in all game files.

Madox58 07-05-09 07:52 AM

Very cool.
That answers a few things.
Thank you.
:salute:

skwasjer 07-08-09 05:41 PM

One thing I'd further like to add is, don't go overboard by dividing a model into too many submodels either. In the end, more models have a little bit more overhead in terms of system memory, matrix computations and device state changes (swapping a material, setting renderflags), so you have to balance it out a little. The best rule of thumb probably is to stay away from large models with big dimensions that will always be in view when they are not cut into pieces. In interiors you can probably get the best improvements, for instance:

- don't use one big model for the hull because then it will always need to be drawn no matter where you look.
- Don't combine two desks in an interior that are spaced apart 40 meters...
- etc.

For the very same reason, ship hulls (even though big dimension), are usually one big model, because you are likely to see it completely anyway (you are not supposed to be only 50 meters away from it right?), so breaking it apart doesn't give you a performance boost, on the contrary...

Confusing? :hmmm:

keltos01 07-09-09 01:22 AM

clear as day !

making the guns decks a separate obj in the Narwhal sub allows me to work on it without having to go through the hassle of rebuilding the whole hull and hull AO map everytime -> faster too

Thanks Skwasjer !

keltos

skwasjer 07-24-09 01:48 PM

Patience... I can't access my home computer right now because I had to move out temporarily (I recently seperated), but I will post it as soon as I can.

Regards...

Rubini 07-27-09 08:33 PM

Hi guys,

I already asked skwasjer but he recall me that he donīt have his files for a while.
So, can someone send me a link (by PM ) of the last S3d beta with zones edition feature?

Thanks!:up:

Rubini.

iambecomelife 07-27-09 08:37 PM

Quote:

Originally Posted by Rubini (Post 1141097)
Hi guys,

I already ask skwasjer but he recall me that he donīt have his files for a while.
So, can someone send me a link (by PM ) of the last S3d beta with zones edition feature?

Thanks!:up:

Rubini.

Same here, please. :DL


All times are GMT -5. The time now is 05:54 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Đ 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.