View Issue Details

IDProjectCategoryView StatusLast Update
0003041FSSCPgraphicspublic2014-06-05 10:36
ReporterBlack Wolf Assigned Toniffiwan  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.7.2 RC1 
Summary0003041: Force Clamp is not carried when using sexps to switch skyboxes.
DescriptionAs described. Force Clamp eliminates the seams on this skybox ( http://i60.tinypic.com/x1kiza.jpg ), if it is the standard BG from the beginning of the mission. If it isn't, (i.e. it's added by sexps) then the seams show up even if force-clamp is checked in the background editor.
Steps To ReproduceDL and install Frontlines 2334, the bug is obvious in the cutscene mission.
TagsNo tags attached.

Activities

niffiwan

2014-05-14 03:01

developer   ~0015746

For reference, the cutscene mission is:
2334 Campaign
Conquerors (2334-09 Cutscene.fs2)

niffiwan

2014-05-14 03:45

developer   ~0015747

set-skybox-model ignores the current mission skybox flags. It uses these default flags:

#define DEFAULT_NMODEL_FLAGS (MR_NO_ZBUFFER | MR_NO_CULL | MR_ALL_XPARENT | MR_NO_LIGHTING)

(FYI, complete list of flags seems to be:
MR_NO_LIGHTING
MR_ALL_XPARENT
MR_NO_ZBUFFER
MR_NO_CULL
MR_NO_GLOWMAPS
MR_FORCE_CLAMP)

I was thinking that for maximum flexibility, the sexp should also allow any/all of the skybox flags to be set rather than just copying the mission flags. That should handle the situation of one skybox needing clamping when another does not.

Or realistically, would only the two non-default flags (MR_NO_GLOWMAPS & MR_FORCE_CLAMP) need to be able to be toggled by the sexp?

niffiwan

2014-05-30 04:32

developer   ~0015773

Forum discussion:
http://www.hard-light.net/forums/index.php?topic=87650.0

Proposed SEXP change:

all options, each flag toggles the defaults

( set-skybox-model "CS-SB.pof" [add-lighting | no-transparency | add-zbuffer | add-culling | no-glowmaps | add-clamp] )

Default case (same as current implementation)

( set-skybox-model "CS-SB.pof" )
Uses flags MR_NO_ZBUFFER | MR_NO_CULL | MR_ALL_XPARENT | MR_NO_LIGHTING

Sexp to add CLAMP to the defaults:

( set-skybox-model "CS-SB.pof" "force-clamp")
Uses flags MR_NO_ZBUFFER | MR_NO_CULL | MR_ALL_XPARENT | MR_NO_LIGHTING | MR_FORCE_CLAMP

Sexp to add lighting to the defaults:

( set-skybox-model "CS-SB.pof" "add-lighting")
Uses flags MR_NO_ZBUFFER | MR_NO_CULL | MR_ALL_XPARENT

niffiwan

2014-05-30 09:34

developer   ~0015774

Patch created; see the github pull request:
https://github.com/scp-fs2open/fs2open.github.com/pull/33

I tested using the slightly modified Frontlines mission, included checking that all flags were accepted, bogus flags were rejected, and that adding CLAMP removed the skybox seams.

niffiwan

2014-05-30 09:34

developer  

2334-09a.fs2 (198,065 bytes)

niffiwan

2014-06-05 10:36

developer   ~0015801

Fix committed to trunk@10754.

Related Changesets

fs2open: trunk r10754

2014-06-05 05:53

niffiwan


Ported: N/A

Details Diff
Fix mantis 3041

Allow set-skybox-model to set skybox flags (with FRED support - thanks
m!m)
Affected Issues
0003041
mod - /trunk/fs2_open/code/fred2/sexp_tree.cpp Diff File
mod - /trunk/fs2_open/code/fred2/sexp_tree.h Diff File
mod - /trunk/fs2_open/code/parse/sexp.cpp Diff File
mod - /trunk/fs2_open/code/parse/sexp.h Diff File

Issue History

Date Modified Username Field Change
2014-05-12 05:47 Black Wolf New Issue
2014-05-14 03:01 niffiwan Note Added: 0015746
2014-05-14 03:45 niffiwan Note Added: 0015747
2014-05-26 21:10 niffiwan Assigned To => niffiwan
2014-05-26 21:10 niffiwan Status new => assigned
2014-05-30 04:32 niffiwan Note Added: 0015773
2014-05-30 09:34 niffiwan Note Added: 0015774
2014-05-30 09:34 niffiwan Status assigned => code review
2014-05-30 09:34 niffiwan File Added: 2334-09a.fs2
2014-06-05 10:36 niffiwan Changeset attached => fs2open trunk r10754
2014-06-05 10:36 niffiwan Note Added: 0015801
2014-06-05 10:36 niffiwan Status code review => resolved
2014-06-05 10:36 niffiwan Resolution open => fixed