Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 10:17 pm
All times are UTC + 0
Combining two voxels into one
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
IvanaNetDoma
Vehicle Driver


Joined: 09 Nov 2020

PostPosted: Mon Nov 23, 2020 10:29 pm    Post subject:  Combining two voxels into one Reply with quote  Mark this post and the followings unread

Cant decide how could i combine 2 voxels into one Very Happy
I need them to be in one section, and not in two different sections (not like a tank and its turret)  Sad

Back to top
View user's profile Send private message
PussyPus
Commander


Joined: 14 Jul 2015
Location: Egypt

PostPosted: Tue Nov 24, 2020 1:50 am    Post subject: Reply with quote  Mark this post and the followings unread

Like creating a mirror in the same section using VXLSEIII? I did this in very few voxels such as the YR Battle Fortress, so that it would have additional 2 tank treads in the top alongside the bottom.

_________________
If you are a MetalHead (Heavy Metal Fan) and don't want to be a metalhead, Just remove your metal ball from your head. �:p .

Back to top
View user's profile Send private message ModDB Profile ID Skype Account
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Nov 24, 2020 3:43 am    Post subject: Reply with quote  Mark this post and the followings unread

There is no easy or good way of doing that. Tank chassis and turret could be in different files with tankname.vxl and tanknametur.vxl.

For same voxel file:
- Can import a section from a different voxel file, making it a multi-section voxel. Then use HVA Builder to align those.
- Can open the 2 voxels in 2 different Voxel Section Editor and align the canvas. Then copy layer by layer from one to another. Then redo normals.
- Can use XCC Mixer to do the same by exporting the layers into 2D images of both voxels and then combining in some image editor and then use XCC Mixer to assemble them back. Then redo normals.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Nov 24, 2020 5:01 am    Post subject: Reply with quote  Mark this post and the followings unread

Just for reference, I have a tanker truck made with 2 sections (cab+trailer) and I released a dumper truck with a plow some people wanted to use as a harvester with 4 sections. As long as the sections aren't animated the game handles their rendering priority well.

Alternately resize the canvas to be the same dimensions in at least one plane, then with 2 instances of VXLSE copy and paste from one to the other where they don't overlap. Then fill in the rest manually.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Tue Nov 24, 2020 6:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

I think there should be a tutorial on this somewhere. Anyway, here's a rough one.

Save your two voxels (let's call them hull.vxl and deck.vxl for this guide).
* For convenience, change the canvas size so that they are both the same dimensions.
* Align them (by using the nudge function on VXLSEIII). Use reference points to algin them so that if they were combined without any changes, they would be in the right positions.

Once you've saved them, open XCC Mixer, and browse to your working directory. Right click on each voxel, and choose "Copy as Text". This will create two text that we will be using to merge the voxels.

Create a new text file, let's call it output.txt. Open all three files, and copy the contents of hull.txt and deck.txt into output.txt, one after the other. Save output.txt.

Go back to XCC Mixer, refresh and right click output.txt, and chose "Copy as Voxel". This will create a new file, output.vxl that has the content of both the old files in one section.

Open this file in VXLSEIII. If it looks good (positioning, scale), kick off autonormals and you're good to go.

If it looks out of position, you'll need to open the original vxl to reposition one them (with respect to each other), and then redo the conversion through text.



Things to note:
* This only works well when both files are the same scale.
* XCC Mixer doesn't convert normals. You'll need to do them yourself after converting.

Back to top
View user's profile Send private message
IvanaNetDoma
Vehicle Driver


Joined: 09 Nov 2020

PostPosted: Tue Nov 24, 2020 7:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
There is no easy or good way of doing that. Tank chassis and turret could be in different files with tankname.vxl and tanknametur.vxl.

For same voxel file:
- Can import a section from a different voxel file, making it a multi-section voxel. Then use HVA Builder to align those.
- Can open the 2 voxels in 2 different Voxel Section Editor and align the canvas. Then copy layer by layer from one to another. Then redo normals.
- Can use XCC Mixer to do the same by exporting the layers into 2D images of both voxels and then combining in some image editor and then use XCC Mixer to assemble them back. Then redo normals.


im understand that but i dont need for turret  to rotate ( for example). But thanks for help, ill try your methods

Back to top
View user's profile Send private message
IvanaNetDoma
Vehicle Driver


Joined: 09 Nov 2020

PostPosted: Tue Nov 24, 2020 7:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

silverwind wrote:
I think there should be a tutorial on this somewhere. Anyway, here's a rough one.

Save your two voxels (let's call them hull.vxl and deck.vxl for this guide).
* For convenience, change the canvas size so that they are both the same dimensions.
* Align them (by using the nudge function on VXLSEIII). Use reference points to algin them so that if they were combined without any changes, they would be in the right positions.

Once you've saved them, open XCC Mixer, and browse to your working directory. Right click on each voxel, and choose "Copy as Text". This will create two text that we will be using to merge the voxels.

Create a new text file, let's call it output.txt. Open all three files, and copy the contents of hull.txt and deck.txt into output.txt, one after the other. Save output.txt.

Go back to XCC Mixer, refresh and right click output.txt, and chose "Copy as Voxel". This will create a new file, output.vxl that has the content of both the old files in one section.

Open this file in VXLSEIII. If it looks good (positioning, scale), kick off autonormals and you're good to go.

If it looks out of position, you'll need to open the original vxl to reposition one them (with respect to each other), and then redo the conversion through text.



Things to note:
* This only works well when both files are the same scale.
* XCC Mixer doesn't convert normals. You'll need to do them yourself after converting.


Thanks for help, ill try your methods!   Smile

Back to top
View user's profile Send private message
IvanaNetDoma
Vehicle Driver


Joined: 09 Nov 2020

PostPosted: Tue Nov 24, 2020 7:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Just for reference, I have a tanker truck made with 2 sections (cab+trailer) and I released a dumper truck with a plow some people wanted to use as a harvester with 4 sections. As long as the sections aren't animated the game handles their rendering priority well.

Alternately resize the canvas to be the same dimensions in at least one plane, then with 2 instances of VXLSE copy and paste from one to the other where they don't overlap. Then fill in the rest manually.


Thanks a lot!

Back to top
View user's profile Send private message
IvanaNetDoma
Vehicle Driver


Joined: 09 Nov 2020

PostPosted: Tue Nov 24, 2020 9:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Just for reference, I have a tanker truck made with 2 sections (cab+trailer) and I released a dumper truck with a plow some people wanted to use as a harvester with 4 sections. As long as the sections aren't animated the game handles their rendering priority well.

Alternately resize the canvas to be the same dimensions in at least one plane, then with 2 instances of VXLSE copy and paste from one to the other where they don't overlap. Then fill in the rest manually.


I wanna make carrier with plane on it ( like destroyer ship but on land ), but when plane on different section, in-game it starts artifacting and lagging  Sad

Back to top
View user's profile Send private message
IvanaNetDoma
Vehicle Driver


Joined: 09 Nov 2020

PostPosted: Wed Nov 25, 2020 10:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

PussyPus wrote:
Like creating a mirror in the same section using VXLSEIII? I did this in very few voxels such as the YR Battle Fortress, so that it would have additional 2 tank treads in the top alongside the bottom.


Nope, exactly i mean to put plane on aircraft career ( like destriyer ship ) or like put v3 rocket on v3 launcher

Back to top
View user's profile Send private message
PussyPus
Commander


Joined: 14 Jul 2015
Location: Egypt

PostPosted: Wed Nov 25, 2020 11:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

IvanaNetDoma wrote:
PussyPus wrote:
Like creating a mirror in the same section using VXLSEIII? I did this in very few voxels such as the YR Battle Fortress, so that it would have additional 2 tank treads in the top alongside the bottom.


Nope, exactly i mean to put plane on aircraft career ( like destriyer ship ) or like put v3 rocket on v3 launcher

I don't think it's possible, but silverwind's reply looks barely promising.

_________________
If you are a MetalHead (Heavy Metal Fan) and don't want to be a metalhead, Just remove your metal ball from your head. �:p .

Back to top
View user's profile Send private message ModDB Profile ID Skype Account
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Thu Nov 26, 2020 9:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

It needs some prepreparation, but it is indeed possible.

When you convert from vxl to txt in XCC Mixer, the text files are simply a comma-separated list of pixels and their locations, but only if the pixels is actually colored. Because of this, simply pasting the contents of a second file is enough to effectively merge the two. It would have been great of XCC also converted the normals, but it is what it is.

Combining several different voxels into one by means of sections is one of the things I tried early on in my modding career, over a decade ago. IIRC, it was a farrago of several tanks to try and make a badass looking one. It failed miserably for various reasons (shadows, locations, etc), until one of the veterans (either Mig, or DC, not sure) pointed me to the method above.

EDIT: I've attached 3 files:

CDESTWO is the coastguard destroyer without a spawn, while
FALC is the harrier - both have had their canvas changed to 43x43x120. The ship was nudged forward, while the aircraft was nudged up about 10 pixels

BDEST is the other two files combined through text. The normals had to be changed back to 4 (Ra2) and autonormalled. The voxel bounds were also reset. The whole process took less than 10 minutes.



bdest.vxl
 Description:

Download
 Filename:  bdest.vxl
 Filesize:  96.91 KB
 Downloaded:  14 Time(s)


falc.vxl
 Description:

Download
 Filename:  falc.vxl
 Filesize:  51.21 KB
 Downloaded:  8 Time(s)


cdestwo.vxl
 Description:

Download
 Filename:  cdestwo.vxl
 Filesize:  89.07 KB
 Downloaded:  10 Time(s)


Back to top
View user's profile Send private message
IvanaNetDoma
Vehicle Driver


Joined: 09 Nov 2020

PostPosted: Sun Nov 29, 2020 10:45 am    Post subject: Reply with quote  Mark this post and the followings unread

silverwind wrote:
It needs some prepreparation, but it is indeed possible.

When you convert from vxl to txt in XCC Mixer, the text files are simply a comma-separated list of pixels and their locations, but only if the pixels is actually colored. Because of this, simply pasting the contents of a second file is enough to effectively merge the two. It would have been great of XCC also converted the normals, but it is what it is.

Combining several different voxels into one by means of sections is one of the things I tried early on in my modding career, over a decade ago. IIRC, it was a farrago of several tanks to try and make a badass looking one. It failed miserably for various reasons (shadows, locations, etc), until one of the veterans (either Mig, or DC, not sure) pointed me to the method above.

EDIT: I've attached 3 files:

CDESTWO is the coastguard destroyer without a spawn, while
FALC is the harrier - both have had their canvas changed to 43x43x120. The ship was nudged forward, while the aircraft was nudged up about 10 pixels

BDEST is the other two files combined through text. The normals had to be changed back to 4 (Ra2) and autonormalled. The voxel bounds were also reset. The whole process took less than 10 minutes.


i appreciate your help, thanks a lot!  Smile   Surprised

Back to top
View user's profile Send private message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Sat Oct 15, 2022 7:20 am    Post subject: Reply with quote  Mark this post and the followings unread

Sorry if this is quite a necrobump but how can I nudge forward/backward? My VXLEditor( 1.38 ) only has nudge left/right and up/down.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sat Oct 15, 2022 8:22 am    Post subject: Reply with quote  Mark this post and the followings unread

If you're in side view, where do you think nudge left/right go?

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1802s ][ Queries: 13 (0.0103s) ][ Debug on ]