Go Back   AC3D Forums > General > AC3D Suggestions
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 21st October 2003, 06:25 PM   #1
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default Another texture mapping

I'd really like to see an option to use the type of texture mapping that you find in a lot of game-level style editors (like the Quake family) where textures are mapped based on a "global texture axis".

I made a quick plugin (see the screenshots below) that does this, but I thought it would be *really* nice if this were an AC3D feature. Going to the plugin every time you make a geometry adjustment is a bit tedious, plus it'd be nice if AC3D kept up with scaling/rotating/offsetting for each surface.

default mapping:


"new" planar mapping:


It really helps for things like the middle cluster of brick objects where the front of the objects line up texture-wise. Also, the side of the large brick wall is no longer smushed and stretched. Plus, the rotated block no longer has a rotated texture. These things can be done with the coordinate editor, but I haven't found it very easy to do.

This plugin lacks vert/horz texture scaling and offsetting, which are actually handled nicely in AC3D already (and are additive to this current plugin), although they're applied only at the object level.

Scaling in this example is hardcoded, and it takes a recompile to change it, so if you're not using the same scale as me (probably the case), it won't be terribly useful in its current state. And I currently have to recompile if I want the scale changed, myself. I'm completely ignorant of TCL and haven't bothered with learning it yet - I imagine this would be the standard way to get the variables I need into the plugin...

Also, there is no support in this plugin for rotating the texture. This is a very bare-bones plugin that needs scaling+rotating+offsetting before it's distributable (not sure how I'll handle rotating yet, but scaling and offsetting are simply a matter of getting variables passed into my plugin).

I'm still working on the plugin, but I'm not sure how long it'll be before I can take another day or two and develop more with it.

I'd still be glad to share this plugin (+source) in its current state if there's an interest beyond my own, and the developers of AC3D are more than welcome to it. It's for version 4.

The source is pretty straightforward, as it should be, since I've been writing AC3D plugins for exactly 1/2 of a day now . I've found that AC3D has an amazingly intuitive and easy to pick up plugin framework.

Thanks again to Andy and company for a fantastic product that allows its users to do such things! Oh, *and* thanks to Andy for the quick turnaround on sending me the latest headers for version 4.

Dennis
Dennis is offline   Reply With Quote
Old 22nd October 2003, 10:54 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Another texture mapping

Hi Dennis - that looks really useful. I'm impressed with the speed that you wrote the plugin!

When it's ready, if you send it to me, I can (with your permission) build it in to the main release.

Andy
Andy is offline   Reply With Quote
Old 22nd October 2003, 11:41 AM   #3
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default Re: Another texture mapping

Thanks so much --- the code was almost a cut and paste from old code I've written (map parsers), so it was just a matter of getting it into AC3D, which, thanks to the provided examples, was rather easy.

I'd like to tinker with building a quick TCL dialog to allow me to muck with the scale and offset in real time so I can be sure they're working properly, and I'll be more than happy to send you the completed code.
Dennis is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 05:37 AM.


AC3D Forum
(C) Inivis Limited 2020