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)
-   -   [TEC] Pack3D and SH4... (https://www.subsim.com/radioroom/showthread.php?t=112162)

UBOAT234 05-06-07 03:37 PM

Maya
 
In this case with Maya:

Import the .obj, before modified and saved

http://immagini.p2pforum.it/out.php/i150657_maya016.jpg

Go to the Hypershade
http://immagini.p2pforum.it/out.php/i150669_maya017.jpg

Select the second material, Maya have named it with 3, but this is the second, the name is not important.
With right click on the mouse, selects in the menų as soon appeared:
Select Objects With Material
http://immagini.p2pforum.it/out.php/i150745_maya018.jpg

Now it select the Material and this is the Railing
http://immagini.p2pforum.it/out.php/i150683_maya019.jpg
http://immagini.p2pforum.it/out.php/i150684_maya020.jpg

Move the faces selected towards the high
http://immagini.p2pforum.it/out.php/i150686_maya021.jpg
http://immagini.p2pforum.it/out.php/i150689_maya022.jpg

But if you select the Railing, it is joined to the main hull
http://immagini.p2pforum.it/out.php/i150690_maya023.jpg

Now select in the menu Polygons and select Separate
http://immagini.p2pforum.it/out.php/i150694_maya024.jpg

After the separation process, select all the faces of Railing ad select, in the menu Poligons, Combine
http://immagini.p2pforum.it/out.php/i150695_maya025.jpg

Now the Railing is one object, separated from the main hull
http://immagini.p2pforum.it/out.php/i150697_maya027.jpg


Now you can start to produce the Low Poligons for the process of Occlusion Map

Continue...


BEST REGARDS
UBOAT234

UBOAT234 05-06-07 04:27 PM

Tut
 
The job continues

Now, also other objects are separated from the main hull
http://immagini.p2pforum.it/out.php/i150703_maya028.jpg

And if you have noticed, there are still of the objects groups.
Well, these are the objects that will come mapped in the Texture. O01


But they have the Vertex with a reference mistaken, different, because they have a reference from Pack3d to the Vertex, from the Texture .T01
http://immagini.p2pforum.it/out.php/i150717_maya029.jpg

We must create a new Texture .O01, because we have changed the structure, Re-Mapped, Cloned, Add, Duplicate ecc.
Well, the next operation is simple, but to make with attention

Select one of this object
http://immagini.p2pforum.it/out.php/i150723_maya030.jpg

In the menu Edit Polygons, select Split Vertex
http://immagini.p2pforum.it/out.php/i150724_maya031.jpg

and after we go to the menu Poligons and select Separate
http://immagini.p2pforum.it/out.php/i150728_maya032.jpg

Now all the triangles, of the object selected, is separated and have everyone, the vertex right
http://immagini.p2pforum.it/out.php/i150733_maya033.jpg

If you Re-Combine the triangles, the object have a reference for being mapped, and for create the New Texture Map.
http://immagini.p2pforum.it/out.php/i150734_maya034.jpg


Continue...


BEST REGARDS
UBOAT234

UBOAT234 05-08-07 09:08 AM

Bake Occlusion Map
 
Basics of how to bake ambient occlusion maps in Maya 8. The process is similar for all versions of Maya but the names will be different...
In Maya there are probably, many ways to make this, but for me, this is much express.

MLB =Mouse Left Button
MMB =Mouse Medium Button
MRB =Mouse Right Button

SHADER NETWORK
Open the hypershade window and from the Maya nodes list and drag with MMB a Surface Shader node to the work area
http://immagini.p2pforum.it/out.php/...ntoccben01.jpg

We must modify the Node
Go to the top of the nodes list and change it to MentalRay nodes click with MLB on the "Create Maya Nodes"
http://immagini.p2pforum.it/out.php/...ientocc002.jpg

Select textures tab and with MMB drag an 'mib_amb_occlusion' node in to the work area
http://immagini.p2pforum.it/out.php/...ntoccben02.jpg

Now connect the 'OutValue' of the Occlusion node to the 'OutColor' of the surface shader. This is the default connection between these 2 nodes so you can do this by simply holding down Ctrl and MMB dragging the occlusion node over the shader node
http://immagini.p2pforum.it/out.php/...ntoccben03.jpg
http://immagini.p2pforum.it/out.php/...ientocc003.jpg


Continue...

UBOAT234 05-08-07 09:09 AM

Occlusion Map
 
Now we setup the scene
In order to get good results from Ambient Occlusion the scene environment must be white. To do this open the Outliner window and select the Persp camera. In the attribute editor under the Environment tab slide the Background Color to 100% white
http://immagini.p2pforum.it/out.php/...ntoccben04.jpg
http://immagini.p2pforum.it/out.php/...ientocc004.jpg
http://immagini.p2pforum.it/out.php/...ientocc006.jpg

Now open the Render Globals window and select MentalRay as your renderer and Production as the quality preset. Now change the multi-pixel filter to "Lanczos". (this will automatically change your Quality preset to 'Custom' like in the picture)
http://immagini.p2pforum.it/out.php/...ntoccben05.jpg

Close the render Globals window and assign the 'Surface Shader' you have setup to your model. It should turn the model completely black.
The time for apply the texture, depend of the configuration of the your Workstation
http://immagini.p2pforum.it/out.php/...ientocc007.jpg
http://immagini.p2pforum.it/out.php/...ientocc008.jpg
http://immagini.p2pforum.it/out.php/...ientocc009.jpg
http://immagini.p2pforum.it/out.php/...ientocc010.jpg
http://immagini.p2pforum.it/out.php/...ientocc011.jpg

Tweaking
Frame your model and hit render. It should render quickly and look quite grainy and crap at this stage, like this:
http://immagini.p2pforum.it/out.php/...ientocc012.jpg
http://immagini.p2pforum.it/out.php/...ientocc013.jpg

Now we need to tweak the settings a little. Open the attribute editor and then in the Hypershade window click on the Ambient Occlusion node. The Occlusion node's attributes will now appear in the attribute editor. These are the settings I use
The first setting to change is 'Samples'. Increasing this will remove the grainy look but will drastically increase render times. 256 samples is good for most objects
Do not change the 'Bright' and 'Dark' settings. These affect how light/dark the occlusion value is, but it is a lot better to render with the default extremes and tweak them in Photoshop at a later stage if you need to.
http://immagini.p2pforum.it/out.php/...ientocc015.jpg

The spread setting affects how far the occlusion shadow spreads over the surface. Again the default setting of 0.800 is good for most objects, any lower tends to be too extreme, and a high spread can cause darkening problems when it is multiplied over your colour layers in Photoshop.

Baking
Once you have the occlusion looking good in a render, the next stage is to bake it to a texture.

Continue...

BEST REGARDS
UBOAT234

GuillermoZS 05-08-07 03:45 PM

Hi there! Well, actually I know how to generate occlusion maps in 3ds max and Maya, you could have just asked lol :D

Anyway, generating the occlusion map is relatively easy, the problem is exporting the object with the different UVs and pack it back to a .dat, thatīs just what I donīt know how to do... at least without messing all the texture info :cry:

By the way, I DO NOT recomend to use Maya to modify objects for SH4: the maya shading network creates an additional render node (I donīt remember the name right now) that is exported with the .obj and is not recognized by the game engine. Try modifying an object in maya, export it as .obj and import it in 3DSmax: you will see an strange texture in the material editor... thatīs the additional node created that breaks the original objectīs textures and shadings.

As I saw in the development diary videos of the game it seems they used 3dsmax to create the game so I would stick to this app to modify objects...

Thanks for the tips! :up:

UBOAT234 05-08-07 04:10 PM

3ds and Maya
 
Right,
When you export with Maya, you must edit the .obj and the .mtl, before import with Pack3D.
If you have set the Normals in Revers and change the tex-to-Vertex. The AO result Black.
For import, after you have modified the Model, in end and only in end of all, you can create the AO. Is perfect in 3DS. :up:

Check PM

BEST REGRADS
UBOAT234

UBOAT234 05-08-07 04:42 PM

AO
 
If the result, after the Convert to file Texture, is this:
http://immagini.p2pforum.it/out.php/...ientocc020.jpg

The Work with textur mapping, Vertex, UV and Normals is not good.
Set the UV with a new map and rework all Triangles. After re-combine the object.
It is not enough Import only.

BEST REGARDS
UBOAT234

UBOAT234 05-08-07 05:41 PM

Tec For Increase the RAM in Render
 
Resolve the problem for error in Rendering With 3DS and Maya

WinXP of default use the RAM, for any process, to 1GB.
If the scene is extremly complex, it load all the memory until to 1GB and the System Crash.

Open the Control Panel of Windows XP, click on the System, and
http://immagini.p2pforum.it/out.php/...ientocc022.jpg


This is in italian, but is the same flag in other language.
Select setup
This window appear
http://immagini.p2pforum.it/out.php/...ientocc023.jpg

After select Modify
Appear the file Boot.ini
http://immagini.p2pforum.it/out.php/...ientocc024.jpg


You must add the line seselcted and save
After close all and reboot
It increase the RAM for process to 3GB (really is not 3GB but it is another value)

In the next restart of Windows XP, you can to choose two different Boot.
One normal and one with 3GB.
With 3GB is, for example only for work with 3DS and Render...

For more information:
http://www.microsoft.com/whdc/system...AE/PAEmem.mspx

BEST REGARDS
UBOAT234

skwasjer 05-09-07 09:31 AM

Hi, got a PM from UBOAT234.
Great stuff going on here.

My project is still in the works, although progressing slow atm. I didn't have much of time the past couple weeks. My aim is to support exporting and reimporting the TMAP but I don't know yet how to store it in the OBJ format (or if it is even possible). I am also looking at different formats. DivingDuck has given me some help with the 3DS format, but all in all, its alot of work. Anyone with info (on how you do things manually) please share :)

One note on progress: I coded a custom hexedit control. My aim is to embed it in the tool for all non-identified data, so it allows for in-place editting as opposed to using a seperate tool. This will reduce errors and allows for easier navigation throughout the dat-file.

In 2 weeks I'm off for a 3 week vacation, and currently my dayjob has a bigger prio, so I don't promise anything soon.

UBOAT234 05-09-07 04:50 PM

Ok
 
Quote:

Originally Posted by skwasjer
Hi, got a PM from UBOAT234.
Great stuff going on here.

My project is still in the works, although progressing slow atm. I didn't have much of time the past couple weeks. My aim is to support exporting and reimporting the TMAP but I don't know yet how to store it in the OBJ format (or if it is even possible). I am also looking at different formats. DivingDuck has given me some help with the 3DS format, but all in all, its alot of work. Anyone with info (on how you do things manually) please share :)

One note on progress: I coded a custom hexedit control. My aim is to embed it in the tool for all non-identified data, so it allows for in-place editting as opposed to using a seperate tool. This will reduce errors and allows for easier navigation throughout the dat-file.

In 2 weeks I'm off for a 3 week vacation, and currently my dayjob has a bigger prio, so I don't promise anything soon.



In any case, Good Work :up:

BEST REGARDS
UBOAT234

UBOAT234 05-09-07 05:00 PM

Ambient Occlusion
 
Here a good work
In this case, nearly all the parameters are right
http://immagini.p2pforum.it/out.php/...ientocc025.jpg

The problem remains insert the data in .dat file...

BEST REGARDS
UBOAT234

skwasjer 05-09-07 08:50 PM

Can you blend it with the main texture and generate OBJ files for me? This would give me a source to work with...

I can have a look at the issue GuillermoZS describes as well.

UBOAT234 05-10-07 05:24 AM

Ambient Occlusion
 
Quote:

Originally Posted by skwasjer
Can you blend it with the main texture and generate OBJ files for me? This would give me a source to work with...

I can have a look at the issue GuillermoZS describes as well.

In this night, I have worked with a prorammer/tester of Maya, for this process, of what you say... Is a problem make a .obj with this information. I make and send you the .obj.

The second problem is this: all the object contained in the .dat, they must be updated?
Obj extracted from .dat file, from Pack3D, contain some error for the production of the Baked AO.

BEST REGARDS
UBOAT234

skwasjer 05-10-07 01:48 PM

Quote:

Originally Posted by UBOAT234
In this night, I have worked with a prorammer/tester of Maya, for this process, of what you say... Is a problem make a .obj with this information. I make and send you the .obj.

The second problem is this: all the object contained in the .dat, they must be updated?
Obj extracted from .dat file, from Pack3D, contain some error for the production of the Baked AO.

My workaround idea is to generate two obj-files. The main one, and another holding the same model but now with the texture map from the TMAP. You could edit them seperately, and reimport them back into the DAT seperately as well. As long as geometry doesn't change there is no problem. When geometry does need to change, it should be changed in both files (together with both textures obviously). Then there is no problem either. I can import the new geometry back from the primary file, as well as the main texture info. Then, when importing the 2nd obj (with shadow map) I would map each face to the first obj, find the texture that is mapped onto it and put it in TMAP.

All in all, I prefer a different file format, which can hold this info together.

Hope this is clear...

[edit] After analyzing the 3DS format I see quite a few similarities with the DAT format. So I have high hopes of exporting/importing directly to 3DS. This includes all 3D objects, so not a seperate file for each object... :)

GuillermoZS 05-11-07 04:50 AM

[TUT] How to create Occlussion maps with 3DSMax
 
Hi! As promised here is a little tutorial about creating the Occlusion map for an object in 3DSMax. Also Iīll show how the program creates the aditional UVs for the Occlusion map...

Iīm going to use the King George V object for this "tutorial". Do all this before starting:
Import the .obj and flip poligons.
In the material Editor, remove the default .tga attached to the Diffuse Color channel.
Switch to MentalRay as renderer.

Ok, now in Material Editor create a new map for the Diffuse Color channel (click on "none") and select "Ambient/Reflective Occlusion (base)" at the top of the list.

http://img.photobucket.com/albums/v2...llermoZS/1.jpg

Since this tutorial just covers the very basics I wonīt enter in what every parameter is used for... (in the future Iīll do a much more in deep tutorial if you want ;-)

Change "Samples" to 78 and "Spread" to 0,2. Make a render:

http://img.photobucket.com/albums/v2...llermoZS/2.jpg

Ok, we have an occlusion map being generated by mentalray every time we render the scene. Now we are going to bake this map into an image:

SELCT THE OBJECT and go to Rendering> "Render to Texture" in the menu tabs.

This dialog will appear:

http://img.photobucket.com/albums/v2...llermoZS/3.jpg

Left everything as default EXCEPT:

1. In "General Settings" select where you want the image to be saved.

2. In "Output" press button "Add..." and select "Ambient Occlusion (MR)" from the list, click on "Add Elements". Press the "1024x1024" button.

Click on "Render"

If a "Missing Map Targets" dialog appear click "continue"

Let the computer "think". When done you will find the occlusion map saved in the folder you selected before in "General Settings".

http://img.photobucket.com/albums/v2...lusion_MR_.jpg

Ok, the map is now generated BUT NOTICE THAT SOME CHANGES HAVE TAKEN EFFECT ON THE OBJECT:

To generate the occlusion map, 3ds max have generated a new modifier for the object: "Automatic Flatten UVs"

http://img.photobucket.com/albums/v2...llermoZS/4.jpg

This modifier GENERATES ANOTHER UV MAP FOR THE OBJECT AND THIS UV MAP IS THE ONE USED TO GENERATE THE OCCLUSION MAP. This is the problem I described some posts ago about double UVs in the same object... As you can see in the picture the new map is stored on the map channel 3, so we will need to tell the application what UVs correspond to what texture.

Go to the Material Editor and clear the Ambient Occlsion map in the Color Difuse Channel. Load a bitmap in this channel and use the Occlusion map you just generated. Make a render and you will see this:

http://img.photobucket.com/albums/v2...llermoZS/5.jpg

Something similar at what you see in the game right? The problem here is that the map is using the original UVs instead of the generated ones. In the Material Editor go to the map you have just loaded and change map channel to 3 (the one where the "auto faltten UVs" modifier created the UVs for the occlusion baking). Make a render.

http://img.photobucket.com/albums/v2...llermoZS/6.jpg

Here you go ;-)

Now, the BIG problem is pack all this info in a .dat file.

By the way, Iīm pretty sure this is the way developers created the models for the game... the thing is how did they pack them?

Cheers!

skwasjer 05-11-07 06:12 AM

Give me the 3DS file, so I can analyze it. Once I tackle this, I will be able to export/import 3DS directly from the DAT.

Here's a break down of a test file of DivingDuck:

View

UBOAT234 05-11-07 10:40 AM

Tmap
 
I have not understood well :damn:
I have watched the chunk TMAP superficialally. But there are chunk TMAP after every object 3d.
All TMAP chunk contain the UVs map of the Occlusion? Or it contain also the 3d object? Or only the the first TMAP chunk contain all UVs? :rock:

(Still a problem and I break off all the PC that in house) :nope::arrgh!:


BEST REGARDS
UBOAT234

skwasjer 05-11-07 11:47 AM

See here:

http://www.subsim.com/radioroom/show...=105059&page=2

I explain the TMAP and also show screenshots of renderings directly from .DAT (nothing exported)

tater 05-11-07 12:22 PM

What about the port objects? I tried exporting one with pack3d, and all i got was an mtl file.

bruschi sauro 05-11-07 02:14 PM

Quote:

Originally Posted by GuillermoZS
Here is a closeup of the affected area:

http://img.photobucket.com/albums/v2.../TextFound.jpg

Both back turrets and the flag are upside down. I have also found where that funky alien texture comes from, itīs "Caustics_new.dds" texture. It seems that when I get close to the ship the program tries to generate caustic and, instead of that, changes both color-caustics textures :o

Just for fun I shot some fishes to the ship and look what happened:

http://img.photobucket.com/albums/v2...oZS/TexHit.jpg

as soon as the torpedo hit the ship the texture turned into this :o:o:o I think itīs the normal map applied as color map...

Well it seems that Pack3D is no getting well with the new normal/specular/caustics maps...

Is someone else having troubles like these?

Scusa ma cosa fanno i giapponesi quando li siluri?
s'incazzano di brutto:rotfl: :rotfl:


All times are GMT -5. The time now is 02:16 PM.

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