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 Apr 18, 2024 11:30 am
All times are UTC + 0
Shp drawing on cell
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [7 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Sun Jul 19, 2020 7:45 pm    Post subject:  Shp drawing on cell Reply with quote  Mark this post and the followings unread

How does one correctly draw a tree on a cell?
Like TREE01.urb frame#1 has x=61, y=1, width=33, height=78
And SIGN01.urb frame#1 has x=72, y=40, width=9, height=40

I am comparing it to FA2, but it does not appear that I can get them aligned properly.
What offset from the cell is to be used? Top-left, center etc.?

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

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


Joined: 09 Feb 2015

PostPosted: Sun Jul 19, 2020 9:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

I believe the center of the .shp to the center of the cell ie. 128x128 leptons from the top corner.

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

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


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Mon Jul 20, 2020 2:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

Heh, that's simple. I had to ignore the x-y in the header, this looks okay.
Thanks.

EDIT:
I see that in-game, the objects are displayed at a different position.
Though minor, I can see that the tibtree is position perfectly in the red tile.
The other trees and sign post also seem to move a tiny bit further down, but not as far as the tibtree.



Screenshot_20200720_163311.png
 Description:
 Filesize:  81.4 KB
 Viewed:  671 Time(s)

Screenshot_20200720_163311.png



_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

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


Joined: 09 Feb 2015

PostPosted: Wed Jul 22, 2020 12:16 am    Post subject: Reply with quote  Mark this post and the followings unread

There are sometimes reasons for this, like the yield sign is meant to be on the dirtroad tiles, and moving it up slightly puts it off the asphalt. In cases like the Tib tree, it's in a giant field and might be a visual trick to make it seem like it's sitting higher on a mound.

The normal trees are all wonky/inconsistent to begin with, many of them still have TS shadow directions.

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

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


Joined: 03 Sep 2004

PostPosted: Wed Jul 22, 2020 2:07 am    Post subject: Reply with quote  Mark this post and the followings unread

I've always thought that it depends on the center point of the shp itself which supposedly starts at the very top of a cell at 0,0. Same applies to how animations are drawn. I use shp builder to get an idea:



Annotation 2020-07-22 120707.jpg
 Description:
 Filesize:  7.59 KB
 Viewed:  624 Time(s)

Annotation 2020-07-22 120707.jpg



Annotation 2020-07-22 120631.jpg
 Description:
 Filesize:  7.31 KB
 Viewed:  624 Time(s)

Annotation 2020-07-22 120631.jpg



_________________

ayylmao on Discord

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


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Wed Jul 22, 2020 2:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

Starting to draw at the top of the cell (30,0) makes the ore drill look good.
However, the trees are rendered too far down. They do look good when drawing from cell center (30, 15).

Could this be a side effect of SpawnsTiberium making it use a different palette (unitpal instead of isopal)?

That would mean that palette is related to how an object is drawn on screen.



Screenshot_20200722_162254.png
 Description:
 Filesize:  71.89 KB
 Viewed:  589 Time(s)

Screenshot_20200722_162254.png



_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

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


Joined: 09 Feb 2015

PostPosted: Wed Jul 22, 2020 7:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

More likely it's an exception for Tib trees, it is possibly related to the IsAnimated since they're the only ones that have it.

_________________
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 [7 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.1781s ][ Queries: 17 (0.0140s) ][ Debug on ]